Commit 59ebd1d6 authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent 10f90f65
......@@ -194,4 +194,19 @@ public class TEmployeeProjectController {
return tEmployeeProjectService.importListAdd(excelVOList, bindingResult, idAdd);
}
/**
* 批量更新项目档案信息
*
* @param excelVOList
* @return R<List>
* @Author huyc
* @Date 2022-06-21
**/
@Operation(description = "批量更新项目档案信息 hasPermission('archives_project_importListUpdate')")
@SysLog("批量更新项目档案信息")
@PostMapping("/importListUpate")
@PreAuthorize("@pms.hasPermission('archives_project_importListUpdate')")
public R<List<ErrorMessage>> importListUpate(@RequestExcel List<EmployeeProjectVO> excelVOList, BindingResult bindingResult) {
return tEmployeeProjectService.importEmpProjectUpdate(excelVOList, bindingResult);
}
}
......@@ -41,4 +41,8 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
List<TEmployeeInfo> getList(@Param("employeeInfo") TEmployeeInfo employeeInfo);
int updateEducationOfEmp(@Param("education") EmpEducationUpdateVo education);
void updateExcelEmployeeInfo(@Param("list") List<TEmployeeInfo> list);
int insertExcelEmployeeInfo(@Param("list") List<TEmployeeInfo> list);
}
......@@ -173,4 +173,72 @@
order by a.CREATE_TIME desc
</select>
<update id="updateExcelEmployeeInfo" parameterType="java.util.List">
update t_employee_info
<trim prefix="set" suffixOverrides=",">
<trim prefix="EMP_NATRUE =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.empNatrue!=null">
when ID=#{i.id} then #{i.empNatrue}
</if>
</foreach>
</trim>
<trim prefix="EMP_NAME =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.empName!=null">
when ID=#{i.id} then #{i.empName}
</if>
</foreach>
</trim>
<trim prefix="EMP_IDCARD =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.empIdcard!=null">
when ID=#{i.id} then #{i.empIdcard}
</if>
</foreach>
</trim>
<trim prefix="FILE_STATUS =case" suffix="end,">
<foreach collection="list" item="i" index="index">
when ID=#{i.id} then 0
</foreach>
</trim>
<trim prefix="UPDATE_TIME =case" suffix="end,">
<foreach collection="list" item="i" index="index">
when ID=#{i.id} then now()
</foreach>
</trim>
<trim prefix="UPDATE_BY =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.updateBy!=null">
when ID=#{i.id} then #{i.updateBy}
</if>
</foreach>
</trim>
</trim>
where
<foreach collection="list" separator="or" item="i" index="index" >
ID=#{i.id}
</foreach>
</update>
<insert id="insertExcelEmployeeInfo" parameterType="java.util.List">
insert into t_employee_info
(ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,FILE_STATUS,EMP_CODE,DELETE_FLAG,CREATE_BY,CREATE_NAME,CREATE_TIME)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
REPLACE(UUID(),"-",""),
#{item.empNatrue,jdbcType=VARCHAR},
#{item.empName,jdbcType=VARCHAR},
#{item.empIdcard,jdbcType=VARCHAR},
#{item.status,jdbcType=VARCHAR},
0,
#{item.empCode,jdbcType=VARCHAR},
#{item.deleteFlag,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR},
#{item.createName,jdbcType=VARCHAR},
now()
)
</foreach>
</insert>
</mapper>
dapr.upms.appUrl=http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.upms.appUrl=http://localhost:3500/v1.0/invoke/
dapr.upms.appId=yifu-upms
dapr.upms.appPort=4000
dapr.upms.httpPort=3500
dapr.upms.grpcPort=52000
dapr.upms.metricsPort=9094
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