Commit 330495e2 authored by huyuchen's avatar huyuchen

项目档案批量操作速度优化

parent 81143817
...@@ -185,9 +185,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -185,9 +185,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeProject.setUnitId(tSettleDomain.getCustomerId()); tEmployeeProject.setUnitId(tSettleDomain.getCustomerId());
tEmployeeProject.setUnitNo(tSettleDomain.getCustomerNo()); tEmployeeProject.setUnitNo(tSettleDomain.getCustomerNo());
tEmployeeProject.setUnitName(tSettleDomain.getCustomerName()); tEmployeeProject.setUnitName(tSettleDomain.getCustomerName());
String empNO = getEmpNo(tEmployeeProject.getDeptNo());
tEmployeeProject.setEmpNo(empNO);
} }
String empNO = getEmpNo(tEmployeeProject.getDeptNo());
tEmployeeProject.setEmpNo(empNO);
tEmployeeProject.setEmpId(tEmployeeInfo.getId()); tEmployeeProject.setEmpId(tEmployeeInfo.getId());
tEmployeeProject.setProjectSource(CommonConstants.dingleDigitStrArray[5]); tEmployeeProject.setProjectSource(CommonConstants.dingleDigitStrArray[5]);
this.save(tEmployeeProject); this.save(tEmployeeProject);
...@@ -706,9 +706,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -706,9 +706,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TSettleDomain tSettleDomain; TSettleDomain tSettleDomain;
TEmployeeInfo tEmployeeInfo; TEmployeeInfo tEmployeeInfo;
TEmployeeProject tEmployeeProject; TEmployeeProject tEmployeeProject;
EmployeeProjectVO excel;
// 执行数据插入操作 组装 PostDto // 执行数据插入操作 组装 PostDto
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
EmployeeProjectVO excel = excelVOList.get(i); excel = excelVOList.get(i);
idCard = excel.getEmpIdcard(); idCard = excel.getEmpIdcard();
deptNo = excel.getDeptNo(); deptNo = excel.getDeptNo();
...@@ -1007,10 +1008,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1007,10 +1008,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
insTEmployeePro.setUnitId(tSettleDomain.getCustomerId()); insTEmployeePro.setUnitId(tSettleDomain.getCustomerId());
insTEmployeePro.setUnitNo(tSettleDomain.getCustomerNo()); insTEmployeePro.setUnitNo(tSettleDomain.getCustomerNo());
insTEmployeePro.setUnitName(tSettleDomain.getCustomerName()); insTEmployeePro.setUnitName(tSettleDomain.getCustomerName());
String empNO = getEmpNo(insTEmployeePro.getDeptNo());
insTEmployeePro.setEmpNo(empNO);
} }
String empNO = getEmpNo(insTEmployeePro.getDeptNo());
insTEmployeePro.setEmpNo(empNO);
//员工编码生成规则 //员工编码生成规则
insTEmployeePro.setEmpCode(tEmployeeInfo.getEmpCode()); insTEmployeePro.setEmpCode(tEmployeeInfo.getEmpCode());
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
......
...@@ -762,27 +762,10 @@ ...@@ -762,27 +762,10 @@
</update> </update>
<!--查询部门编码和最大员工数--> <!--查询部门编码和最大员工数-->
<select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String"> <select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String">
SELECT select MAX(EMP_NO) from t_employee_project where
( id not like '%abc' and
SELECT DEPT_NO = #{deptNo}
MAX(EMP_NO) GROUP BY DEPT_NO
FROM
t_employee_project
WHERE
EMP_NO LIKE CONCAT(
(
SELECT
DEPART_NO
FROM
t_settle_domain
WHERE
DEPART_NO = #{deptNo}
),
'%'
)
) AS 'empNo'
FROM
DUAL
</select> </select>
<update id="updateEmpIdById" parameterType="java.util.List"> <update id="updateEmpIdById" parameterType="java.util.List">
......
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