相关放功能流程调整

pull/12/head
liujun 2024-01-19 16:11:49 +08:00
parent 1cf1adefd9
commit b393a6164a
6 changed files with 614 additions and 78 deletions

View File

@ -0,0 +1,24 @@
package com.zcloud.mapper.datasource.xgf;
import java.util.List;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
/**
* (XgfFlows)访
*
* @author liu jun
* @since 2024-01-19 12:24:00
*/
public interface XgfFlowsMapper {
int save(PageData entity);
int delete(PageData entity);
int edit(PageData pd);
List<PageData> datalistPage(Page page);
PageData findById(PageData condition);
}

View File

@ -26,4 +26,6 @@ public interface XgfUserService {
List<PageData> findRecordList(PageData condition) throws Exception;
List<PageData> getAppointApproveList(Page page);
void approveAppoint(PageData request) throws Exception;
}

View File

@ -2,6 +2,7 @@ package com.zcloud.service.xgf.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
import com.zcloud.mapper.datasource.xgf.*;
import com.zcloud.service.bus.CorpInfoService;
import com.zcloud.service.system.DepartmentService;
@ -36,6 +37,12 @@ public class XgfUserServiceImpl implements XgfUserService {
@Resource
private FlowDetailMapper flowDetailMapper;
@Resource
private XgfFlowsMapper xgfFlowsMapper;
@Resource
private CorpInfoMapper corpInfoMapper;
@Value("${preventionxgf.api.url}")
private String prevention_xgf_url;
@ -71,6 +78,7 @@ public class XgfUserServiceImpl implements XgfUserService {
x.put("VALID_FLAG", "1");
x.put("STATUS", "1");
x.put("CHECK_STATUS", "0");
x.put("CHECK_STEP", 1);
x.put("CREATED_TIME", DateUtil.getTime());
x.put("OPERATOR_TIME", DateUtil.getTime());
x.put("IS_DELETE", "0");
@ -118,6 +126,7 @@ public class XgfUserServiceImpl implements XgfUserService {
x.put("VALID_FLAG", "1");
x.put("STATUS", "1");
x.put("CHECK_STATUS", "0");
x.put("CHECK_STEP", 1);
if ("2".equals(x.getString("STUDY_STATUS"))) {
x.put("STUDY_STATUS", "2");
} else {
@ -130,6 +139,43 @@ public class XgfUserServiceImpl implements XgfUserService {
}
/* 2、保存相关方人员流程审批信息 */
condition.clear();
condition.put("FLOWS_ID", x.getString("USER_ID"));
PageData flows = xgfFlowsMapper.findById(condition);
if (flows == null || flows.size() <= 0) {
flows = new PageData();
flows.put("FLOWS_ID", x.getString("USER_ID"));
flows.put("FLOWS_STEP", 1);
flows.put("FOREIGN_KEY_ID", x.getString("USER_ID"));
flows.put("FOREIGN_KEY_NAME", "xgf_user=>XGF_USER_ID");
flows.put("APPOINT_ZERO_CORP_ID", x.getString("CORPINFO_ID"));
condition.clear();
condition.put("CORPINFO_ID", x.getString("CORPINFO_ID"));
PageData corpInfo = corpInfoMapper.findById(condition);
if (corpInfo != null && corpInfo.size() > 0) {
flows.put("APPOINT_ZERO_CORP_NAME", corpInfo.getString("NAME"));
}
flows.put("APPOINT_ZERO_DEPARTMENT_ID", x.getString("APPOINT_ZERO_DEPARTMENT_ID"));
flows.put("APPOINT_ZERO_DEPARTMENT_NAME", x.getString("APPOINT_ZERO_DEPARTMENT_NAME"));
flows.put("APPOINT_ZERO_USER_ID", x.getString("APPOINT_ZERO_USER_ID"));
flows.put("APPOINT_ZERO_USER_NAME", x.getString("APPOINT_ZERO_USER_NAME"));
xgfFlowsMapper.save(flows);
} else {
flows.put("APPOINT_ZERO_CORP_ID", x.getString("CORPINFO_ID"));
flows.put("FLOWS_STEP", 1);
condition.clear();
condition.put("CORPINFO_ID", x.getString("CORPINFO_ID"));
PageData corpInfo = corpInfoMapper.findById(condition);
if (corpInfo != null && corpInfo.size() > 0) {
flows.put("APPOINT_ZERO_CORP_NAME", corpInfo.getString("NAME"));
}
flows.put("APPOINT_ZERO_DEPARTMENT_ID", x.getString("APPOINT_ZERO_DEPARTMENT_ID"));
flows.put("APPOINT_ZERO_DEPARTMENT_NAME", x.getString("APPOINT_ZERO_DEPARTMENT_NAME"));
flows.put("APPOINT_ZERO_USER_ID", x.getString("APPOINT_ZERO_USER_ID"));
flows.put("APPOINT_ZERO_USER_NAME", x.getString("APPOINT_ZERO_USER_NAME"));
xgfFlowsMapper.edit(flows);
}
/* 3、流程记录 */
condition.clear();
condition.put("FOREIGN_KEY", x.getString("XGF_USER_ID"));
condition.put("TYPE", "1");
condition.put("VALID_FLAG", "1");
@ -228,18 +274,7 @@ public class XgfUserServiceImpl implements XgfUserService {
entity.put("STATUS", "1");
entity.put("VALID_FLAG", "1");
entity.put("CHECK_STATUS", "1");
condition.clear();
condition.put("XFG_USER_DETAILS_ID", x);
PageData userInfo = xgfUserDetailsMapper.findById(condition);
if (userInfo == null || userInfo.size() == 0) {
throw new RuntimeException("未找到该用户详细信息");
}
// 企业端人员审核完成后,指定企业端监管部门,中的某人进行审核
userInfo.put("APPOINT_DEPARTMENT_ID", request.getString("APPOINT_DEPARTMENT_ID"));
userInfo.put("APPOINT_DEPARTMENT_NAME", request.getString("APPOINT_DEPARTMENT_NAME"));
userInfo.put("APPOINT_USER_ID", request.getString("APPOINT_USER_ID"));
userInfo.put("APPOINT_USER_NAME", request.getString("APPOINT_USER_NAME"));
xgfUserDetailsMapper.edit(userInfo);
entity.put("CHECK_STEP", 2);
} else {
entity.put("STATUS", "0");
PageData key = new PageData();
@ -250,9 +285,27 @@ public class XgfUserServiceImpl implements XgfUserService {
if (result == null || !"succeed".equals(result.get("result"))) {
throw new RuntimeException("请求失败");
}
}
/* 保存审批信息 */
condition.clear();
condition.put("FLOWS_ID", x);
PageData flows = xgfFlowsMapper.findById(condition);
if (flows == null || flows.size() == 0) {
throw new RuntimeException("未找到该用户详细信息");
}
condition.clear();
condition.put("STATUS", request.getString("STATUS"));
condition.put("APPOINT_CORP_ID", request.getString("APPOINT_CORP_ID"));
condition.put("APPOINT_CORP_NAME", request.getString("APPOINT_CORP_NAME"));
condition.put("APPOINT_DEPARTMENT_ID", request.getString("APPOINT_DEPARTMENT_ID"));
condition.put("APPOINT_DEPARTMENT_NAME", request.getString("APPOINT_DEPARTMENT_NAME"));
condition.put("APPOINT_USER_ID", request.getString("APPOINT_USER_ID"));
condition.put("APPOINT_USER_NAME", request.getString("APPOINT_USER_NAME"));
handle(condition, flows);
xgfUserMapper.edit(entity);
/* 保存审批流程明细信息 */
/* 保存审批记录 */
condition.clear();
condition.put("FOREIGN_KEY", entity.getString("XGF_USER_ID"));
condition.put("TYPE", "1");
@ -274,7 +327,12 @@ public class XgfUserServiceImpl implements XgfUserService {
nextNode.put("APPROVER_NAME", Jurisdiction.getName());
nextNode.put("APPROVER_TIME", DateUtil.getTime());
nextNode.put("APPROVER_CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
nextNode.put("APPROVER_CORPINFO_NAME", "");
condition.clear();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData corpInfo = corpInfoMapper.findById(condition);
if (corpInfo != null && corpInfo.size() > 0) {
nextNode.put("APPROVER_CORPINFO_NAME", corpInfo.getString("NAME"));
}
nextNode.put("PASS_FLAG", request.getString("STATUS"));
nextNode.put("END_FLAG", "0");
nextNode.put("ISDELETE", "0");
@ -299,10 +357,157 @@ public class XgfUserServiceImpl implements XgfUserService {
public List<PageData> getAppointApproveList(Page page) {
List<PageData> list = xgfUserMapper.appointlistPage(page);
for (PageData x : list) {
if (StringUtils.isNotBlank(x.getString("APPOINT_USER_ID"))) {
// TODO 判断当前人是否有权限审批
}
x.put("power_flag", getPower(x));
}
return list;
}
@Override
public void approveAppoint(PageData request) throws Exception {
PageData condition = new PageData();
condition.put("XGF_USER_ID",request.getString("XGF_USER_ID"));
PageData userInfo = xgfUserMapper.findById(condition);
if (userInfo == null || userInfo.size() == 0) {
throw new RuntimeException("未找到该用户");
}
condition.clear();
condition.put("FLOWS_ID", userInfo.getString("XGF_USER_ID"));
PageData flows = xgfFlowsMapper.findById(condition);
if (flows == null || flows.size() == 0) {
throw new RuntimeException("未找到该用户详审批信息");
}
handle(request,flows);
}
/* 获取当前用户是否有权限审批 */
private String getPower(PageData x) {
switch (Integer.parseInt(x.get("CHECK_STEP").toString())) {
case 1:
if (Jurisdiction.getUSER_ID().equals(x.getString("APPOINT_ONE_USER_ID"))) {
return "1";
}
case 2:
if (Jurisdiction.getUSER_ID().equals(x.getString("APPOINT_TWO_USER_ID"))) {
return "1";
}
case 3:
if (Jurisdiction.getUSER_ID().equals(x.getString("APPOINT_THREE_USER_ID"))) {
return "1";
}
case 4:
if (Jurisdiction.getUSER_ID().equals(x.getString("APPOINT_FOUR_USER_ID"))) {
return "1";
}
case 5:
if (Jurisdiction.getUSER_ID().equals(x.getString("APPOINT_FIVE_USER_ID"))) {
return "1";
}
case 6:
if (Jurisdiction.getUSER_ID().equals(x.getString("APPOINT_SIX_USER_ID"))) {
return "1";
}
case 7:
if (Jurisdiction.getUSER_ID().equals(x.getString("APPOINT_SEVEN_USER_ID"))) {
return "1";
}
default:
return "0";
}
}
void handle(PageData info, PageData flows) throws Exception{
switch (Integer.parseInt(flows.get("FLOWS_STEP").toString())) {
case 1:
flows.put("APPOINT_ONE_CORP_ID", info.getString("APPOINT_CORP_ID"));
flows.put("APPOINT_ONE_CORP_NAME", info.getString("APPOINT_CORP_NAME"));
flows.put("APPOINT_ONE_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
flows.put("APPOINT_ONE_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
flows.put("APPOINT_ONE_USER_ID", info.getString("APPOINT_USER_ID"));
flows.put("APPOINT_ONE_USER_NAME", info.getString("APPOINT_USER_NAME"));
flows.put("APPOINT_ONE_TIME", DateUtil.getTime());
flows.put("APPOINT_ONE_STATUS", info.getString("STATUS"));
flows.put("APPOINT_ONE_OPINION", info.getString("OPINION"));
flows.put("FLOWS_STEP", 2);
xgfFlowsMapper.edit(flows);
break;
case 2:
flows.put("APPOINT_TWO_CORP_ID", info.getString("APPOINT_CORP_ID"));
flows.put("APPOINT_TWO_CORP_NAME", info.getString("APPOINT_CORP_NAME"));
flows.put("APPOINT_TWO_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
flows.put("APPOINT_TWO_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
flows.put("APPOINT_TWO_USER_ID", info.getString("APPOINT_USER_ID"));
flows.put("APPOINT_TWO_USER_NAME", info.getString("APPOINT_USER_NAME"));
flows.put("APPOINT_TWO_TIME", DateUtil.getTime());
flows.put("APPOINT_TWO_STATUS", info.getString("STATUS"));
flows.put("APPOINT_TWO_OPINION", info.getString("OPINION"));
flows.put("FLOWS_STEP", 3);
xgfFlowsMapper.edit(flows);
break;
case 3:
flows.put("APPOINT_THREE_CORP_ID", info.getString("APPOINT_CORP_ID"));
flows.put("APPOINT_THREE_CORP_NAME", info.getString("APPOINT_CORP_NAME"));
flows.put("APPOINT_THREE_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
flows.put("APPOINT_THREE_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
flows.put("APPOINT_THREE_USER_ID", info.getString("APPOINT_USER_ID"));
flows.put("APPOINT_THREE_USER_NAME", info.getString("APPOINT_USER_NAME"));
flows.put("APPOINT_THREE_TIME", DateUtil.getTime());
flows.put("APPOINT_THREE_STATUS", info.getString("STATUS"));
flows.put("APPOINT_THREE_OPINION", info.getString("OPINION"));
flows.put("FLOWS_STEP", 4);
xgfFlowsMapper.edit(flows);
break;
case 4:
flows.put("APPOINT_FOUR_CORP_ID", info.getString("APPOINT_CORP_ID"));
flows.put("APPOINT_FOUR_CORP_NAME", info.getString("APPOINT_CORP_NAME"));
flows.put("APPOINT_FOUR_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
flows.put("APPOINT_FOUR_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
flows.put("APPOINT_FOUR_USER_ID", info.getString("APPOINT_USER_ID"));
flows.put("APPOINT_FOUR_USER_NAME", info.getString("APPOINT_USER_NAME"));
flows.put("APPOINT_FOUR_TIME", DateUtil.getTime());
flows.put("APPOINT_FOUR_STATUS", info.getString("STATUS"));
flows.put("APPOINT_FOUR_OPINION", info.getString("OPINION"));
flows.put("FLOWS_STEP", 5);
xgfFlowsMapper.edit(flows);
break;
case 5:
flows.put("APPOINT_FIVE_CORP_ID", info.getString("APPOINT_CORP_ID"));
flows.put("APPOINT_FIVE_CORP_NAME", info.getString("APPOINT_CORP_NAME"));
flows.put("APPOINT_FIVE_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
flows.put("APPOINT_FIVE_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
flows.put("APPOINT_FIVE_USER_ID", info.getString("APPOINT_USER_ID"));
flows.put("APPOINT_FIVE_USER_NAME", info.getString("APPOINT_USER_NAME"));
flows.put("APPOINT_FIVE_TIME", DateUtil.getTime());
flows.put("APPOINT_FIVE_STATUS", info.getString("STATUS"));
flows.put("APPOINT_FIVE_OPINION", info.getString("OPINION"));
flows.put("FLOWS_STEP", 6);
xgfFlowsMapper.edit(flows);
break;
case 6:
flows.put("APPOINT_SIX_CORP_ID", info.getString("APPOINT_CORP_ID"));
flows.put("APPOINT_SIX_CORP_NAME", info.getString("APPOINT_CORP_NAME"));
flows.put("APPOINT_SIX_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
flows.put("APPOINT_SIX_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
flows.put("APPOINT_SIX_USER_ID", info.getString("APPOINT_USER_ID"));
flows.put("APPOINT_SIX_USER_NAME", info.getString("APPOINT_USER_NAME"));
flows.put("APPOINT_SIX_TIME", DateUtil.getTime());
flows.put("APPOINT_SIX_STATUS", info.getString("STATUS"));
flows.put("APPOINT_SIX_OPINION", info.getString("OPINION"));
flows.put("FLOWS_STEP", 7);
xgfFlowsMapper.edit(flows);
break;
case 7:
flows.put("APPOINT_SEVEN_CORP_ID", info.getString("APPOINT_CORP_ID"));
flows.put("APPOINT_SEVEN_CORP_NAME", info.getString("APPOINT_CORP_NAME"));
flows.put("APPOINT_SEVEN_DEPARTMENT_ID", info.getString("APPOINT_DEPARTMENT_ID"));
flows.put("APPOINT_SEVEN_DEPARTMENT_NAME", info.getString("APPOINT_DEPARTMENT_NAME"));
flows.put("APPOINT_SEVEN_USER_ID", info.getString("APPOINT_USER_ID"));
flows.put("APPOINT_SEVEN_USER_NAME", info.getString("APPOINT_USER_NAME"));
flows.put("APPOINT_SEVEN_TIME", DateUtil.getTime());
flows.put("APPOINT_SEVEN_STATUS", info.getString("STATUS"));
flows.put("APPOINT_SEVEN_OPINION", info.getString("OPINION"));
flows.put("FLOWS_STEP", 8);
xgfFlowsMapper.edit(flows);
break;
}
}
}

View File

@ -0,0 +1,336 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.XgfFlowsMapper">
<sql id="tableName">
xgf_flows
</sql>
<sql id="Field">
f.FLOWS_ID,
f.FOREIGN_KEY_ID,
f.FOREIGN_KEY_NAME,
f.FLOWS_STEP,
f.IS_DELETE,
f.APPOINT_ZERO_CORP_ID,
f.APPOINT_ZERO_CORP_TYEP,
f.APPOINT_ZERO_CORP_NAME,
f.APPOINT_ZERO_DEPARTMENT_ID,
f.APPOINT_ZERO_DEPARTMENT_NAME,
f.APPOINT_ZERO_USER_ID,
f.APPOINT_ZERO_USER_NAME,
f.APPOINT_ZERO_STATUS,
f.APPOINT_ZERO_OPINION,
f.APPOINT_ZERO_TIME,
f.APPOINT_ONE_CORP_ID,
f.APPOINT_ONE_CORP_NAME,
f.APPOINT_ONE_CORP_TYEP,
f.APPOINT_ONE_DEPARTMENT_ID,
f.APPOINT_ONE_DEPARTMENT_NAME,
f.APPOINT_ONE_USER_ID,
f.APPOINT_ONE_USER_NAME,
f.APPOINT_ONE_STATUS,
f.APPOINT_ONE_OPINION,
f.APPOINT_ONE_TIME,
f.APPOINT_TWO_CORP_ID,
f.APPOINT_TWO_CORP_NAME,
f.APPOINT_TWO_DEPARTMENT_ID,
f.APPOINT_TWO_DEPARTMENT_NAME,
f.APPOINT_TWO_USER_ID,
f.APPOINT_TWO_USER_NAME,
f.APPOINT_TWO_TIME,
f.APPOINT_THREE_CORP_ID,
f.APPOINT_THREE_CORP_NAME,
f.APPOINT_THREE_DEPARTMENT_ID,
f.APPOINT_THREE_DEPARTMENT_NAME,
f.APPOINT_THREE_USER_ID,
f.APPOINT_THREE_USER_NAME,
f.APPOINT_THREE_STATUS,
f.APPOINT_THREE_OPINION,
f.APPOINT_THREE_TIME,
f.APPOINT_FOUR_CORP_ID,
f.APPOINT_FOUR_CORP_NAME,
f.APPOINT_FOUR_DEPARTMENT_ID,
f.APPOINT_FOUR_DEPARTMENT_NAME,
f.APPOINT_FOUR_USER_ID,
f.APPOINT_FOUR_USER_NAME,
f.APPOINT_FOUR_STATUS,
f.APPOINT_FOUR_OPINION,
f.APPOINT_FIVE_CORP_ID,
f.APPOINT_FIVE_CORP_NAME,
f.APPOINT_FIVE_DEPARTMENT_ID,
f.APPOINT_FIVE_DEPARTMENT_NAME,
f.APPOINT_FIVE_USER_ID,
f.APPOINT_FIVE_USER_NAME,
f.APPOINT_FIVE_STATUS,
f.APPOINT_FIVE_OPINION,
f.APPOINT_SIX_CORP_ID,
f.APPOINT_SIX_CORP_NAME,
f.APPOINT_SIX_DEPARTMENT_ID,
f.APPOINT_SIX_DEPARTMENT_NAME,
f.APPOINT_SIX_USER_ID,
f.APPOINT_SIX_USER_NAME,
f.APPOINT_SIX_STATUS,
f.APPOINT_SIX_OPINION,
f.APPOINT_SEVEN_CORP_ID,
f.APPOINT_SEVEN_CORP_NAME,
f.APPOINT_SEVEN_DEPARTMENT_ID,
f.APPOINT_SEVEN_DEPARTMENT_NAME,
f.APPOINT_SEVEN_USER_ID,
f.APPOINT_SEVEN_USER_NAME,
f.APPOINT_SEVEN_STATUS,
f.APPOINT_SEVEN_OPINION
</sql>
<sql id="Field2">
FLOWS_ID,
FOREIGN_KEY_ID,
FOREIGN_KEY_NAME,
FLOWS_STEP,
IS_DELETE,
APPOINT_ZERO_CORP_ID,
APPOINT_ZERO_CORP_TYEP,
APPOINT_ZERO_CORP_NAME,
APPOINT_ZERO_DEPARTMENT_ID,
APPOINT_ZERO_DEPARTMENT_NAME,
APPOINT_ZERO_USER_ID,
APPOINT_ZERO_USER_NAME,
APPOINT_ZERO_STATUS,
APPOINT_ZERO_OPINION,
APPOINT_ZERO_TIME,
APPOINT_ONE_CORP_ID,
APPOINT_ONE_CORP_NAME,
APPOINT_ONE_CORP_TYEP,
APPOINT_ONE_DEPARTMENT_ID,
APPOINT_ONE_DEPARTMENT_NAME,
APPOINT_ONE_USER_ID,
APPOINT_ONE_USER_NAME,
APPOINT_ONE_STATUS,
APPOINT_ONE_OPINION,
APPOINT_ONE_TIME,
APPOINT_TWO_CORP_ID,
APPOINT_TWO_CORP_NAME,
APPOINT_TWO_DEPARTMENT_ID,
APPOINT_TWO_DEPARTMENT_NAME,
APPOINT_TWO_USER_ID,
APPOINT_TWO_USER_NAME,
APPOINT_TWO_TIME,
APPOINT_THREE_CORP_ID,
APPOINT_THREE_CORP_NAME,
APPOINT_THREE_DEPARTMENT_ID,
APPOINT_THREE_DEPARTMENT_NAME,
APPOINT_THREE_USER_ID,
APPOINT_THREE_USER_NAME,
APPOINT_THREE_STATUS,
APPOINT_THREE_OPINION,
APPOINT_THREE_TIME,
APPOINT_FOUR_CORP_ID,
APPOINT_FOUR_CORP_NAME,
APPOINT_FOUR_DEPARTMENT_ID,
APPOINT_FOUR_DEPARTMENT_NAME,
APPOINT_FOUR_USER_ID,
APPOINT_FOUR_USER_NAME,
APPOINT_FOUR_STATUS,
APPOINT_FOUR_OPINION,
APPOINT_FIVE_CORP_ID,
APPOINT_FIVE_CORP_NAME,
APPOINT_FIVE_DEPARTMENT_ID,
APPOINT_FIVE_DEPARTMENT_NAME,
APPOINT_FIVE_USER_ID,
APPOINT_FIVE_USER_NAME,
APPOINT_FIVE_STATUS,
APPOINT_FIVE_OPINION,
APPOINT_SIX_CORP_ID,
APPOINT_SIX_CORP_NAME,
APPOINT_SIX_DEPARTMENT_ID,
APPOINT_SIX_DEPARTMENT_NAME,
APPOINT_SIX_USER_ID,
APPOINT_SIX_USER_NAME,
APPOINT_SIX_STATUS,
APPOINT_SIX_OPINION,
APPOINT_SEVEN_CORP_ID,
APPOINT_SEVEN_CORP_NAME,
APPOINT_SEVEN_DEPARTMENT_ID,
APPOINT_SEVEN_DEPARTMENT_NAME,
APPOINT_SEVEN_USER_ID,
APPOINT_SEVEN_USER_NAME,
APPOINT_SEVEN_STATUS,
APPOINT_SEVEN_OPINION
</sql>
<sql id="FieldValue">
#{FLOWS_ID},
#{FOREIGN_KEY_ID},
#{FOREIGN_KEY_NAME},
#{FLOWS_STEP},
#{IS_DELETE},
#{APPOINT_ZERO_CORP_ID},
#{APPOINT_ZERO_CORP_TYEP},
#{APPOINT_ZERO_CORP_NAME},
#{APPOINT_ZERO_DEPARTMENT_ID},
#{APPOINT_ZERO_DEPARTMENT_NAME},
#{APPOINT_ZERO_USER_ID},
#{APPOINT_ZERO_USER_NAME},
#{APPOINT_ZERO_STATUS},
#{APPOINT_ZERO_OPINION},
#{APPOINT_ZERO_TIME},
#{APPOINT_ONE_CORP_ID},
#{APPOINT_ONE_CORP_NAME},
#{APPOINT_ONE_CORP_TYEP},
#{APPOINT_ONE_DEPARTMENT_ID},
#{APPOINT_ONE_DEPARTMENT_NAME},
#{APPOINT_ONE_USER_ID},
#{APPOINT_ONE_USER_NAME},
#{APPOINT_ONE_STATUS},
#{APPOINT_ONE_OPINION},
#{APPOINT_ONE_TIME},
#{APPOINT_TWO_CORP_ID},
#{APPOINT_TWO_CORP_NAME},
#{APPOINT_TWO_DEPARTMENT_ID},
#{APPOINT_TWO_DEPARTMENT_NAME},
#{APPOINT_TWO_USER_ID},
#{APPOINT_TWO_USER_NAME},
#{APPOINT_TWO_TIME},
#{APPOINT_THREE_CORP_ID},
#{APPOINT_THREE_CORP_NAME},
#{APPOINT_THREE_DEPARTMENT_ID},
#{APPOINT_THREE_DEPARTMENT_NAME},
#{APPOINT_THREE_USER_ID},
#{APPOINT_THREE_USER_NAME},
#{APPOINT_THREE_STATUS},
#{APPOINT_THREE_OPINION},
#{APPOINT_THREE_TIME},
#{APPOINT_FOUR_CORP_ID},
#{APPOINT_FOUR_CORP_NAME},
#{APPOINT_FOUR_DEPARTMENT_ID},
#{APPOINT_FOUR_DEPARTMENT_NAME},
#{APPOINT_FOUR_USER_ID},
#{APPOINT_FOUR_USER_NAME},
#{APPOINT_FOUR_STATUS},
#{APPOINT_FOUR_OPINION},
#{APPOINT_FIVE_CORP_ID},
#{APPOINT_FIVE_CORP_NAME},
#{APPOINT_FIVE_DEPARTMENT_ID},
#{APPOINT_FIVE_DEPARTMENT_NAME},
#{APPOINT_FIVE_USER_ID},
#{APPOINT_FIVE_USER_NAME},
#{APPOINT_FIVE_STATUS},
#{APPOINT_FIVE_OPINION},
#{APPOINT_SIX_CORP_ID},
#{APPOINT_SIX_CORP_NAME},
#{APPOINT_SIX_DEPARTMENT_ID},
#{APPOINT_SIX_DEPARTMENT_NAME},
#{APPOINT_SIX_USER_ID},
#{APPOINT_SIX_USER_NAME},
#{APPOINT_SIX_STATUS},
#{APPOINT_SIX_OPINION},
#{APPOINT_SEVEN_CORP_ID},
#{APPOINT_SEVEN_CORP_NAME},
#{APPOINT_SEVEN_DEPARTMENT_ID},
#{APPOINT_SEVEN_DEPARTMENT_NAME},
#{APPOINT_SEVEN_USER_ID},
#{APPOINT_SEVEN_USER_NAME},
#{APPOINT_SEVEN_STATUS},
#{APPOINT_SEVEN_OPINION}
</sql>
<!-- 新增 -->
<insert id="save" parameterType="pd">
insert into xgf_flows (<include refid="Field2"></include>) values (<include refid="FieldValue"></include>)
</insert>
<!-- 删除 -->
<delete id="delete" parameterType="pd">
delete from xgf_flows where FLOWS_ID = #{FLOWS_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update xgf_flows set
FLOWS_ID = #{FLOWS_ID},
FOREIGN_KEY_ID = #{FOREIGN_KEY_ID},
FOREIGN_KEY_NAME = #{FOREIGN_KEY_NAME},
FLOWS_STEP = #{FLOWS_STEP},
IS_DELETE = #{IS_DELETE},
APPOINT_ZERO_CORP_ID = #{APPOINT_ZERO_CORP_ID},
APPOINT_ZERO_CORP_TYEP = #{APPOINT_ZERO_CORP_TYEP},
APPOINT_ZERO_CORP_NAME = #{APPOINT_ZERO_CORP_NAME},
APPOINT_ZERO_DEPARTMENT_ID = #{APPOINT_ZERO_DEPARTMENT_ID},
APPOINT_ZERO_DEPARTMENT_NAME = #{APPOINT_ZERO_DEPARTMENT_NAME},
APPOINT_ZERO_USER_ID = #{APPOINT_ZERO_USER_ID},
APPOINT_ZERO_USER_NAME = #{APPOINT_ZERO_USER_NAME},
APPOINT_ZERO_STATUS = #{APPOINT_ZERO_STATUS},
APPOINT_ZERO_OPINION = #{APPOINT_ZERO_OPINION},
APPOINT_ZERO_TIME = #{APPOINT_ZERO_TIME},
APPOINT_ONE_CORP_ID = #{APPOINT_ONE_CORP_ID},
APPOINT_ONE_CORP_NAME = #{APPOINT_ONE_CORP_NAME},
APPOINT_ONE_CORP_TYEP = #{APPOINT_ONE_CORP_TYEP},
APPOINT_ONE_DEPARTMENT_ID = #{APPOINT_ONE_DEPARTMENT_ID},
APPOINT_ONE_DEPARTMENT_NAME = #{APPOINT_ONE_DEPARTMENT_NAME},
APPOINT_ONE_USER_ID = #{APPOINT_ONE_USER_ID},
APPOINT_ONE_USER_NAME = #{APPOINT_ONE_USER_NAME},
APPOINT_ONE_STATUS = #{APPOINT_ONE_STATUS},
APPOINT_ONE_OPINION = #{APPOINT_ONE_OPINION},
APPOINT_ONE_TIME = #{APPOINT_ONE_TIME},
APPOINT_TWO_CORP_ID = #{APPOINT_TWO_CORP_ID},
APPOINT_TWO_CORP_NAME = #{APPOINT_TWO_CORP_NAME},
APPOINT_TWO_DEPARTMENT_ID = #{APPOINT_TWO_DEPARTMENT_ID},
APPOINT_TWO_DEPARTMENT_NAME = #{APPOINT_TWO_DEPARTMENT_NAME},
APPOINT_TWO_USER_ID = #{APPOINT_TWO_USER_ID},
APPOINT_TWO_USER_NAME = #{APPOINT_TWO_USER_NAME},
APPOINT_TWO_TIME = #{APPOINT_TWO_TIME},
APPOINT_THREE_CORP_ID = #{APPOINT_THREE_CORP_ID},
APPOINT_THREE_CORP_NAME = #{APPOINT_THREE_CORP_NAME},
APPOINT_THREE_DEPARTMENT_ID = #{APPOINT_THREE_DEPARTMENT_ID},
APPOINT_THREE_DEPARTMENT_NAME = #{APPOINT_THREE_DEPARTMENT_NAME},
APPOINT_THREE_USER_ID = #{APPOINT_THREE_USER_ID},
APPOINT_THREE_USER_NAME = #{APPOINT_THREE_USER_NAME},
APPOINT_THREE_STATUS = #{APPOINT_THREE_STATUS},
APPOINT_THREE_OPINION = #{APPOINT_THREE_OPINION},
APPOINT_THREE_TIME = #{APPOINT_THREE_TIME},
APPOINT_FOUR_CORP_ID = #{APPOINT_FOUR_CORP_ID},
APPOINT_FOUR_CORP_NAME = #{APPOINT_FOUR_CORP_NAME},
APPOINT_FOUR_DEPARTMENT_ID = #{APPOINT_FOUR_DEPARTMENT_ID},
APPOINT_FOUR_DEPARTMENT_NAME = #{APPOINT_FOUR_DEPARTMENT_NAME},
APPOINT_FOUR_USER_ID = #{APPOINT_FOUR_USER_ID},
APPOINT_FOUR_USER_NAME = #{APPOINT_FOUR_USER_NAME},
APPOINT_FOUR_STATUS = #{APPOINT_FOUR_STATUS},
APPOINT_FOUR_OPINION = #{APPOINT_FOUR_OPINION},
APPOINT_FIVE_CORP_ID = #{APPOINT_FIVE_CORP_ID},
APPOINT_FIVE_CORP_NAME = #{APPOINT_FIVE_CORP_NAME},
APPOINT_FIVE_DEPARTMENT_ID = #{APPOINT_FIVE_DEPARTMENT_ID},
APPOINT_FIVE_DEPARTMENT_NAME = #{APPOINT_FIVE_DEPARTMENT_NAME},
APPOINT_FIVE_USER_ID = #{APPOINT_FIVE_USER_ID},
APPOINT_FIVE_USER_NAME = #{APPOINT_FIVE_USER_NAME},
APPOINT_FIVE_STATUS = #{APPOINT_FIVE_STATUS},
APPOINT_FIVE_OPINION = #{APPOINT_FIVE_OPINION},
APPOINT_SIX_CORP_ID = #{APPOINT_SIX_CORP_ID},
APPOINT_SIX_CORP_NAME = #{APPOINT_SIX_CORP_NAME},
APPOINT_SIX_DEPARTMENT_ID = #{APPOINT_SIX_DEPARTMENT_ID},
APPOINT_SIX_DEPARTMENT_NAME = #{APPOINT_SIX_DEPARTMENT_NAME},
APPOINT_SIX_USER_ID = #{APPOINT_SIX_USER_ID},
APPOINT_SIX_USER_NAME = #{APPOINT_SIX_USER_NAME},
APPOINT_SIX_STATUS = #{APPOINT_SIX_STATUS},
APPOINT_SIX_OPINION = #{APPOINT_SIX_OPINION},
APPOINT_SEVEN_CORP_ID = #{APPOINT_SEVEN_CORP_ID},
APPOINT_SEVEN_CORP_NAME = #{APPOINT_SEVEN_CORP_NAME},
APPOINT_SEVEN_DEPARTMENT_ID = #{APPOINT_SEVEN_DEPARTMENT_ID},
APPOINT_SEVEN_DEPARTMENT_NAME = #{APPOINT_SEVEN_DEPARTMENT_NAME},
APPOINT_SEVEN_USER_ID = #{APPOINT_SEVEN_USER_ID},
APPOINT_SEVEN_USER_NAME = #{APPOINT_SEVEN_USER_NAME},
APPOINT_SEVEN_STATUS = #{APPOINT_SEVEN_STATUS},
APPOINT_SEVEN_OPINION = #{APPOINT_SEVEN_OPINION}
where a.FLOWS_ID = #{FLOWS_ID}
</update>
<!-- 分页查询 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select * from xgf_flows a where a.IS_DELETE = '0'
</select>
<select id="findById" parameterType="pd" resultType="pd">
select * from xgf_flows a where a.FLOWS_ID = #{FLOWS_ID}
</select>
</mapper>

View File

@ -63,18 +63,7 @@
f.IS_BF,
f.IS_SOCIAL,
f.SOCIAL_NUMBER,
f.zzName,
f.APPOINT_DEPARTMENT_ID,
f.APPOINT_DEPARTMENT_NAME,
f.APPOINT_USER_ID,
f.APPOINT_USER_NAME,
f.APPOINT_ONE_CORP_ID,
f.APPOINT_ONE_CORP_NAME,
f.APPOINT_ONE_DEPARTMENT_ID,
f.APPOINT_ONE_DEPARTMENT_NAME,
f.APPOINT_ONE_USER_ID,
f.APPOINT_ONE_USER_NAME
f.zzName
</sql>
<!-- 字段用于新增 -->
@ -133,17 +122,7 @@
IS_BF,
IS_SOCIAL,
SOCIAL_NUMBER,
zzName,
APPOINT_DEPARTMENT_ID,
APPOINT_DEPARTMENT_NAME,
APPOINT_USER_ID,
APPOINT_USER_NAME,
APPOINT_ONE_CORP_ID,
APPOINT_ONE_CORP_NAME,
APPOINT_ONE_DEPARTMENT_ID,
APPOINT_ONE_DEPARTMENT_NAME,
APPOINT_ONE_USER_ID,
APPOINT_ONE_USER_NAME
zzName
</sql>
<!-- 字段值 -->
@ -202,17 +181,7 @@
#{IS_BF},
#{IS_SOCIAL},
#{SOCIAL_NUMBER},
#{zzName},
#{APPOINT_DEPARTMENT_ID},
#{APPOINT_DEPARTMENT_NAME},
#{APPOINT_USER_ID},
#{APPOINT_USER_NAME},
#{APPOINT_ONE_CORP_ID},
#{APPOINT_ONE_CORP_NAME},
#{APPOINT_ONE_DEPARTMENT_ID},
#{APPOINT_ONE_DEPARTMENT_NAME},
#{APPOINT_ONE_USER_ID},
#{APPOINT_ONE_USER_NAME}
#{zzName}
</sql>
<!-- 新增-->
@ -295,17 +264,7 @@
IS_BF = #{IS_BF},
IS_SOCIAL = #{IS_SOCIAL},
SOCIAL_NUMBER = #{SOCIAL_NUMBER},
zzName = #{zzName},
APPOINT_DEPARTMENT_ID = #{APPOINT_DEPARTMENT_ID},
APPOINT_DEPARTMENT_NAME = #{APPOINT_DEPARTMENT_NAME},
APPOINT_USER_ID = #{APPOINT_USER_ID},
APPOINT_USER_NAME = #{APPOINT_USER_NAME},
APPOINT_ONE_CORP_ID = #{APPOINT_ONE_CORP_ID},
APPOINT_ONE_CORP_NAME = #{APPOINT_ONE_CORP_NAME},
APPOINT_ONE_DEPARTMENT_ID = #{APPOINT_ONE_DEPARTMENT_ID},
APPOINT_ONE_DEPARTMENT_NAME = #{APPOINT_ONE_DEPARTMENT_NAME},
APPOINT_ONE_USER_ID = #{APPOINT_ONE_USER_ID},
APPOINT_ONE_USER_NAME = #{APPOINT_ONE_USER_NAME}
zzName = #{zzName}
where
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID}
</update>

View File

@ -22,7 +22,8 @@
f.OPERATOR_TIME,
f.ISFLOW,
f.STUDY_STATUS,
f.CHECK_STATUS
f.CHECK_STATUS,
f.CHECK_STEP
</sql>
<!-- 字段用于新增 -->
@ -40,7 +41,8 @@
OPERATOR_TIME,
ISFLOW,
STUDY_STATUS,
CHECK_STATUS
CHECK_STATUS,
CHECK_STEP
</sql>
<!-- 字段值 -->
@ -58,7 +60,8 @@
#{OPERATOR_TIME},
#{ISFLOW},
#{STUDY_STATUS},
#{CHECK_STATUS}
#{CHECK_STATUS},
#{CHECK_STEP}
</sql>
<!-- 新增-->
@ -99,7 +102,8 @@
OPERATOR_TIME = #{OPERATOR_TIME},
ISFLOW = #{ISFLOW},
STUDY_STATUS = #{STUDY_STATUS},
CHECK_STATUS = #{CHECK_STATUS}
CHECK_STATUS = #{CHECK_STATUS},
CHECK_STEP = #{CHECK_STEP}
where
XGF_USER_ID = #{XGF_USER_ID}
</update>
@ -321,15 +325,18 @@
a.BELONG_TO_CORP_NAME,
a.USERNAME,
a.NAME,
b.MANAGER_DEPARTMENT_ID,
b.MANAGER_DEPARTMENT_NAME,
b.MAIN_DEPARTMENT_ID,
b.MAIN_DEPARTMENT_NAME
from
xgf_user a
left join xgf_user_details b on a.XGF_USER_ID = b.XGF_USER_ID
c.*
from xgf_user a
left join xgf_flows c on a.XGF_USER_ID = c.FLOWS_ID
where a.IS_DELETE = '0'
and (a.APPOINT_USER_ID = #{pd.USER_ID} or a.APPOINT_ONE_USER_ID is #{pd.USER_ID})
and (c.APPOINT_ONE_USER_ID = #{pd.USER_ID}
or c.APPOINT_TWO_USER_ID = #{pd.USER_ID}
or c.APPOINT_THREE_USER_ID = #{pd.USER_ID}
or c.APPOINT_FOUR_USER_ID = #{pd.USER_ID}
or c.APPOINT_FIVE_USER_ID = #{pd.USER_ID}
or c.APPOINT_SIX_USER_ID = #{pd.USER_ID}
or c.APPOINT_SEVEN_USER_ID = #{pd.USER_ID}
)
<if test="pd.STATUS != null and pd.STATUS != ''">
and a.STATUS = #{pd.STATUS}
</if>
@ -339,6 +346,9 @@
<if test="pd.CHECK_STATUS != null and pd.CHECK_STATUS != ''">
and a.CHECK_STATUS = #{pd.CHECK_STATUS}
</if>
<if test="pd.CHECK_STEP != null and pd.CHECK_STEP != ''">
and a.CHECK_STEP = #{pd.CHECK_STEP}
</if>
</select>
</mapper>