|
|
@@ -1,12 +1,17 @@
|
|
|
package com.lc.ibps.components.employee.provider;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
+import com.lc.ibps.base.core.util.Collections;
|
|
|
+import com.lc.ibps.base.core.util.string.StringUtil;
|
|
|
import com.lc.ibps.base.framework.persistence.entity.AbstractPo;
|
|
|
+import com.lc.ibps.base.framework.table.ICommonDao;
|
|
|
import com.lc.ibps.cloud.utils.QueryFilterUtil;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
@@ -46,6 +51,8 @@ public class EmployeeInfoProvider extends GenericProvider implements IEmployeeIn
|
|
|
|
|
|
@Resource
|
|
|
private EmployeeInfoRepository employeeInfoRepository;
|
|
|
+ @Resource
|
|
|
+ private ICommonDao commonDao;
|
|
|
|
|
|
@ApiOperation(value = "人员信息表列表(分页条件查询)数据", notes = "人员信息表列表(分页条件查询)数据")
|
|
|
@Override
|
|
|
@@ -119,6 +126,27 @@ public class EmployeeInfoProvider extends GenericProvider implements IEmployeeIn
|
|
|
EmployeeInfo domain = employeeInfoRepository.newInstance(employeeInfoPo);
|
|
|
domain.saveCascade();
|
|
|
result.setMessage("保存人员信息表成功");
|
|
|
+ // 个人档案卡#更新时间:2026-07-07 15:09:03#"timeLimit":3,"dept":""
|
|
|
+ //修改流程的sub,个人档案特殊手动维护sub
|
|
|
+ String name = employeeInfoPo.getName();
|
|
|
+ String userId = employeeInfoPo.getId();
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ String createTime = sdf.format(employeeInfoPo.getCreateTime());
|
|
|
+ //查出用户的主部门
|
|
|
+ String sql=" SELECT MAIN_PID_ FROM IBPS_PARTY_REL WHERE SUB_PID_ = '"+userId+"' AND BIZ_ = 'mainPost' limit 1 ";
|
|
|
+ List<Map<String,Object>> query = (List<Map<String,Object>>)commonDao.query(sql);
|
|
|
+ String pid = query.get(0).get("MAIN_PID_").toString();
|
|
|
+ String subject = "个人档案卡"+"#员工姓名:"+name+"编制时间:"+createTime+"#"+"\"timeLimit\":3,\"dept\":\""+pid+"\"";
|
|
|
+ String select = "SELECT i.ID_ as inst_id_,t.ID_ as t_id_ FROM IBPS_BPM_INST i JOIN IBPS_BPM_TASKS t on i.ID_ = t.PROC_INST_ID_ WHERE i.PROC_DEF_KEY_ ='Process_0v35zf8' AND i.CREATE_BY_ = '1169304256906264576' limit 1";
|
|
|
+ List<Map<String,Object>> bpm = (List<Map<String,Object>>)commonDao.query(select);
|
|
|
+ if(Collections.isNotEmpty(bpm) && StringUtil.isNotEmpty(bpm.get(0).get("inst_id_").toString()) && StringUtil.isNotEmpty(bpm.get(0).get("t_id_").toString())){
|
|
|
+ String update = "UPDATE IBPS_BPM_INST SET SUBJECT_ = '" +subject+"' where ID_ = '"+ bpm.get(0).get("inst_id_").toString() +"'";
|
|
|
+ String upTask = "UPDATE IBPS_BPM_TASKS SET SUBJECT_ = '" +subject+"' where ID_ = '"+ bpm.get(0).get("t_id_").toString() +"'";
|
|
|
+ String upHis = "UPDATE IBPS_BPM_INST_HIS SET SUBJECT_ = '" +subject+"' where ID_ = '"+ bpm.get(0).get("inst_id_").toString() +"'";
|
|
|
+ commonDao.execute(update);
|
|
|
+ commonDao.execute(upTask);
|
|
|
+ commonDao.execute(upHis);
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
setExceptionResult(result, StateEnum.ERROR.getCode(), StateEnum.ERROR.getText(), e);
|
|
|
}
|