Commit 330495e2 authored by huyuchen's avatar huyuchen

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

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