Commit e6292b83 by 唐功亮

【修改】 厂商认证增加 死值字段 审批不通过 增加理由

parent cc63386c
......@@ -213,9 +213,10 @@ public class TycpdmFirmController extends AbstractController {
@RequestMapping("/authApi/audit")
// @RequiresPermissions("manage:tycpdmfirm:delete")
public R audit(@RequestBody Map map){
MemberEntity memberUser = getMemberUser();
Integer memberUserId = getMemberUserId();
try {
tycpdmFirmService.audit(map,memberUserId);
tycpdmFirmService.audit(map,memberUserId,memberUser.getUsername());
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
......
......@@ -21,11 +21,11 @@ import java.util.Map;
*/
@Mapper
public interface TycpdmFirmChangeDao extends BaseMapper<TycpdmFirmChangeEntity> {
@Update("UPDATE tycpdm_firm_change SET firm_archivesFile = #{firm_archivesFile} , logout_flag=#{logout_flag} WHERE id = #{id}")
void updateByIdfirmArchivesFile(@Param("firm_archivesFile")String firm_archivesFile, @Param("id") Integer id, @Param("logout_flag")int logout_flag);
@Update("UPDATE tycpdm_firm_change SET firm_archivesFile = #{firm_archivesFile} , logout_flag=#{logout_flag} , login_date=#{date} WHERE id = #{id}")
void updateByIdfirmArchivesFile(@Param("firm_archivesFile")String firm_archivesFile, @Param("id") Integer id, @Param("logout_flag")int logout_flag,@Param("date")String date);
@Update("UPDATE tycpdm_firm_change SET logout_flag = #{logout_flag} WHERE id = #{id}")
void updateBYIdLogoutFlag(@Param("logout_flag") String logout_flag, @Param("id") String id);
@Update("UPDATE tycpdm_firm_change SET logout_flag = #{logout_flag}, approve_date = #{date} ,approve_content=#{approve_content} , auditor =#{username} WHERE id = #{id}")
void updateBYIdLogoutFlag(@Param("logout_flag") String logout_flag, @Param("id") String id,@Param("date") String date,@Param("username")String username,@Param("approve_content") String approve_content);
Integer findTycpdmFirmLogoutFlagCountALL(@Param("levels")Integer levels,@Param("logout_flag")Integer logout_flag);
......
......@@ -28,13 +28,13 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
/* @Update("UPDATE tycpdm_firm SET firmBusinessLicenseFile = #{firmBusinessLicenseFile} , logout_flag=#{logout_flag} WHERE f_id = #{id}")
void updateByIdFirmBusinessLicenseFile(@Param("firmBusinessLicenseFile")String firmBusinessLicenseFile,@Param("id") Integer id,@Param("logout_flag")int logout_flag );
*/
@Update("UPDATE tycpdm_firm SET firm_archivesFile = #{firm_archivesFile} , logout_flag=#{logout_flag} WHERE f_id = #{id}")
void updateByIdfirmArchivesFile(@Param("firm_archivesFile")String firm_archivesFile, @Param("id") Integer id, @Param("logout_flag")int logout_flag);
@Update("UPDATE tycpdm_firm SET firm_archivesFile = #{firm_archivesFile} , logout_flag=#{logout_flag} ,login_date=#{date} WHERE f_id = #{id}")
void updateByIdfirmArchivesFile(@Param("firm_archivesFile")String firm_archivesFile, @Param("id") Integer id, @Param("logout_flag")int logout_flag,@Param("date")String date);
List<TycpdmFirmEntity> selectTycpdmFirmList(@org.apache.ibatis.annotations.Param("params")Map<String, Object> params, Page page);
@Update("UPDATE tycpdm_firm SET logout_flag = #{logout_flag} WHERE f_id = #{id}")
void updateBYIdLogoutFlag(@Param("logout_flag") String logout_flag, @Param("id") String id);
@Update("UPDATE tycpdm_firm SET logout_flag = #{logout_flag} , approve_date = #{date} ,approve_content=#{approve_content} , auditor =#{username} WHERE f_id = #{id}")
void updateBYIdLogoutFlag(@Param("logout_flag") String logout_flag, @Param("id") String id,@Param("date") String date,@Param("username")String username,@Param("approve_content") String approve_content);
@Select("select count(1) from tycpdm_firm where firmName=#{firmname} and logout_flag=#{logout_flag} and base_user<>#{userName}")
int selectByIdFirmName(@Param("firmname")String firmname, @Param("logout_flag")int logout_flag,@Param("userName")String userName);
......
......@@ -38,7 +38,7 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> {
Page<TycpdmFirmEntity> findlist(Map<String, Object> params, Page page);
void audit(Map map,Integer memberUserId) throws InvocationTargetException, IllegalAccessException;
void audit(Map map,Integer memberUserId,String username) throws InvocationTargetException, IllegalAccessException;
int findLogoutFlag(String userName);
......
......@@ -3,6 +3,7 @@ package io.office.modules.manage.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.exception.RRException;
import io.office.modules.manage.entity.TycpdmFirmEntity;
import io.office.modules.manage.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......@@ -70,7 +71,7 @@ public class TycpdmFirmChangeServiceImpl extends ServiceImpl<TycpdmFirmChangeDao
try {
file.transferTo(dest);
//保存路径 firm_archivesFile
tycpdmFirmChangeDao.updateByIdfirmArchivesFile(uploadFileQY + uuid+substring,id,0);
tycpdmFirmChangeDao.updateByIdfirmArchivesFile(uploadFileQY + uuid+substring,id,0, DateUtils.getTime());
//删除原来的照片
if (firmArchivesfile!=null){
File file1 = new File(firmArchivesfile);
......
......@@ -8,6 +8,7 @@ import io.office.modules.manage.dao.TycpdmFirmChangeDao;
import io.office.modules.manage.dao.TycpdmVipUserDao;
import io.office.modules.manage.entity.*;
import io.office.modules.manage.service.TycpdmFirmChangeService;
import io.office.modules.manage.utils.DateUtils;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -18,10 +19,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -170,7 +168,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
file.transferTo(dest);
//保存路径 firm_archivesFile
tycpdmFirmDao.updateByIdfirmArchivesFile(uploadFileQY + uuid+substring,id,0);
tycpdmFirmDao.updateByIdfirmArchivesFile(uploadFileQY + uuid+substring,id,0,DateUtils.getTime());
//tycpdm_vip_user表中新增数据
/*TycpdmFirmEntity tycpdmFirmEntity = tycpdmFirmDao.selectById(id);
String baseUser = tycpdmFirmEntity.getBaseUser();
......@@ -227,15 +225,17 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
@Override
@Transactional
public void audit(Map map,Integer memberUserId) throws InvocationTargetException, IllegalAccessException {
public void audit(Map map,Integer memberUserId,String username) throws InvocationTargetException, IllegalAccessException {
Integer status= map.get("status")==null?0: Integer.valueOf(String.valueOf(map.get("status")));//1.新增(新增时id为fId) 2.变更(id为fId)
String id= map.get("id")==null?"": String.valueOf(map.get("id"));//id
String auditStatus= map.get("auditStatus")==null?"": String.valueOf(map.get("auditStatus"));//审核状态 1.通过 2.不通过
String approve_content= map.get("approve_content")==null?"": String.valueOf(map.get("approve_content"));//拒绝理由
//logout_flag
if (status==1){
//新增
//直接修改tycpmFirm表 状态
tycpdmFirmDao.updateBYIdLogoutFlag(auditStatus,id);
tycpdmFirmDao.updateBYIdLogoutFlag(auditStatus,id,DateUtils.getTime(),username,approve_content);
//在tycpdm_vip_user表中记录
if ("1".equals(auditStatus)){
TycpdmFirmEntity tycpdmFirmEntity = tycpdmFirmDao.selectById(id);
......@@ -252,7 +252,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
}else if (status==2){
//变更
tycpdmFirmChangeDao.updateBYIdLogoutFlag(auditStatus,id);
tycpdmFirmChangeDao.updateBYIdLogoutFlag(auditStatus,id,DateUtils.getTime(),username,approve_content);
if ("1".equals(auditStatus)){
//通过将变更表的数据同步到tycpdmFirm表
TycpdmFirmChangeEntity tycpdmFirmChangeEntity = tycpdmFirmChangeDao.selectById(id);
......@@ -299,6 +299,11 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
TycpdmFirmChangeEntity tycpdmFirmChangeEntity = new TycpdmFirmChangeEntity();
Integer status = body.get("status")==null?0:Integer.valueOf(String.valueOf(body.get("status")));
//写入死值
body.put("useddesc","企业产品描述信息");
body.put("wishusednum",100);
body.put("receiveflag",1);
body.put("memo","注册备注信息");
Integer id=0;
if (status==1){ //首次
BeanUtils.populate(tycpdmFirm, body);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment