bug修复
parent
7360ba8cca
commit
d8f38ffdcd
|
@ -3,8 +3,10 @@ package com.zcloud.controller.xgf;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.service.xgf.TrainUsersService;
|
||||||
import com.zcloud.service.xgf.TrainingBatchService;
|
import com.zcloud.service.xgf.TrainingBatchService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -29,9 +31,12 @@ public class FlowTrainController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private TrainingBatchService trainingbatchService;
|
private TrainingBatchService trainingbatchService;
|
||||||
|
|
||||||
@RequestMapping(value="/batchList")
|
@Resource
|
||||||
|
private TrainUsersService trainUsersService;
|
||||||
|
|
||||||
|
@RequestMapping(value = "/batchList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object batchList(Page page) throws Exception{
|
public Object batchList(Page page) throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
|
@ -45,37 +50,46 @@ public class FlowTrainController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value="/batchUserList")
|
@RequestMapping(value = "/batchUserList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object batchUserList(Page page) throws Exception{
|
public Object batchUserList(Page page) throws Exception {
|
||||||
|
PageData request = this.getPageData();
|
||||||
|
PageData condition = new PageData();
|
||||||
|
condition.put("TRAINING_BATCH_ID", request.get("TRAINING_BATCH_ID"));
|
||||||
|
page.setPd(condition);
|
||||||
|
List<PageData> varList = trainingbatchService.batchUserlistPage(page);
|
||||||
|
|
||||||
|
PageData response = new PageData();
|
||||||
|
response.put("varList", varList);
|
||||||
|
response.put("page", page);
|
||||||
|
response.put("total", page.getTotalResult());
|
||||||
|
response.put("result", "success");
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/batchAudit")
|
||||||
|
@ResponseBody
|
||||||
|
public Object batchAudit(Page page) throws Exception {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/batchUserList" +getPageUrl(page), pd);
|
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/audit", pd);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value="/batchAudit")
|
private String getPageUrl(Page page) {
|
||||||
@ResponseBody
|
return "?showCount=" + page.getShowCount() + "¤tPage=" + page.getUrlCurrentPage();
|
||||||
public Object batchAudit(Page page) throws Exception{
|
|
||||||
PageData pd = new PageData();
|
|
||||||
pd = this.getPageData();
|
|
||||||
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/audit" , pd);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getPageUrl(Page page){
|
|
||||||
return "?showCount=" +page.getShowCount() + "¤tPage=" + page.getUrlCurrentPage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分公司端-相关方流动人员培训审核-查看用户信息
|
* 分公司端-相关方流动人员培训审核-查看用户信息
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/getUserDetailById")
|
@RequestMapping(value = "/getUserDetailById")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getCorpUserList() throws Exception{
|
public Object getCorpUserList() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -83,24 +97,55 @@ public class FlowTrainController extends BaseController {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value="/approveUser")
|
@RequestMapping(value = "/approveUser")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object approveUser() throws Exception{
|
public Object approveUser() throws Exception {
|
||||||
PageData pd = new PageData();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd.put("loginUserId",Jurisdiction.getUSER_ID());
|
trainUsersService.approveUser(pd);
|
||||||
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainusers/approveUser", pd);
|
map.put("result", "success");
|
||||||
return result;
|
return map;
|
||||||
}
|
}
|
||||||
@RequestMapping(value="/getDetailsById")
|
|
||||||
|
@RequestMapping(value = "/getDetailsById")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getDetailsById() throws Exception{
|
public Object getDetailsById() throws Exception {
|
||||||
PageData pd = new PageData();
|
PageData request = this.getPageData();
|
||||||
pd = this.getPageData();
|
PageData condition = new PageData();
|
||||||
if(!Jurisdiction.getUsername().equals("admin")){
|
condition.put("TRAINING_BATCH_ID", request.get("TRAINING_BATCH_ID"));
|
||||||
pd.put("AUDIT_USER_ID", Jurisdiction.getUSER_ID());
|
PageData entity = trainingbatchService.findById(condition);
|
||||||
|
switch (entity.getString("STEP_STATUS")) {
|
||||||
|
case "0":
|
||||||
|
if (entity.getString("TERRITORIALITY_USER_ID").equals(Jurisdiction.getUSER_ID())) {
|
||||||
|
entity.put("step", "TERRITORIALITY_STATE");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "1":
|
||||||
|
if (entity.getString("MANAGER_USER_ID").equals(Jurisdiction.getUSER_ID())) {
|
||||||
|
entity.put("step", "MANAGER_STATE");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
if (entity.getString("SUPERVISION_USER_ID").equals(Jurisdiction.getUSER_ID())) {
|
||||||
|
entity.put("step", "SUPERVISION_STATE");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
Map result = HttpClientService.doPost(xgfUrl+ "/openApi/trainingbatch/getDetailsById", pd);
|
PageData response = new PageData();
|
||||||
return result;
|
response.put("pd", entity);
|
||||||
|
response.put("result", "success");
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/endApproval")
|
||||||
|
@ResponseBody
|
||||||
|
public Object endApproval() throws Exception {
|
||||||
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
PageData pd = this.getPageData();
|
||||||
|
trainUsersService.endApproval(pd);
|
||||||
|
map.put("result", "success");
|
||||||
|
return map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ public interface XgfUserMapper {
|
||||||
|
|
||||||
void updateStatusByUnflowTrain(PageData pd);
|
void updateStatusByUnflowTrain(PageData pd);
|
||||||
|
|
||||||
void bantchUpdateStatus(int i, String[] userids);
|
void bantchUpdateStatus(int STATUS, String[] arrayDATA_ids);
|
||||||
|
|
||||||
void updateStatusByFlowTrain(PageData pd);
|
void updateStatusByFlowTrain(PageData pd);
|
||||||
|
|
||||||
|
|
|
@ -92,8 +92,9 @@ public interface TrainUsersService{
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public Integer approveUser(PageData pd)throws Exception;
|
public void approveUser(PageData pd)throws Exception;
|
||||||
List<PageData> findinfoByCondition(PageData condition) throws Exception;
|
List<PageData> findinfoByCondition(PageData condition) throws Exception;
|
||||||
|
|
||||||
|
void endApproval(PageData pd) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,162 +144,53 @@ public class TrainUsersServiceImpl implements TrainUsersService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer approveUser(PageData pd) throws Exception {
|
public void approveUser(PageData pd) throws Exception {
|
||||||
String type = pd.getString("type"); //1、集团单位,2、企业端,3、监管端
|
|
||||||
String TRAINUSERS_ID = pd.getString("TRAINUSERS_ID"); //培训批次 详情id
|
|
||||||
String STATE = pd.getString("IS_STATE"); // 审批状态 0:不合格;1:合格;
|
|
||||||
|
|
||||||
String OPINION = pd.getString("OPINION"); // 审批意见
|
|
||||||
Integer userCount = Integer.parseInt(pd.getString("USER_COUNT")); // 批次的人数
|
|
||||||
String[] userids = new String[1]; // 被审批人
|
|
||||||
userids[0] = pd.getString("USER_ID");
|
|
||||||
PageData trainusersPd = trainusersMapper.getPdById(pd); //培训 详情信息
|
|
||||||
PageData appPd = new PageData();
|
|
||||||
appPd.put("TRAINUSERS_ID", trainusersPd.getString("TRAINUSERS_ID"));
|
|
||||||
appPd.put("STATUS", "1");
|
|
||||||
/*2023-12-06 liu jun 需求便跟*/
|
|
||||||
PageData batch = trainingBatchMapper.findById(pd);
|
|
||||||
// 如果
|
|
||||||
if ("0".equals(STATE)) {
|
|
||||||
appPd.put("STATUS", "-1");
|
|
||||||
userids[0] = pd.getString("USER_ID");
|
|
||||||
xgfUserMapper.bantchUpdateStatus(0, userids);
|
|
||||||
}
|
|
||||||
if (trainusersPd.get("STEP_STATUS") == null || trainusersPd.get("STEP_STATUS").equals("0")) {
|
|
||||||
if (pd.getString("loginUserId").equals(batch.getString("TERRITORIALITY_USER_ID"))) {
|
|
||||||
appPd.put("TERRITORIALITY_STATE", STATE);
|
|
||||||
appPd.put("TERRITORIALITY_OPINION", OPINION);
|
|
||||||
appPd.put("TERRITORIALITY_TIME", DateUtil.getTime());
|
|
||||||
appPd.put("STEP_STATUS", "1");
|
|
||||||
trainusersMapper.approveTerritoriality(appPd);
|
|
||||||
} else {
|
|
||||||
throw new RuntimeException("当前用户不是集团单位指定审批人,无法进行审批");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (trainusersPd.get("STEP_STATUS") != null && trainusersPd.get("STEP_STATUS").equals("1")) {
|
|
||||||
if (pd.getString("loginUserId").equals(batch.getString("MANAGER_USER_ID"))) {
|
|
||||||
appPd.put("MANAGER_STATE", STATE);
|
|
||||||
appPd.put("MANAGER_OPINION", OPINION);
|
|
||||||
appPd.put("MANAGER_TIME", DateUtil.getTime());
|
|
||||||
appPd.put("STEP_STATUS", "2");
|
|
||||||
trainusersMapper.approveManager(appPd);
|
|
||||||
} else {
|
|
||||||
throw new RuntimeException("当前用户不是股份主管部门指定审批人,无法进行审批");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (trainusersPd.get("STEP_STATUS") != null && trainusersPd.get("STEP_STATUS").equals("2")) {
|
|
||||||
if (pd.getString("loginUserId").equals(batch.getString("SUPERVISION_USER_ID"))) {
|
|
||||||
appPd.put("SUPERVISION_STATE", STATE);
|
|
||||||
appPd.put("SUPERVISION_OPINION", OPINION);
|
|
||||||
appPd.put("SUPERVISION_TIME", DateUtil.getTime());
|
|
||||||
appPd.put("STEP_STATUS", "3");
|
|
||||||
trainusersMapper.approveSupervision(appPd);
|
|
||||||
} else {
|
|
||||||
throw new RuntimeException("当前用户不是股份安监部门,无法进行审批");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 如果审批全部通过 */
|
|
||||||
Integer stateCountInt = 0; //审批了几次, 如果是审批了3次.这个人审批完成
|
|
||||||
Integer stateTongguoInt = 0; //审批通过次数
|
|
||||||
String sate1 = trainusersPd.getString("SUPERVISION_STATE");
|
|
||||||
String sate2 = trainusersPd.getString("MANAGER_STATE");
|
|
||||||
String sate3 = trainusersPd.getString("TERRITORIALITY_STATE");
|
|
||||||
if (!Tools.isEmpty(sate1)) { //如果有审批状态 就是审批过的数据
|
|
||||||
stateCountInt++;
|
|
||||||
}
|
|
||||||
if (!Tools.isEmpty(sate2)) { //如果有审批状态 就是审批过的数据
|
|
||||||
stateCountInt++;
|
|
||||||
}
|
|
||||||
if (!Tools.isEmpty(sate3)) { //如果有审批状态 就是审批过的数据
|
|
||||||
stateCountInt++;
|
|
||||||
}
|
|
||||||
if ("1".equals(sate1)) {
|
|
||||||
stateTongguoInt++;
|
|
||||||
}
|
|
||||||
if ("1".equals(sate2)) {
|
|
||||||
stateTongguoInt++;
|
|
||||||
}
|
|
||||||
if ("1".equals(sate3)) {
|
|
||||||
stateTongguoInt++;
|
|
||||||
}
|
|
||||||
|
|
||||||
//如果其中一个人打回,则结束审批流程
|
|
||||||
if ("0".equals(STATE)) {
|
|
||||||
stateCountInt = 3;
|
|
||||||
}
|
|
||||||
if (3 == stateCountInt) { //这个人的审批全部
|
|
||||||
PageData statePd = new PageData();
|
|
||||||
statePd.put("TRAINUSERS_ID", TRAINUSERS_ID);
|
|
||||||
String STATUS = "-1"; //培训状态0未培训1培训中2培训通过-1培训未通过
|
|
||||||
if (3 == stateTongguoInt) {
|
|
||||||
STATUS = "2";
|
|
||||||
statePd.put("STATUS", STATUS);
|
|
||||||
trainusersMapper.updateStatus(statePd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 这个批次全部审批完成
|
|
||||||
Integer wanchengPingshen = trainusersMapper.getCountByWanchengPingshen(trainusersPd);
|
|
||||||
|
|
||||||
if (wanchengPingshen == userCount) { //已经审批的数据量 和 批次的人数一致的时候,修改批次的状态
|
|
||||||
PageData trainingBatchPd = trainingBatchMapper.findById(trainusersPd);
|
|
||||||
trainingBatchPd.put("AUDIT_STATUS", "2"); //业务修改 ,现在只有 2培训中 3培训完成
|
|
||||||
trainingBatchMapper.edit(trainingBatchPd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*保存审批流*/
|
|
||||||
PageData condition = new PageData();
|
PageData condition = new PageData();
|
||||||
condition.put("FOREIGN_KEY", trainusersPd.getString("TRAININGBATCH_ID"));
|
condition.put("TRAIN_USERS_ID", pd.get("TRAIN_USERS_ID"));
|
||||||
PageData flow = flowMapper.findByCondition(condition);
|
PageData userEntity = trainusersMapper.findById(condition);
|
||||||
if (flow == null) {
|
switch (userEntity.getString("STEP_STATUS")){
|
||||||
System.out.println("历史数据======不做处理");
|
case "0":
|
||||||
} else {
|
userEntity.put("TERRITORIALITY_STATE", pd.getString("IS_STATE"));
|
||||||
condition.clear();
|
userEntity.put("TERRITORIALITY_OPINION", pd.getString("OPINION"));
|
||||||
condition.put("FLOW_ID", flow.getString("FLOW_ID"));
|
userEntity.put("TERRITORIALITY_TIME", DateUtil.getTime());
|
||||||
condition.put("FOREIGN_KEY", trainusersPd.getString("TRAINUSERS_ID"));
|
break;
|
||||||
condition.put("STEP_FLAG", "1");
|
case "1":
|
||||||
PageData step = flowDetailMapper.selectOne(condition);
|
userEntity.put("MANAGER_STATE", pd.getString("IS_STATE"));
|
||||||
if (step == null) {
|
userEntity.put("MANAGER_OPINION", pd.getString("OPINION"));
|
||||||
condition.clear();
|
userEntity.put("MANAGER_TIME", DateUtil.getTime());
|
||||||
condition.put("FLOW_ID", flow.getString("FLOW_ID"));
|
break;
|
||||||
condition.put("PARENT_ID", "0");
|
case "3":
|
||||||
step = flowDetailMapper.selectOne(condition);
|
userEntity.put("SUPERVISION_STATE", pd.getString("IS_STATE"));
|
||||||
}
|
userEntity.put("SUPERVISION_OPINION", pd.getString("OPINION"));
|
||||||
step.put("STEP_FLAG", "0");
|
userEntity.put("SUPERVISION_TIME", DateUtil.getTime());
|
||||||
flowDetailMapper.edit(step);
|
break;
|
||||||
|
|
||||||
PageData nextStep = new PageData();
|
|
||||||
nextStep.put("FLOW_DETAIL_ID", Warden.get32UUID());
|
|
||||||
nextStep.put("FLOW_ID", flow.getString("FLOW_ID"));
|
|
||||||
nextStep.put("STEP_FLAG", "1");
|
|
||||||
nextStep.put("PARENT_ID", step.getString("FLOW_DETAIL_ID"));
|
|
||||||
nextStep.put("FOREIGN_KEY", trainusersPd.getString("TRAINUSERS_ID"));
|
|
||||||
nextStep.put("STEP_NAME", "培训审核");
|
|
||||||
nextStep.put("SORT", (Integer) step.get("SORT") + 1);
|
|
||||||
nextStep.put("CREATE_TIME", DateUtil.date2Str(new Date()));
|
|
||||||
nextStep.put("APPROVER_ID", pd.getString("APPROVER_ID"));
|
|
||||||
nextStep.put("APPROVER_NAME", pd.getString("APPROVER_NAME"));
|
|
||||||
nextStep.put("APPROVER_OPINION", OPINION);
|
|
||||||
nextStep.put("APPROVER_TIME", DateUtil.getTime());
|
|
||||||
nextStep.put("APPROVER_CORPINFO_ID", pd.getString("APPROVER_CORPINFO_ID"));
|
|
||||||
nextStep.put("APPROVER_CORPINFO_NAME", pd.getString("APPROVER_CORPINFO_NAME"));
|
|
||||||
nextStep.put("PASS_FLAG", STATE);
|
|
||||||
if (3 == stateCountInt) {
|
|
||||||
nextStep.put("IS_END", "1");
|
|
||||||
} else {
|
|
||||||
nextStep.put("IS_END", "0");
|
|
||||||
}
|
|
||||||
nextStep.put("ISDELETE", "0");
|
|
||||||
nextStep.put("FOREIGN_KEY", trainusersPd.getString("TRAINUSERS_ID"));
|
|
||||||
flowDetailMapper.save(nextStep);
|
|
||||||
}
|
}
|
||||||
|
if ("0".equals(pd.getString("IS_STATE"))) {
|
||||||
return 0;
|
userEntity.put("STEP_STATUS", '-' + userEntity.getString("STEP_STATUS"));
|
||||||
|
userEntity.put("RESULT_STATUS","3");
|
||||||
|
} else {
|
||||||
|
int stepNumber = Integer.parseInt(userEntity.getString("STEP_STATUS")) + 1;
|
||||||
|
if (stepNumber == 3){
|
||||||
|
userEntity.put("RESULT_STATUS","2");
|
||||||
|
}
|
||||||
|
userEntity.put("STEP_STATUS", Integer.toString(stepNumber));
|
||||||
|
}
|
||||||
|
trainusersMapper.edit(userEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PageData> findinfoByCondition(PageData condition) throws Exception {
|
public List<PageData> findinfoByCondition(PageData condition) throws Exception {
|
||||||
return trainusersMapper.findinfoByCondition(condition);
|
return trainusersMapper.findinfoByCondition(condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void endApproval(PageData pd) throws Exception {
|
||||||
|
PageData condition = new PageData();
|
||||||
|
condition.put("TRAINING_BATCH_ID",pd.getString("TRAINING_BATCH_ID"));
|
||||||
|
PageData entity = trainingBatchMapper.findById(condition);
|
||||||
|
int stepNumber = Integer.parseInt(entity.getString("STEP_STATUS"));
|
||||||
|
entity.put("STEP_STATUS",++stepNumber);
|
||||||
|
trainingBatchMapper.edit(entity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.zcloud.service.xgf.impl;
|
||||||
|
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.mapper.datasource.system.DepartmentMapper;
|
||||||
import com.zcloud.mapper.datasource.system.UsersMapper;
|
import com.zcloud.mapper.datasource.system.UsersMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.*;
|
import com.zcloud.mapper.datasource.xgf.*;
|
||||||
import com.zcloud.service.xgf.TrainingBatchService;
|
import com.zcloud.service.xgf.TrainingBatchService;
|
||||||
|
@ -42,8 +43,11 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
@Resource
|
@Resource
|
||||||
private FlowDetailMapper flowDetailMapper;
|
private FlowDetailMapper flowDetailMapper;
|
||||||
|
|
||||||
// @Value("${prevention.api.url}")
|
@Resource
|
||||||
// private String preventionUrl;
|
private UsersMapper usersMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DepartmentMapper departmentMapper;
|
||||||
|
|
||||||
/**新增
|
/**新增
|
||||||
* @param pd
|
* @param pd
|
||||||
|
@ -53,7 +57,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
/* 保存主题信息 */
|
/* 保存主题信息 */
|
||||||
String batch_id=UuidUtil.get32UUID();
|
String batch_id=UuidUtil.get32UUID();
|
||||||
String train_area=pd.getString("TRAIN_AREA");
|
String train_area=pd.getString("TRAIN_AREA");
|
||||||
pd.put("TRAININGBATCH_ID", batch_id); //主键
|
pd.put("TRAINING_BATCH_ID", batch_id); //主键
|
||||||
pd.put("CREATOR", Jurisdiction.getUsername()); //添加人
|
pd.put("CREATOR", Jurisdiction.getUsername()); //添加人
|
||||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
|
@ -69,14 +73,45 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
PageData cpd = trainingbatchMapper.getCode(pd); //根据ID读取
|
PageData cpd = trainingbatchMapper.getCode(pd); //根据ID读取
|
||||||
String code = year + "-" + month + "-" + dft.format((Integer.parseInt(cpd.get("code").toString())+1));
|
String code = year + "-" + month + "-" + dft.format((Integer.parseInt(cpd.get("code").toString())+1));
|
||||||
pd.put("BATCH_NAME",code);
|
pd.put("BATCH_NAME",code);
|
||||||
|
/*翻译*/
|
||||||
|
PageData condition = new PageData();
|
||||||
|
condition.put("USER_ID",pd.get("SUPERVISION_USER_ID"));
|
||||||
|
PageData supUser = usersMapper.getUserInfo(condition);
|
||||||
|
pd.put("SUPERVISION_USER_NAME",supUser.get("NAME"));
|
||||||
|
|
||||||
|
condition.clear();
|
||||||
|
condition.put("DEPARTMENT_ID",pd.get("SUPERVISION"));
|
||||||
|
PageData supDepartment = departmentMapper.getInfo(condition);
|
||||||
|
pd.put("SUPERVISION_DEPARTMENT_NAME",supDepartment.get("NAME"));
|
||||||
|
|
||||||
|
condition.clear();
|
||||||
|
condition.put("USER_ID",pd.get("MANAGER_USER_ID"));
|
||||||
|
PageData manUser = usersMapper.getUserInfo(condition);
|
||||||
|
pd.put("MANAGER_USER_NAME",manUser.get("NAME"));
|
||||||
|
|
||||||
|
condition.clear();
|
||||||
|
condition.put("DEPARTMENT_ID",pd.get("MANAGER"));
|
||||||
|
PageData manDepartment = departmentMapper.getInfo(condition);
|
||||||
|
pd.put("MANAGER_DEPARTMENT_NAME",manDepartment.get("NAME"));
|
||||||
|
|
||||||
|
condition.clear();
|
||||||
|
condition.put("USER_ID",pd.get("TERRITORIALITY_USER_ID"));
|
||||||
|
PageData terUser = usersMapper.getUserInfo(condition);
|
||||||
|
pd.put("TERRITORIALITY_USER_NAME",terUser.get("NAME"));
|
||||||
|
|
||||||
|
condition.clear();
|
||||||
|
condition.put("DEPARTMENT_ID",pd.get("TERRITORIALITY"));
|
||||||
|
PageData terDepartment = departmentMapper.getInfo(condition);
|
||||||
|
pd.put("TERRITORIALITY_DEPARTMENT_NAME",terDepartment.get("NAME"));
|
||||||
|
pd.put("IS_DELETE","0");
|
||||||
|
pd.put("STEP_STATUS","0");
|
||||||
trainingbatchMapper.save(pd);
|
trainingbatchMapper.save(pd);
|
||||||
|
|
||||||
String ArrayDATA_IDS[] = pd.getString("users").split(",");
|
String arrayDATA_ids[] = pd.getString("users").split(",");
|
||||||
Arrays.asList(ArrayDATA_IDS).forEach(id -> {
|
Arrays.asList(arrayDATA_ids).forEach(id -> {
|
||||||
PageData user = new PageData();
|
PageData user = new PageData();
|
||||||
user.put("TRAINUSERS_ID", UuidUtil.get32UUID());
|
user.put("TRAIN_USERS_ID", UuidUtil.get32UUID());
|
||||||
user.put("TRAININGBATCH_ID", batch_id);
|
user.put("TRAINING_BATCH_ID", batch_id);
|
||||||
user.put("USER_ID", id);
|
user.put("USER_ID", id);
|
||||||
user.put("TRAIN_AREA", train_area);
|
user.put("TRAIN_AREA", train_area);
|
||||||
user.put("STATUS", 0);
|
user.put("STATUS", 0);
|
||||||
|
@ -84,9 +119,18 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
user.put("MANAGER_STATE", 9);
|
user.put("MANAGER_STATE", 9);
|
||||||
user.put("TERRITORIALITY_STATE", 9);
|
user.put("TERRITORIALITY_STATE", 9);
|
||||||
user.put("STEP_STATUS", "0");
|
user.put("STEP_STATUS", "0");
|
||||||
|
user.put("BELONG_TO_CORP",pd.get("BELONG_TO_CORP"));
|
||||||
|
user.put("BELONG_TO_CORP_NAME",pd.get("BELONG_TO_CORP_NAME"));
|
||||||
|
user.put("IS_DELETE", "0");
|
||||||
|
user.put("RESULT_STATUS","1");
|
||||||
trainUsersMapper.save(user);
|
trainUsersMapper.save(user);
|
||||||
|
condition.clear();
|
||||||
|
condition.put("XGF_USER_ID",id);
|
||||||
|
PageData userEntity = xgfUserMapper.findById(condition);
|
||||||
|
userEntity.put("STATUS","3");
|
||||||
|
userEntity.put("STUDY_STATUS","9");
|
||||||
|
xgfUserMapper.edit(userEntity);
|
||||||
});
|
});
|
||||||
xgfUserMapper.bantchUpdateStatus(9,ArrayDATA_IDS);
|
|
||||||
|
|
||||||
/* 保存审批流程信息 */
|
/* 保存审批流程信息 */
|
||||||
PageData flow = new PageData();
|
PageData flow = new PageData();
|
||||||
|
@ -96,7 +140,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
flow.put("CREATOR_NAME",Jurisdiction.getName());
|
flow.put("CREATOR_NAME",Jurisdiction.getName());
|
||||||
flow.put("CREATOR_TIME", DateUtil.getTime());
|
flow.put("CREATOR_TIME", DateUtil.getTime());
|
||||||
flow.put("VALID_FLAG", "1");
|
flow.put("VALID_FLAG", "1");
|
||||||
flow.put("FOREIGN_KEY",pd.getString("TRAININGBATCH_ID"));
|
flow.put("FOREIGN_KEY",pd.getString("TRAINING_BATCH_ID"));
|
||||||
flow.put("ISDELETE", "0");
|
flow.put("ISDELETE", "0");
|
||||||
flowMapper.save(flow);
|
flowMapper.save(flow);
|
||||||
/* 保存审批流程明细信息 */
|
/* 保存审批流程明细信息 */
|
||||||
|
@ -125,7 +169,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
public void unflowTrain(PageData pd)throws Exception{
|
public void unflowTrain(PageData pd)throws Exception{
|
||||||
PageData trainBatch = new PageData();
|
PageData trainBatch = new PageData();
|
||||||
String batch_id = UuidUtil.get32UUID();
|
String batch_id = UuidUtil.get32UUID();
|
||||||
trainBatch.put("TRAININGBATCH_ID", batch_id); //主键
|
trainBatch.put("TRAINING_BATCH_ID", batch_id); //主键
|
||||||
trainBatch.put("CREATOR", pd.getString("TRAIN_CORP_LEADER_NAME")); //添加人
|
trainBatch.put("CREATOR", pd.getString("TRAIN_CORP_LEADER_NAME")); //添加人
|
||||||
trainBatch.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
trainBatch.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||||
trainBatch.put("OPERATOR", pd.getString("TRAIN_CORP_LEADER_NAME")); //修改人
|
trainBatch.put("OPERATOR", pd.getString("TRAIN_CORP_LEADER_NAME")); //修改人
|
||||||
|
@ -150,11 +194,11 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
trainBatch.put("AUDIT_STATUS", "2");
|
trainBatch.put("AUDIT_STATUS", "2");
|
||||||
this.audit(trainBatch);
|
this.audit(trainBatch);
|
||||||
|
|
||||||
String ArrayDATA_IDS[] = pd.getString("users").split(",");
|
String arrayDATA_IDS[] = pd.getString("users").split(",");
|
||||||
Arrays.asList(ArrayDATA_IDS).forEach(id -> {
|
Arrays.asList(arrayDATA_IDS).forEach(id -> {
|
||||||
PageData user = new PageData();
|
PageData user = new PageData();
|
||||||
user.put("TRAINUSERS_ID", UuidUtil.get32UUID());
|
user.put("TRAIN_USERS_ID", UuidUtil.get32UUID());
|
||||||
user.put("TRAININGBATCH_ID", batch_id);
|
user.put("TRAINING_BATCH_ID", batch_id);
|
||||||
user.put("USER_ID", id);
|
user.put("USER_ID", id);
|
||||||
user.put("TRAIN_CORPINFO_ID", pd.getString("FIRST_PARTY_ID"));
|
user.put("TRAIN_CORPINFO_ID", pd.getString("FIRST_PARTY_ID"));
|
||||||
user.put("STATUS", 1);
|
user.put("STATUS", 1);
|
||||||
|
@ -165,7 +209,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
user.put("STEP_STATUS", "0");
|
user.put("STEP_STATUS", "0");
|
||||||
trainUsersMapper.save(user);
|
trainUsersMapper.save(user);
|
||||||
});
|
});
|
||||||
xgfUserMapper.bantchUpdateStatus(1,ArrayDATA_IDS);
|
xgfUserMapper.bantchUpdateStatus(1,arrayDATA_IDS);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +322,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
|
|
||||||
condition.clear();
|
condition.clear();
|
||||||
condition.put("STATUS",info.getString("detailsStatus"));
|
condition.put("STATUS",info.getString("detailsStatus"));
|
||||||
condition.put("list",list.stream().filter(n -> "1".equals(n.getString("STATUS"))).map(n -> n.getString("TRAINUSERS_ID")).collect(Collectors.toList()));
|
condition.put("list",list.stream().filter(n -> "1".equals(n.getString("STATUS"))).map(n -> n.getString("TRAIN_USERS_ID")).collect(Collectors.toList()));
|
||||||
trainUsersMapper.graduation(condition);
|
trainUsersMapper.graduation(condition);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -293,7 +337,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
|
|
||||||
condition.clear();
|
condition.clear();
|
||||||
condition.put("STATUS",info.getString("detailsStatus"));
|
condition.put("STATUS",info.getString("detailsStatus"));
|
||||||
condition.put("TRAINUSERS_ID", info.getString("TRAINUSERS_ID"));
|
condition.put("TRAIN_USERS_ID", info.getString("TRAIN_USERS_ID"));
|
||||||
trainUsersMapper.graduationstudent(condition);
|
trainUsersMapper.graduationstudent(condition);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -302,7 +346,7 @@ public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||||
public void updateClassMessage(PageData info) {
|
public void updateClassMessage(PageData info) {
|
||||||
List<PageData> list = Warden.getList(info.getString("list"));
|
List<PageData> list = Warden.getList(info.getString("list"));
|
||||||
PageData condition = new PageData();
|
PageData condition = new PageData();
|
||||||
condition.put("list", list.stream().map(n -> n.getString("TRAINUSERS_ID")).collect(Collectors.toList()));
|
condition.put("list", list.stream().map(n -> n.getString("TRAIN_USERS_ID")).collect(Collectors.toList()));
|
||||||
if (StringUtils.isNotEmpty(info.getString("START_DATE"))){
|
if (StringUtils.isNotEmpty(info.getString("START_DATE"))){
|
||||||
condition.put("START_DATE",DateUtil.getTime());
|
condition.put("START_DATE",DateUtil.getTime());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.zcloud.mapper.datasource.train.FlowDetailMapper">
|
<mapper namespace="com.zcloud.mapper.datasource.xgf.FlowDetailMapper">
|
||||||
|
|
||||||
<!--表名 -->
|
<!--表名 -->
|
||||||
<sql id="tableName">
|
<sql id="tableName">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<!--表名 -->
|
<!--表名 -->
|
||||||
<sql id="tableName">
|
<sql id="tableName">
|
||||||
BUS_TRAINUSERS
|
xgf_train_users
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!--数据字典表名 -->
|
<!--数据字典表名 -->
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<!-- 字段 -->
|
<!-- 字段 -->
|
||||||
<sql id="Field">
|
<sql id="Field">
|
||||||
f.TRAININGBATCH_ID,
|
f.TRAINING_BATCH_ID,
|
||||||
f.USER_ID,
|
f.USER_ID,
|
||||||
f.START_DATE,
|
f.START_DATE,
|
||||||
f.END_DATE,
|
f.END_DATE,
|
||||||
|
@ -30,13 +30,17 @@
|
||||||
f.TERRITORIALITY_STATE,
|
f.TERRITORIALITY_STATE,
|
||||||
f.TERRITORIALITY_OPINION,
|
f.TERRITORIALITY_OPINION,
|
||||||
f.TERRITORIALITY_TIME,
|
f.TERRITORIALITY_TIME,
|
||||||
f.TRAINUSERS_ID,
|
f.TRAIN_USERS_ID,
|
||||||
f.STEP_STATUS
|
f.STEP_STATUS,
|
||||||
|
f.BELONG_TO_CORP
|
||||||
|
f.BELONG_TO_CORP_NAME,
|
||||||
|
f.IS_DELETE,
|
||||||
|
f.RESULT_STATUS
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段用于新增 -->
|
<!-- 字段用于新增 -->
|
||||||
<sql id="Field2">
|
<sql id="Field2">
|
||||||
TRAININGBATCH_ID,
|
TRAINING_BATCH_ID,
|
||||||
USER_ID,
|
USER_ID,
|
||||||
START_DATE,
|
START_DATE,
|
||||||
END_DATE,
|
END_DATE,
|
||||||
|
@ -52,13 +56,17 @@
|
||||||
TERRITORIALITY_STATE,
|
TERRITORIALITY_STATE,
|
||||||
TERRITORIALITY_OPINION,
|
TERRITORIALITY_OPINION,
|
||||||
TERRITORIALITY_TIME,
|
TERRITORIALITY_TIME,
|
||||||
TRAINUSERS_ID,
|
TRAIN_USERS_ID,
|
||||||
STEP_STATUS
|
STEP_STATUS,
|
||||||
|
BELONG_TO_CORP,
|
||||||
|
BELONG_TO_CORP_NAME,
|
||||||
|
IS_DELETE,
|
||||||
|
RESULT_STATUS
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段值 -->
|
<!-- 字段值 -->
|
||||||
<sql id="FieldValue">
|
<sql id="FieldValue">
|
||||||
#{TRAININGBATCH_ID},
|
#{TRAINING_BATCH_ID},
|
||||||
#{USER_ID},
|
#{USER_ID},
|
||||||
#{START_DATE},
|
#{START_DATE},
|
||||||
#{END_DATE},
|
#{END_DATE},
|
||||||
|
@ -74,8 +82,12 @@
|
||||||
#{TERRITORIALITY_STATE},
|
#{TERRITORIALITY_STATE},
|
||||||
#{TERRITORIALITY_OPINION},
|
#{TERRITORIALITY_OPINION},
|
||||||
#{TERRITORIALITY_TIME},
|
#{TERRITORIALITY_TIME},
|
||||||
#{TRAINUSERS_ID},
|
#{TRAIN_USERS_ID},
|
||||||
#{STEP_STATUS}
|
#{STEP_STATUS},
|
||||||
|
#{BELONG_TO_CORP},
|
||||||
|
#{BELONG_TO_CORP_NAME},
|
||||||
|
#{IS_DELETE},
|
||||||
|
#{RESULT_STATUS}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 新增-->
|
<!-- 新增-->
|
||||||
|
@ -96,7 +108,7 @@
|
||||||
set
|
set
|
||||||
ISDELETE = '1'
|
ISDELETE = '1'
|
||||||
where
|
where
|
||||||
TRAINUSERS_ID = #{TRAINUSERS_ID}
|
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<!-- 修改 -->
|
<!-- 修改 -->
|
||||||
|
@ -104,35 +116,34 @@
|
||||||
update
|
update
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
set
|
set
|
||||||
TRAININGBATCH_ID = #{TRAININGBATCH_ID},
|
TRAINING_BATCH_ID= #{TRAINING_BATCH_ID},
|
||||||
USER_ID = #{USER_ID},
|
USER_ID = #{USER_ID},
|
||||||
START_DATE = #{START_DATE},
|
START_DATE = #{START_DATE},
|
||||||
END_DATE = #{END_DATE},
|
END_DATE = #{END_DATE},
|
||||||
STATUS = #{STATUS},
|
STATUS = #{STATUS},
|
||||||
|
TRAIN_CORPINFO_ID = #{TRAIN_CORPINFO_ID},
|
||||||
TRAIN_AREA = #{TRAIN_AREA},
|
TRAIN_AREA = #{TRAIN_AREA},
|
||||||
|
SUPERVISION_STATE = #{SUPERVISION_STATE},
|
||||||
|
SUPERVISION_OPINION = #{SUPERVISION_OPINION},
|
||||||
|
SUPERVISION_TIME = #{SUPERVISION_TINE},
|
||||||
|
MANAGER_STATE = #{MANAGER_STATE},
|
||||||
|
MANAGER_OPINION = #{MANAGER_OPINION},
|
||||||
|
MANAGER_TIME = #{MANAGER_TIME},
|
||||||
|
TERRITORIALITY_STATE = #{TERRITORIALITY_STATE},
|
||||||
|
TERRITORIALITY_OPINION = #{TERRITORIALITY_OPINION},
|
||||||
|
TERRITORIALITY_TIME = #{TERRITORIALITY_TIME},
|
||||||
STEP_STATUS = #{STEP_STATUS},
|
STEP_STATUS = #{STEP_STATUS},
|
||||||
TRAINUSERS_ID = TRAINUSERS_ID
|
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||||
|
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||||
|
IS_DELETE = #{IS_DELETE},
|
||||||
|
RESULT_STATUS = #{RESULT_STATUS}
|
||||||
where
|
where
|
||||||
TRAINUSERS_ID = #{TRAINUSERS_ID}
|
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 通过USER_ID获取数据 -->
|
<!-- 通过USER_ID获取数据 -->
|
||||||
<select id="findById" parameterType="pd" resultType="pd">
|
<select id="findById" parameterType="pd" resultType="pd">
|
||||||
select
|
select * from xgf_train_users a where a.TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||||
IFNULL(f.SERVICE_COMPANY_USER_MAP_ID, "") as SERVICE_COMPANY_USER_MAP_ID,
|
|
||||||
IFNULL(su.NAME, "") AS NAME,
|
|
||||||
IFNULL(bc.RELEVANT_UNIT_NAME, "") AS RELEVANT_UNIT_NAME,
|
|
||||||
IFNULL(sud.PERSON_WORK_TYPE, "") AS PERSON_WORK_TYPE,
|
|
||||||
IFNULL(sd.NAME, "") AS DICNAME,
|
|
||||||
IFNULL(f.USER_ID, "") AS USER_ID
|
|
||||||
from
|
|
||||||
bus_service_company_user_map as f
|
|
||||||
left join sys_user su on su.USER_ID = f.USER_ID <!-- 添加人信息 -->
|
|
||||||
left join bus_corpinfo bc on bc.CORPINFO_ID = f.CORPINFO_ID<!-- 相关方企业名称 -->
|
|
||||||
left join sys_user_details sud on sud.USER_ID = f.USER_ID<!-- 工种 -->
|
|
||||||
left join SYS_DICTIONARIES sd on sud.PERSON_WORK_TYPE = sd.DICTIONARIES_ID<!-- 工种名字 -->
|
|
||||||
where
|
|
||||||
f.SERVICE_COMPANY_USER_MAP_ID = #{SERVICE_COMPANY_USER_MAP_ID}
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 服务人员管理列表 -->
|
<!-- 服务人员管理列表 -->
|
||||||
|
@ -204,7 +215,7 @@
|
||||||
left join bus_corpinfo c on c.CORPINFO_ID = u.CORPINFO_ID
|
left join bus_corpinfo c on c.CORPINFO_ID = u.CORPINFO_ID
|
||||||
left join vi_corp_info vc on vc.CORPINFO_ID = f.TRAIN_CORPINFO_ID
|
left join vi_corp_info vc on vc.CORPINFO_ID = f.TRAIN_CORPINFO_ID
|
||||||
left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
||||||
where f.TRAININGBATCH_ID is null
|
where f.TRAINING_BATCH_ID is null
|
||||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||||
and
|
and
|
||||||
(
|
(
|
||||||
|
@ -232,7 +243,7 @@
|
||||||
set
|
set
|
||||||
ISDELETE = '1'
|
ISDELETE = '1'
|
||||||
where
|
where
|
||||||
TRAINUSERS_ID in
|
TRAIN_USERS_ID in
|
||||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
@ -249,15 +260,15 @@
|
||||||
<if test="END_DATE != null and END_DATE != ''">
|
<if test="END_DATE != null and END_DATE != ''">
|
||||||
END_DATE = #{END_DATE},
|
END_DATE = #{END_DATE},
|
||||||
</if>
|
</if>
|
||||||
TRAININGBATCH_ID = #{TRAININGBATCH_ID}
|
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
where
|
where
|
||||||
TRAININGBATCH_ID = #{TRAININGBATCH_ID}
|
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 培训申请记录 -->
|
<!-- 培训申请记录 -->
|
||||||
<select id="trainApplicationRecordList" parameterType="pd" resultType="pd">
|
<select id="trainApplicationRecordList" parameterType="pd" resultType="pd">
|
||||||
select
|
select
|
||||||
IFNULL(f.TRAINUSERS_ID, "") AS TRAINUSERS_ID,
|
IFNULL(f.TRAIN_USERS_ID, "") AS TRAIN_USERS_ID,
|
||||||
IFNULL(f.TRAIN_CORPINFO_ID, "") AS TRAIN_CORPINFO_ID, <!-- 分公司申请部门 -->
|
IFNULL(f.TRAIN_CORPINFO_ID, "") AS TRAIN_CORPINFO_ID, <!-- 分公司申请部门 -->
|
||||||
IFNULL(f.STATUS, "") AS STATUS,<!-- 验证状态 -->
|
IFNULL(f.STATUS, "") AS STATUS,<!-- 验证状态 -->
|
||||||
IFNULL(od.NAME, "") AS DEP_NAME<!-- 部门名称 -->
|
IFNULL(od.NAME, "") AS DEP_NAME<!-- 部门名称 -->
|
||||||
|
@ -329,9 +340,9 @@
|
||||||
<if test="END_DATE != null and END_DATE != ''">
|
<if test="END_DATE != null and END_DATE != ''">
|
||||||
END_DATE = #{END_DATE},
|
END_DATE = #{END_DATE},
|
||||||
</if>
|
</if>
|
||||||
TRAINUSERS_ID = #{TRAINUSERS_ID}
|
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||||
where
|
where
|
||||||
TRAINUSERS_ID = #{TRAINUSERS_ID}
|
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
@ -349,7 +360,7 @@
|
||||||
SUPERVISION_TIME= #{SUPERVISION_TIME},
|
SUPERVISION_TIME= #{SUPERVISION_TIME},
|
||||||
STEP_STATUS = #{STEP_STATUS}
|
STEP_STATUS = #{STEP_STATUS}
|
||||||
where
|
where
|
||||||
TRAINUSERS_ID = #{TRAINUSERS_ID}
|
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||||
</update>
|
</update>
|
||||||
<update id="approveManager" parameterType="pd" >
|
<update id="approveManager" parameterType="pd" >
|
||||||
update <include refid="tableName"></include>
|
update <include refid="tableName"></include>
|
||||||
|
@ -362,7 +373,7 @@
|
||||||
MANAGER_TIME = #{MANAGER_TIME},
|
MANAGER_TIME = #{MANAGER_TIME},
|
||||||
STEP_STATUS = #{STEP_STATUS}
|
STEP_STATUS = #{STEP_STATUS}
|
||||||
where
|
where
|
||||||
TRAINUSERS_ID = #{TRAINUSERS_ID}
|
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||||
</update>
|
</update>
|
||||||
<update id="approveTerritoriality" parameterType="pd" >
|
<update id="approveTerritoriality" parameterType="pd" >
|
||||||
update <include refid="tableName"></include>
|
update <include refid="tableName"></include>
|
||||||
|
@ -375,17 +386,17 @@
|
||||||
TERRITORIALITY_TIME = #{TERRITORIALITY_TIME},
|
TERRITORIALITY_TIME = #{TERRITORIALITY_TIME},
|
||||||
STEP_STATUS = #{STEP_STATUS}
|
STEP_STATUS = #{STEP_STATUS}
|
||||||
where
|
where
|
||||||
TRAINUSERS_ID = #{TRAINUSERS_ID}
|
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||||
</update>
|
</update>
|
||||||
<update id="graduation">
|
<update id="graduation">
|
||||||
update bus_trainusers a set a.STATUS = #{STATUS} where a.TRAINUSERS_ID in
|
update bus_trainusers a set a.STATUS = #{STATUS} where a.TRAIN_USERS_ID in
|
||||||
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>;
|
</foreach>;
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="graduationstudent">
|
<update id="graduationstudent">
|
||||||
update bus_trainusers a set a.STATUS = #{STATUS} where a.TRAINUSERS_ID = #{TRAINUSERS_ID}
|
update bus_trainusers a set a.STATUS = #{STATUS} where a.TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateDate" parameterType="pd">
|
<update id="updateDate" parameterType="pd">
|
||||||
update bus_trainusers a set
|
update bus_trainusers a set
|
||||||
|
@ -395,7 +406,7 @@
|
||||||
<if test="END_DATE != null and END_DATE != ''">
|
<if test="END_DATE != null and END_DATE != ''">
|
||||||
a.END_DATE = #{END_DATE}
|
a.END_DATE = #{END_DATE}
|
||||||
</if>
|
</if>
|
||||||
where a.TRAINUSERS_ID in
|
where a.TRAIN_USERS_ID in
|
||||||
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>;
|
</foreach>;
|
||||||
|
@ -408,7 +419,7 @@
|
||||||
STATUS
|
STATUS
|
||||||
from
|
from
|
||||||
bus_trainusers f
|
bus_trainusers f
|
||||||
where TRAININGBATCH_ID = #{TRAININGBATCH_ID}
|
where TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
GROUP BY STATUS
|
GROUP BY STATUS
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
@ -421,7 +432,7 @@
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
f
|
f
|
||||||
where
|
where
|
||||||
f.TRAINUSERS_ID = #{TRAINUSERS_ID}
|
f.TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||||
</select>
|
</select>
|
||||||
<!-- 通过USER_ID获取数据 -->
|
<!-- 通过USER_ID获取数据 -->
|
||||||
<select id="getCountByWanchengPingshen" parameterType="pd" resultType="Integer">
|
<select id="getCountByWanchengPingshen" parameterType="pd" resultType="Integer">
|
||||||
|
@ -432,7 +443,7 @@
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
f
|
f
|
||||||
where
|
where
|
||||||
f.TRAININGBATCH_ID = #{TRAININGBATCH_ID}
|
f.TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
and (
|
and (
|
||||||
(f.SUPERVISION_STATE = '1' and f.MANAGER_STATE = '1' and f.TERRITORIALITY_STATE = '1')
|
(f.SUPERVISION_STATE = '1' and f.MANAGER_STATE = '1' and f.TERRITORIALITY_STATE = '1')
|
||||||
or (f.SUPERVISION_STATE = '0' or f.MANAGER_STATE = '0' or f.TERRITORIALITY_STATE = '0'))
|
or (f.SUPERVISION_STATE = '0' or f.MANAGER_STATE = '0' or f.TERRITORIALITY_STATE = '0'))
|
||||||
|
@ -461,7 +472,7 @@
|
||||||
a.PHONE,
|
a.PHONE,
|
||||||
a.PERSON_WORK_TYPE,
|
a.PERSON_WORK_TYPE,
|
||||||
a.CLASS_NO,
|
a.CLASS_NO,
|
||||||
a.TRAINUSERS_ID
|
a.TRAIN_USERS_ID
|
||||||
,b.OPENING_TIME,b.VALIDITY_PERIOD_END,
|
,b.OPENING_TIME,b.VALIDITY_PERIOD_END,
|
||||||
(select f.JOBS_TYPE from `qa-prevention-xgf`.sys_special_user f where f.USER_ID = a.USER_ID order by f.CREATTIME limit 1) as JOBS_TYPE,
|
(select f.JOBS_TYPE from `qa-prevention-xgf`.sys_special_user f where f.USER_ID = a.USER_ID order by f.CREATTIME limit 1) as JOBS_TYPE,
|
||||||
(select f.CERTIFICATE from `qa-prevention-xgf`.sys_special_user f where f.USER_ID = a.USER_ID order by f.CREATTIME limit 1) as CERTIFICATE
|
(select f.CERTIFICATE from `qa-prevention-xgf`.sys_special_user f where f.USER_ID = a.USER_ID order by f.CREATTIME limit 1) as CERTIFICATE
|
||||||
|
|
|
@ -27,13 +27,26 @@
|
||||||
f.DESCR,
|
f.DESCR,
|
||||||
f.TRAIN_AREA,
|
f.TRAIN_AREA,
|
||||||
f.MANAGER,
|
f.MANAGER,
|
||||||
|
f.MANAGER_DEPARTMENT_NAME,
|
||||||
f.MANAGER_USER_ID,
|
f.MANAGER_USER_ID,
|
||||||
|
f.MANAGER_USER_NAME,
|
||||||
|
f.MANAGER_TIME,
|
||||||
f.AUDIT_STATUS,
|
f.AUDIT_STATUS,
|
||||||
f.TRAININGBATCH_ID,
|
f.TRAINING_BATCH_ID,
|
||||||
f.SUPERVISION,
|
f.SUPERVISION,
|
||||||
|
f.SUPERVISION_DEPARTMENT_NAME,
|
||||||
f.SUPERVISION_USER_ID,
|
f.SUPERVISION_USER_ID,
|
||||||
|
f.SUPERVISION_USER_NAME,
|
||||||
|
f.SUPERVISION_TIME,
|
||||||
f.TERRITORIALITY,
|
f.TERRITORIALITY,
|
||||||
f.TERRITORIALITY_USER_ID
|
f.TERRITORIALITY_DEPARTMENT_NAME,
|
||||||
|
f.TERRITORIALITY_USER_ID,
|
||||||
|
f.TERRITORIALITY_USER_NAME,
|
||||||
|
f.TERRITORIALITY_TIME,
|
||||||
|
f.BELONG_TO_CORP,
|
||||||
|
f.BELONG_TO_CORP_NAME,
|
||||||
|
f.IS_DELETE,
|
||||||
|
f.STEP_STATUS
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段用于新增 -->
|
<!-- 字段用于新增 -->
|
||||||
|
@ -51,14 +64,26 @@
|
||||||
DESCR,
|
DESCR,
|
||||||
TRAIN_AREA,
|
TRAIN_AREA,
|
||||||
MANAGER,
|
MANAGER,
|
||||||
|
MANAGER_DEPARTMENT_NAME,
|
||||||
MANAGER_USER_ID,
|
MANAGER_USER_ID,
|
||||||
|
MANAGER_USER_NAME,
|
||||||
|
MANAGER_TIME,
|
||||||
AUDIT_STATUS,
|
AUDIT_STATUS,
|
||||||
TYPE,
|
TRAINING_BATCH_ID,
|
||||||
TRAININGBATCH_ID,
|
|
||||||
SUPERVISION,
|
SUPERVISION,
|
||||||
|
SUPERVISION_DEPARTMENT_NAME,
|
||||||
SUPERVISION_USER_ID,
|
SUPERVISION_USER_ID,
|
||||||
|
SUPERVISION_USER_NAME,
|
||||||
|
SUPERVISION_TIME,
|
||||||
TERRITORIALITY,
|
TERRITORIALITY,
|
||||||
TERRITORIALITY_USER_ID
|
TERRITORIALITY_DEPARTMENT_NAME,
|
||||||
|
TERRITORIALITY_USER_ID,
|
||||||
|
TERRITORIALITY_USER_NAME,
|
||||||
|
TERRITORIALITY_TIME,
|
||||||
|
BELONG_TO_CORP,
|
||||||
|
BELONG_TO_CORP_NAME,
|
||||||
|
IS_DELETE,
|
||||||
|
STEP_STATUS
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段值 -->
|
<!-- 字段值 -->
|
||||||
|
@ -76,14 +101,26 @@
|
||||||
#{DESCR},
|
#{DESCR},
|
||||||
#{TRAIN_AREA},
|
#{TRAIN_AREA},
|
||||||
#{MANAGER},
|
#{MANAGER},
|
||||||
|
#{MANAGER_DEPARTMENT_NAME},
|
||||||
#{MANAGER_USER_ID},
|
#{MANAGER_USER_ID},
|
||||||
|
#{MANAGER_USER_NAME},
|
||||||
|
#{MANAGER_TIME},
|
||||||
#{AUDIT_STATUS},
|
#{AUDIT_STATUS},
|
||||||
#{TYPE},
|
#{TRAINING_BATCH_ID},
|
||||||
#{TRAININGBATCH_ID},
|
|
||||||
#{SUPERVISION},
|
#{SUPERVISION},
|
||||||
|
#{SUPERVISION_DEPARTMENT_NAME},
|
||||||
#{SUPERVISION_USER_ID},
|
#{SUPERVISION_USER_ID},
|
||||||
|
#{SUPERVISION_USER_NAME},
|
||||||
|
#{SUPERVISION_TIME},
|
||||||
#{TERRITORIALITY},
|
#{TERRITORIALITY},
|
||||||
#{TERRITORIALITY_USER_ID}
|
#{TERRITORIALITY_DEPARTMENT_NAME},
|
||||||
|
#{TERRITORIALITY_USER_ID},
|
||||||
|
#{TERRITORIALITY_USER_NAME},
|
||||||
|
#{TERRITORIALITY_TIME},
|
||||||
|
#{BELONG_TO_CORP},
|
||||||
|
#{BELONG_TO_CORP_NAME},
|
||||||
|
#{IS_DELETE},
|
||||||
|
#{STEP_STATUS}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 新增-->
|
<!-- 新增-->
|
||||||
|
@ -104,24 +141,50 @@
|
||||||
set
|
set
|
||||||
ISDELETE = '1'
|
ISDELETE = '1'
|
||||||
where
|
where
|
||||||
TRAININGBATCH_ID = #{TRAININGBATCH_ID}
|
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<!-- 修改 -->
|
<!-- 修改 -->
|
||||||
<update id="edit" parameterType="pd">
|
<update id="edit" parameterType="pd">
|
||||||
update
|
update
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
set
|
set
|
||||||
OPERATOR = #{OPERATOR},
|
CREATOR = #{CREATOR},
|
||||||
OPERATTIME = #{OPERATTIME},
|
CREATTIME = #{CREATTIME},
|
||||||
AUDIT_STATUS = #{AUDIT_STATUS},
|
OPERATOR = #{OPERATOR},
|
||||||
TRAIN_CORP_DEPT = #{TRAIN_CORP_DEPT},
|
OPERATTIME = #{OPERATTIME},
|
||||||
TRAIN_CORP_LEADER = #{TRAIN_CORP_LEADER},
|
ISDELETE = #{ISDELETE},
|
||||||
ENTRUST_TIME = #{ENTRUST_TIME},
|
BATCH_NAME = #{BATCH_NAME},
|
||||||
VERIFY_TIME = #{VERIFY_TIME}
|
CORPINFO_ID = #{CORPINFO_ID},
|
||||||
where
|
USER_COUNT = #{USER_COUNT},
|
||||||
TRAININGBATCH_ID = #{TRAININGBATCH_ID}
|
TRAIN_CORP_DEPT = #{TRAIN_CORP_DEPT},
|
||||||
</update>
|
TRAIN_CORP_LEADER = #{TRAIN_CORP_LEADER},
|
||||||
|
DESCR = #{DESCR},
|
||||||
|
TRAIN_AREA = #{TRAIN_AREA},
|
||||||
|
MANAGER = #{MANAGER},
|
||||||
|
MANAGER_DEPARTMENT_NAME = #{MANAGER_DEPARTMENT_NAME},
|
||||||
|
MANAGER_USER_ID = #{MANAGER_USER_ID},
|
||||||
|
MANAGER_USER_NAME = #{MANAGER_USER_NAME},
|
||||||
|
MANAGER_TIME = #{MANAGER_TIME},
|
||||||
|
AUDIT_STATUS = #{AUDIT_STATUS},
|
||||||
|
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID},
|
||||||
|
SUPERVISION = #{SUPERVISION},
|
||||||
|
SUPERVISION_DEPARTMENT_NAME = #{SUPERVISION_DEPARTMENT_NAME},
|
||||||
|
SUPERVISION_USER_ID = #{SUPERVISION_USER_ID},
|
||||||
|
SUPERVISION_USER_NAME = #{SUPERVISION_USER_NAME},
|
||||||
|
SUPERVISION_TIME = #{SUPERVISION_TIME},
|
||||||
|
TERRITORIALITY = #{TERRITORIALITY},
|
||||||
|
TERRITORIALITY_DEPARTMENT_NAME = #{TERRITORIALITY_DEPARTMENT_NAME},
|
||||||
|
TERRITORIALITY_USER_ID = #{TERRITORIALITY_USER_ID},
|
||||||
|
TERRITORIALITY_USER_NAME = #{TERRITORIALITY_USER_NAME},
|
||||||
|
TERRITORIALITY_TIME = #{TERRITORIALITY_TIME},
|
||||||
|
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||||
|
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||||
|
IS_DELETE = #{IS_DELETE},
|
||||||
|
STEP_STATUS = #{STEP_STATUS}
|
||||||
|
where
|
||||||
|
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
|
</update>
|
||||||
|
|
||||||
<!-- 修改 -->
|
<!-- 修改 -->
|
||||||
<update id="audit" parameterType="pd">
|
<update id="audit" parameterType="pd">
|
||||||
|
@ -150,12 +213,12 @@
|
||||||
<if test="CORP_AUDIT_DESCR != null and CORP_AUDIT_DESCR != ''">
|
<if test="CORP_AUDIT_DESCR != null and CORP_AUDIT_DESCR != ''">
|
||||||
CORP_AUDIT_DESCR = #{CORP_AUDIT_DESCR},
|
CORP_AUDIT_DESCR = #{CORP_AUDIT_DESCR},
|
||||||
</if>
|
</if>
|
||||||
TRAININGBATCH_ID = #{TRAININGBATCH_ID}
|
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
where
|
where
|
||||||
TRAININGBATCH_ID = #{TRAININGBATCH_ID}
|
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
</update>
|
</update>
|
||||||
<update id="graduation" parameterType="pd">
|
<update id="graduation" parameterType="pd">
|
||||||
update bus_trainusers a set a.STATUS = '2' where a.USER_ID in
|
update xgf_train_users a set a.STATUS = '2' where a.USER_ID in
|
||||||
<foreach item="item" index="index" collection="users" open="(" separator="," close=")">
|
<foreach item="item" index="index" collection="users" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>;
|
</foreach>;
|
||||||
|
@ -168,120 +231,12 @@
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
where
|
where
|
||||||
f.TRAININGBATCH_ID = #{TRAININGBATCH_ID}
|
f.TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||||
select
|
select * from xgf_training_batch where ISDELETE = '0'
|
||||||
f.*,
|
|
||||||
ma.NAME MANAGER_DEPT_NAME,
|
|
||||||
ma_u.NAME MANAGER_USER_NAME,
|
|
||||||
md.NAME MAIN_DEPARTMENT_NAME,
|
|
||||||
(select MANAGER_TIME from bus_trainusers t1 where t1.TRAININGBATCH_ID = f.TRAININGBATCH_ID order by t1.MANAGER_TIME DESC LIMIT 0,1) AS MANAGER_TIME,
|
|
||||||
su.NAME SUPERVISION_DEPT_NAME,
|
|
||||||
su_u.NAME SUPERVISION_USER_NAME,
|
|
||||||
(select SUPERVISION_TIME from bus_trainusers t2 where t2.TRAININGBATCH_ID = f.TRAININGBATCH_ID order by t2.SUPERVISION_TIME DESC LIMIT 0,1) AS SUPERVISION_TIME,
|
|
||||||
te.NAME TERRITORIALITY_DEPT_NAME,
|
|
||||||
te_u.NAME TERRITORIALITY_USER_NAME,
|
|
||||||
(select TERRITORIALITY_TIME from bus_trainusers t3 where t3.TRAININGBATCH_ID = f.TRAININGBATCH_ID order by t3.TERRITORIALITY_TIME DESC LIMIT 0,1) AS TERRITORIALITY_TIME,
|
|
||||||
cu.NAME TRAIN_CORP_LEADER_NAME,
|
|
||||||
d.NAME TRAIN_AREA_NAME,
|
|
||||||
c.RELEVANT_UNIT_NAME,
|
|
||||||
syu.NAME AS CREATOR_NAME,
|
|
||||||
vcd.NAME SUPERVISE_DEPARTMENT_NAME,
|
|
||||||
vci.CORP_NAME SUPERVISE_CORPINFO_NAME,
|
|
||||||
corpTypeDic.NAME corpTypeName,
|
|
||||||
vcu.NAME AS VCU_NAME,
|
|
||||||
(select count(*) from bus_trainusers t5 where t5.TRAININGBATCH_ID = f.TRAININGBATCH_ID and f.SUPERVISION_USER_ID = #{pd.USER_ID} and (t5.SUPERVISION_STATE in('1','0') or t5.MANAGER_STATE = '0' or t5.TERRITORIALITY_STATE = '0') ) as supervisionCount,
|
|
||||||
(select count(*) from bus_trainusers t6 where t6.TRAININGBATCH_ID = f.TRAININGBATCH_ID and f.MANAGER_USER_ID = #{pd.USER_ID} and (t6.MANAGER_STATE in('1','0') or t6.SUPERVISION_STATE = '0') ) as managerCount,
|
|
||||||
(select count(*) from bus_trainusers t7 where t7.TRAININGBATCH_ID = f.TRAININGBATCH_ID and f.TERRITORIALITY_USER_ID = #{pd.USER_ID} and (t7.TERRITORIALITY_STATE in('1','0') or t7.SUPERVISION_STATE = '0') ) as territorialityCount,
|
|
||||||
(select count(*) from bus_trainusers t4 where t4.TRAININGBATCH_ID = f.TRAININGBATCH_ID AND t4.SUPERVISION_STATE = '1' and t4.MANAGER_STATE = '1'
|
|
||||||
and t4.TERRITORIALITY_STATE = '1' ) as PASS_COUNT<!-- 根据小齐要求,已更新为申请状态中的审核通过人员数-->
|
|
||||||
from
|
|
||||||
<include refid="tableName"></include> f
|
|
||||||
left join vi_department_all ma on ma.DEPARTMENT_ID = f.MANAGER
|
|
||||||
left join vi_user_all ma_u on ma_u.USER_ID = f.MANAGER_USER_ID
|
|
||||||
left join vi_department_all su on su.DEPARTMENT_ID = f.SUPERVISION
|
|
||||||
left join vi_regulatory_user su_u on su_u.USER_ID = f.SUPERVISION_USER_ID
|
|
||||||
left join vi_department_all te on te.DEPARTMENT_ID = f.TERRITORIALITY
|
|
||||||
left join vi_user_all te_u on te_u.USER_ID = f.TERRITORIALITY_USER_ID
|
|
||||||
left join vi_user_all cu on cu.USER_ID = f.TRAIN_CORP_LEADER
|
|
||||||
left join sys_dictionaries d on d.DICTIONARIES_ID = f.TRAIN_AREA
|
|
||||||
left join bus_corpinfo c on c.CORPINFO_ID = f.CORPINFO_ID
|
|
||||||
left join BUS_CORPINFODETAILS bcd on bcd.CORPINFO_ID = c.CORPINFO_ID
|
|
||||||
left join sys_dictionaries corpTypeDic on corpTypeDic.BIANMA = bcd.CORP_TYPE
|
|
||||||
left join vi_regulatory_department md on md.DEPARTMENT_ID = c.MAIN_DEPARTMENT
|
|
||||||
left join sys_user syu on syu.USERNAME = f.CREATOR
|
|
||||||
left join vi_user_all vcu on vcu.USERNAME = f.CREATOR
|
|
||||||
left join vi_department_all vcd on vcd.DEPARTMENT_ID = c.SUPERVISE_DEPARTMENT_ID
|
|
||||||
left join vi_corp_info vci on vci.CORPINFO_ID = c.SUPERVISE_CORPINFO_ID
|
|
||||||
where 1=1
|
|
||||||
<if test="pd.TYPE != null and pd.TYPE != ''">
|
|
||||||
and f.TYPE = #{pd.TYPE}
|
|
||||||
</if>
|
|
||||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">
|
|
||||||
and f.CREATOR LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
|
||||||
</if>
|
|
||||||
<!--9173 搜索框不好使-->
|
|
||||||
<if test="pd.XGF_NAME_REG != null and pd.XGF_NAME_REG != ''">
|
|
||||||
and c.RELEVANT_UNIT_NAME LIKE CONCAT(CONCAT('%', #{pd.XGF_NAME_REG,jdbcType=VARCHAR}),'%')
|
|
||||||
</if>
|
|
||||||
<if test="pd.XGF_NAME != null and pd.XGF_NAME != ''">
|
|
||||||
and c.RELEVANT_UNIT_NAME LIKE CONCAT(CONCAT('%', #{pd.XGF_NAME}),'%')
|
|
||||||
</if>
|
|
||||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
|
||||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
|
||||||
</if>
|
|
||||||
<if test="pd.MANAGER != null and pd.MANAGER != ''">
|
|
||||||
and f.MANAGER = #{pd.MANAGER}
|
|
||||||
</if>
|
|
||||||
<if test="pd.MANAGER_USER_ID != null and pd.MANAGER_USER_ID != ''">
|
|
||||||
and f.MANAGER_USER_ID = #{pd.MANAGER_USER_ID}
|
|
||||||
</if>
|
|
||||||
<if test="pd.TERRITORIALITY != null and pd.TERRITORIALITY != ''">
|
|
||||||
and f.TERRITORIALITY = #{pd.TERRITORIALITY}
|
|
||||||
</if>
|
|
||||||
<if test="pd.TRAIN_CORP_DEPT != null and pd.TRAIN_CORP_DEPT != ''">
|
|
||||||
and f.TRAIN_CORP_DEPT = #{pd.TRAIN_CORP_DEPT}
|
|
||||||
</if>
|
|
||||||
<if test="pd.TRAIN_CORP_DEPTS != null and pd.TRAIN_CORP_DEPTS != ''">
|
|
||||||
and FIND_IN_SET(f.TRAIN_CORP_DEPT, #{pd.TRAIN_CORP_DEPTS})
|
|
||||||
</if>
|
|
||||||
<if test="pd.TRAIN_CORP_LEADER != null and pd.TRAIN_CORP_LEADER != ''">
|
|
||||||
and f.TRAIN_CORP_LEADER = #{pd.TRAIN_CORP_LEADER}
|
|
||||||
</if>
|
|
||||||
<if test="pd.AUDIT_STATUS != null and pd.AUDIT_STATUS != ''">
|
|
||||||
and f.AUDIT_STATUS = #{pd.AUDIT_STATUS}
|
|
||||||
</if>
|
|
||||||
<if test="pd.SELECT_STATUS != null and pd.SELECT_STATUS != '' and pd.SELECT_STATUS == 2 and (pd.AUDIT_STATUS == null or pd.AUDIT_STATUS == '')">
|
|
||||||
and f.AUDIT_STATUS > 1
|
|
||||||
</if>
|
|
||||||
<if test="pd.STARTTIME != null and pd.STARTTIME != ''">
|
|
||||||
and DATE_FORMAT( f.CREATTIME, '%Y-%m-%d' ) BETWEEN DATE_FORMAT( #{pd.STARTTIME}, '%Y-%m-%d' ) and DATE_FORMAT( #{pd.ENDTIME}, '%Y-%m-%d' )
|
|
||||||
</if>
|
|
||||||
<if test="pd.VERIFY_START_TIME != null and pd.VERIFY_START_TIME != ''">
|
|
||||||
and DATE_FORMAT( f.VERIFY_TIME, '%Y-%m-%d' ) BETWEEN DATE_FORMAT( #{pd.VERIFY_START_TIME}, '%Y-%m-%d' ) and DATE_FORMAT( #{pd.VERIFY_END_TIME}, '%Y-%m-%d' )
|
|
||||||
</if>
|
|
||||||
<if test="pd.ENTRUST_STARTTIME != null and pd.ENTRUST_STARTTIME != ''">
|
|
||||||
and DATE_FORMAT( f.ENTRUST_TIME, '%Y-%m-%d' ) BETWEEN DATE_FORMAT( #{pd.ENTRUST_STARTTIME}, '%Y-%m-%d' ) and DATE_FORMAT( #{pd.ENTRUST_ENDTIME}, '%Y-%m-%d' )
|
|
||||||
</if>
|
|
||||||
<if test="pd.SUPERVISION_USER_ID != null and pd.SUPERVISION_USER_ID != ''"> <!-- 安检-->
|
|
||||||
and f.SUPERVISION_USER_ID = #{pd.SUPERVISION_USER_ID}
|
|
||||||
</if>
|
|
||||||
<if test="pd.TERRITORIALITY_USER_ID != null and pd.TERRITORIALITY_USER_ID != ''"> <!-- 属地管理部门审核人员-->
|
|
||||||
and f.TERRITORIALITY_USER_ID = #{pd.TERRITORIALITY_USER_ID}
|
|
||||||
</if>
|
|
||||||
<if test="pd.MANAGER_USER_ID != null and pd.MANAGER_USER_ID != ''"> <!-- 主管部门-->
|
|
||||||
and f.MANAGER_USER_ID = #{pd.MANAGER_USER_ID}
|
|
||||||
</if>
|
|
||||||
<if test="pd.MAndTUserId != null and pd.MAndTUserId != ''"> <!-- 主管部门-->
|
|
||||||
and (f.MANAGER_USER_ID = #{pd.MAndTUserId} or f.TERRITORIALITY_USER_ID = #{pd.MAndTUserId})
|
|
||||||
</if>
|
|
||||||
<if test="pd.user_index != null and pd.user_index != ''"> <!-- 主管部门-->
|
|
||||||
and (f.MANAGER_USER_ID = #{pd.user_index} or f.TERRITORIALITY_USER_ID = #{pd.user_index} or f.SUPERVISION_USER_ID = #{pd.user_index})
|
|
||||||
</if>
|
|
||||||
order by f.CREATTIME desc
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 列表(全部) -->
|
<!-- 列表(全部) -->
|
||||||
|
@ -299,7 +254,7 @@
|
||||||
set
|
set
|
||||||
ISDELETE = '1'
|
ISDELETE = '1'
|
||||||
where
|
where
|
||||||
TRAININGBATCH_ID in
|
TRAINING_BATCH_ID in
|
||||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
@ -314,51 +269,27 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="batchUserlistPage" parameterType="page" resultType="pd">
|
<select id="batchUserlistPage" parameterType="page" resultType="pd">
|
||||||
SELECT u.USER_ID,
|
select
|
||||||
u.USERNAME,
|
b.USERNAME,
|
||||||
u.CORPINFO_ID,
|
b.NAME,
|
||||||
u.NAME,
|
b.BELONG_TO_CORP_NAME,
|
||||||
u.ISFLOW,
|
a.TRAIN_USERS_ID,
|
||||||
u.DEPART_STATE,
|
a.STEP_STATUS,
|
||||||
t.STATUS,
|
a.USER_ID,
|
||||||
t.SUPERVISION_STATE,
|
a.SUPERVISION_STATE,
|
||||||
t.SUPERVISION_OPINION,
|
a.MANAGER_STATE,
|
||||||
t.SUPERVISION_TIME,
|
a.TERRITORIALITY_STATE,
|
||||||
tr.SUPERVISION,
|
a.RESULT_STATUS,
|
||||||
sup.NAME SUPERVISION_DEPT_NAME,
|
c.SUPERVISION_USER_ID,
|
||||||
t.MANAGER_STATE,
|
c.MANAGER_USER_ID,
|
||||||
t.MANAGER_OPINION,
|
c.TERRITORIALITY_USER_ID
|
||||||
t.MANAGER_TIME,
|
from xgf_train_users a
|
||||||
tr.MANAGER,
|
left join xgf_user b on a.USER_ID = b.XGF_USER_ID
|
||||||
man.NAME MANAGER_DEPT_NAME,
|
left join xgf_training_batch c on a.TRAINING_BATCH_ID = c.TRAINING_BATCH_ID
|
||||||
t.TERRITORIALITY_STATE,
|
where a.IS_DELETE = '0'
|
||||||
t.TERRITORIALITY_OPINION,
|
<if test="pd.TRAINING_BATCH_ID != null and pd.TRAINING_BATCH_ID != ''">
|
||||||
t.TERRITORIALITY_TIME,
|
and a.TRAINING_BATCH_ID = #{pd.TRAINING_BATCH_ID}
|
||||||
tr.TERRITORIALITY,
|
</if>
|
||||||
tra.NAME TERRITORIALITY_DEPT_NAME,
|
|
||||||
t.TRAINUSERS_ID,
|
|
||||||
t.STEP_STATUS,
|
|
||||||
d.NAME DEPARTMENT_NAME ,
|
|
||||||
tr.TERRITORIALITY_USER_ID,
|
|
||||||
tr.SUPERVISION_USER_ID,
|
|
||||||
tr.MANAGER_USER_ID,
|
|
||||||
te.NAME as TERRITORIALITY_USER_NAME,
|
|
||||||
s.NAME as SUPERVISION_USER_NAME,
|
|
||||||
m.NAME as MANAGER_USER_NAME,
|
|
||||||
n.STATUS as TRAIN_STATUS,
|
|
||||||
tr.AUDIT_STATUS
|
|
||||||
from SYS_USER u
|
|
||||||
left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
|
||||||
left join BUS_TRAINUSERS t on t.USER_ID = u.USER_ID
|
|
||||||
left join bus_trainingbatch tr on tr.TRAININGBATCH_ID = t.TRAININGBATCH_ID
|
|
||||||
LEFT JOIN `qa-gwj-regulatory`.bus_class_info n ON n.TRAINUSERS_ID = t.TRAINUSERS_ID
|
|
||||||
left join vi_corp_user te on te.USER_ID = tr.TERRITORIALITY_USER_ID
|
|
||||||
left join vi_user_all s on s.USER_ID = tr.SUPERVISION_USER_ID
|
|
||||||
left join vi_corp_user m on m.USER_ID = tr.MANAGER_USER_ID
|
|
||||||
left join vi_department_all sup on sup.DEPARTMENT_ID = tr.SUPERVISION
|
|
||||||
left join vi_department_all man on man.DEPARTMENT_ID = tr.MANAGER
|
|
||||||
left join vi_department_all tra on man.DEPARTMENT_ID = tr.TERRITORIALITY
|
|
||||||
where t.TRAININGBATCH_ID = #{pd.TRAININGBATCH_ID}
|
|
||||||
</select>
|
</select>
|
||||||
<select id="passUserlistPage" resultType="com.zcloud.entity.PageData">
|
<select id="passUserlistPage" resultType="com.zcloud.entity.PageData">
|
||||||
select distinct su.USERNAME,
|
select distinct su.USERNAME,
|
||||||
|
@ -374,11 +305,11 @@
|
||||||
a.TRAINUSERS_ID,
|
a.TRAINUSERS_ID,
|
||||||
ssu.JOBS_TYPE as PERSON_WORK_TYPE,
|
ssu.JOBS_TYPE as PERSON_WORK_TYPE,
|
||||||
ssu.CERTIFICATE
|
ssu.CERTIFICATE
|
||||||
from bus_trainusers a
|
from xgf_train_users a
|
||||||
left join bus_trainingbatch tb on a.TRAININGBATCH_ID = tb.TRAININGBATCH_ID
|
left join bus_trainingbatch tb on a.TRAINING_BATCH_ID = tb.TRAINING_BATCH_ID
|
||||||
left join sys_user su on su.USER_ID = a.USER_ID
|
left join sys_user su on su.USER_ID = a.USER_ID
|
||||||
left join SYS_USER_DETAILS sud on su.USER_ID = sud.USER_ID
|
left join SYS_USER_DETAILS sud on su.USER_ID = sud.USER_ID
|
||||||
left join bus_corpinfo ci on ci.CORPINFO_ID = su.CORPINFO_ID
|
left join bus_corp_info ci on ci.CORPINFO_ID = su.CORPINFO_ID
|
||||||
left join oa_department od on od.DEPARTMENT_ID = su.DEPARTMENT_ID
|
left join oa_department od on od.DEPARTMENT_ID = su.DEPARTMENT_ID
|
||||||
left join (select ssup.USER_ID, ssup. JOBS_TYPE, ssup.CERTIFICATE
|
left join (select ssup.USER_ID, ssup. JOBS_TYPE, ssup.CERTIFICATE
|
||||||
from sys_special_user ssup
|
from sys_special_user ssup
|
||||||
|
@ -407,21 +338,21 @@
|
||||||
rerUser.NAME as ERRITORIALITY_USER_USERNAME,
|
rerUser.NAME as ERRITORIALITY_USER_USERNAME,
|
||||||
rerUser.NAME as ERRITORIALITY_USER_NAME,
|
rerUser.NAME as ERRITORIALITY_USER_NAME,
|
||||||
rerDept.NAME as ERRITORIALITY_DEPT_NAME,
|
rerDept.NAME as ERRITORIALITY_DEPT_NAME,
|
||||||
(SELECT MAX( t1.SUPERVISION_TIME ) AS SUPERVISION_TIME FROM bus_trainusers t1 where
|
(SELECT MAX( t1.SUPERVISION_TIME ) AS SUPERVISION_TIME FROM xgf_train_users t1 where
|
||||||
t1.TRAININGBATCH_ID = f.TRAININGBATCH_ID ) AS SUPERVISION_TIME,
|
t1.TRAINING_BATCH_ID = f.TRAINING_BATCH_ID ) AS SUPERVISION_TIME,
|
||||||
(SELECT MAX( t2.MANAGER_TIME ) AS MANAGER_TIME FROM bus_trainusers t2 where
|
(SELECT MAX( t2.MANAGER_TIME ) AS MANAGER_TIME FROM xgf_train_users t2 where
|
||||||
t2.TRAININGBATCH_ID = f.TRAININGBATCH_ID ) AS MANAGER_TIME,
|
t2.TRAINING_BATCH_ID = f.TRAINING_BATCH_ID ) AS MANAGER_TIME,
|
||||||
(SELECT MAX( t3.TERRITORIALITY_TIME ) AS TERRITORIALITY_TIME FROM bus_trainusers t3 where
|
(SELECT MAX( t3.TERRITORIALITY_TIME ) AS TERRITORIALITY_TIME FROM xgf_train_users t3 where
|
||||||
t3.TRAININGBATCH_ID = f.TRAININGBATCH_ID ) AS TERRITORIALITY_TIME
|
t3.TRAINING_BATCH_ID = f.TRAINING_BATCH_ID ) AS TERRITORIALITY_TIME
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
left join vi_regulatory_user supUser on supUser.USER_ID = f.SUPERVISION_USER_ID
|
left join vi_user_all supUser on supUser.USER_ID = f.SUPERVISION_USER_ID
|
||||||
left join vi_regulatory_department supDept on supDept.DEPARTMENT_ID = f.SUPERVISION
|
left join vi_department_all supDept on supDept.DEPARTMENT_ID = f.SUPERVISION
|
||||||
left join vi_corp_user mangUser on mangUser.USER_ID = f.MANAGER_USER_ID
|
left join vi_corp_user mangUser on mangUser.USER_ID = f.MANAGER_USER_ID
|
||||||
left join vi_corp_department mangDept on mangDept.DEPARTMENT_ID = f.MANAGER
|
left join vi_corp_department mangDept on mangDept.DEPARTMENT_ID = f.MANAGER
|
||||||
left join vi_corp_user rerUser on rerUser.USER_ID = f.TERRITORIALITY_USER_ID
|
left join vi_corp_user rerUser on rerUser.USER_ID = f.TERRITORIALITY_USER_ID
|
||||||
left join vi_corp_department rerDept on rerDept.DEPARTMENT_ID = f.TERRITORIALITY
|
left join vi_corp_department rerDept on rerDept.DEPARTMENT_ID = f.TERRITORIALITY
|
||||||
where
|
where
|
||||||
f.TRAININGBATCH_ID = #{TRAININGBATCH_ID}
|
f.TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
f.CORPINFO_ID,
|
f.CORPINFO_ID,
|
||||||
f.STATUS,
|
f.STATUS,
|
||||||
f.OPERATOR_TIME,
|
f.OPERATOR_TIME,
|
||||||
f.ISFLOW
|
f.ISFLOW,
|
||||||
|
f.STUDY_STATUS
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段用于新增 -->
|
<!-- 字段用于新增 -->
|
||||||
|
@ -36,7 +37,8 @@
|
||||||
CORPINFO_ID,
|
CORPINFO_ID,
|
||||||
STATUS,
|
STATUS,
|
||||||
OPERATOR_TIME,
|
OPERATOR_TIME,
|
||||||
ISFLOW
|
ISFLOW,
|
||||||
|
STUDY_STATUS
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段值 -->
|
<!-- 字段值 -->
|
||||||
|
@ -52,7 +54,8 @@
|
||||||
#{CORPINFO_ID},
|
#{CORPINFO_ID},
|
||||||
#{STATUS},
|
#{STATUS},
|
||||||
#{OPERATOR_TIME},
|
#{OPERATOR_TIME},
|
||||||
#{ISFLOW}
|
#{ISFLOW},
|
||||||
|
#{STUDY_STATUS}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 新增-->
|
<!-- 新增-->
|
||||||
|
@ -91,7 +94,8 @@
|
||||||
CORPINFO_ID = #{CORPINFO_ID},
|
CORPINFO_ID = #{CORPINFO_ID},
|
||||||
STATUS = #{STATUS},
|
STATUS = #{STATUS},
|
||||||
OPERATOR_TIME = #{OPERATOR_TIME},
|
OPERATOR_TIME = #{OPERATOR_TIME},
|
||||||
ISFLOW = #{ISFLOW}
|
ISFLOW = #{ISFLOW},
|
||||||
|
STUDY_STATUS = #{STUDY_STATUS}
|
||||||
where
|
where
|
||||||
XGF_USER_ID = #{XGF_USER_ID}
|
XGF_USER_ID = #{XGF_USER_ID}
|
||||||
</update>
|
</update>
|
||||||
|
@ -106,7 +110,7 @@
|
||||||
<update id="bantchUpdateStatus">
|
<update id="bantchUpdateStatus">
|
||||||
update
|
update
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
set STATUS = #{STATUS}
|
set STUDY_STATUS = #{STATUS}
|
||||||
where
|
where
|
||||||
XGF_USER_ID in
|
XGF_USER_ID in
|
||||||
<foreach item="item" index="index" collection="arrayDATA_ids" open="(" separator="," close=")">
|
<foreach item="item" index="index" collection="arrayDATA_ids" open="(" separator="," close=")">
|
||||||
|
@ -194,7 +198,7 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
<select id="flowlistPage" resultType="com.zcloud.entity.PageData">
|
<select id="flowlistPage" resultType="com.zcloud.entity.PageData">
|
||||||
select a.XGF_USER_ID,a.BELONG_TO_CORP_NAME,a.USERNAME,a.NAME,b.MANAGER_DEPARTMENT_ID from xgf_user a
|
select a.XGF_USER_ID,a.BELONG_TO_CORP,a.BELONG_TO_CORP_NAME,a.USERNAME,a.NAME,b.MANAGER_DEPARTMENT_ID from xgf_user a
|
||||||
left join xgf_user_details b on a.XGF_USER_ID = b.XGF_USER_ID
|
left join xgf_user_details b on a.XGF_USER_ID = b.XGF_USER_ID
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="pd.STATUS != null and pd.STATUS != ''">
|
<if test="pd.STATUS != null and pd.STATUS != ''">
|
||||||
|
|
Loading…
Reference in New Issue