Merge branch 'refs/heads/xuyifeng-0724-人员中台对接-dev' into pet
commit
eb19ec1372
|
@ -187,7 +187,7 @@ public class LoginController extends BaseController {
|
||||||
PageData pathData = corpPathService.getCorpPathByCorpId(pd);
|
PageData pathData = corpPathService.getCorpPathByCorpId(pd);
|
||||||
map.put("baseImgPath",pathData.getString("PIC_PATH"));
|
map.put("baseImgPath",pathData.getString("PIC_PATH"));
|
||||||
map.put("USER_IDENTITY",pathData.getString("USER_IDENTITY"));
|
map.put("USER_IDENTITY",pathData.getString("USER_IDENTITY"));
|
||||||
map.put("BACKENDADDR", "http://192.168.0.49:8091/");
|
map.put("BACKENDADDR", pathData.getString("BACK_END_PATH"));
|
||||||
} else {
|
} else {
|
||||||
PageData pathData = corpPathService.getCorpPathByPersonInfo(pd);
|
PageData pathData = corpPathService.getCorpPathByPersonInfo(pd);
|
||||||
map.put("baseImgPath",pathData.getString("PIC_PATH"));
|
map.put("baseImgPath",pathData.getString("PIC_PATH"));
|
||||||
|
|
|
@ -6,10 +6,16 @@ import java.util.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.alibaba.druid.support.json.JSONUtils;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.dto.UpdateEnum;
|
||||||
import com.zcloud.entity.system.Dictionaries;
|
import com.zcloud.entity.system.Dictionaries;
|
||||||
import com.zcloud.entity.system.User;
|
import com.zcloud.entity.system.User;
|
||||||
import com.zcloud.service.bus.*;
|
import com.zcloud.service.bus.*;
|
||||||
import com.zcloud.service.system.*;
|
import com.zcloud.service.system.*;
|
||||||
|
import com.zcloud.syncData.SyncPlatformAdvice;
|
||||||
|
import com.zcloud.syncData.SyncTypeEnum;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.commons.collections.map.ListOrderedMap;
|
import org.apache.commons.collections.map.ListOrderedMap;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -19,6 +25,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.crypto.hash.SimpleHash;
|
import org.apache.shiro.crypto.hash.SimpleHash;
|
||||||
import org.hyperic.sigar.pager.PageList;
|
import org.hyperic.sigar.pager.PageList;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -77,6 +84,8 @@ public class UsersController extends BaseController {
|
||||||
private UserExamineService userExamineService;
|
private UserExamineService userExamineService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private DictionariesService dictionariesService;
|
private DictionariesService dictionariesService;
|
||||||
|
@Value("${tongbu.url}")
|
||||||
|
private String tongBuUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进入权限首页
|
* 进入权限首页
|
||||||
|
@ -421,6 +430,14 @@ public class UsersController extends BaseController {
|
||||||
userCerList = imgfilesService.listAll(userCerPd);
|
userCerList = imgfilesService.listAll(userCerPd);
|
||||||
pd.putAll(userInfo);
|
pd.putAll(userInfo);
|
||||||
}
|
}
|
||||||
|
List<PageData> face_file = new ArrayList<>();
|
||||||
|
if (null != userInfo) {
|
||||||
|
PageData userCerPd = new PageData();
|
||||||
|
userCerPd.put("TYPE", "30");
|
||||||
|
userCerPd.put("FOREIGN_KEY", pd.get("USER_ID"));
|
||||||
|
face_file = imgfilesService.listAll(userCerPd);
|
||||||
|
pd.putAll(userInfo);
|
||||||
|
}
|
||||||
//获取岗位下拉
|
//获取岗位下拉
|
||||||
PageData post = new PageData();
|
PageData post = new PageData();
|
||||||
post.put("DEPARTMENT_ID", ZDEPARTMENT_ID);
|
post.put("DEPARTMENT_ID", ZDEPARTMENT_ID);
|
||||||
|
@ -432,6 +449,7 @@ public class UsersController extends BaseController {
|
||||||
map.put("periodStr", shiftDutyPeriod.getString("DURATION") + ',' + shiftDutyPeriod.getString("WORKSTATUS") + ',' + shiftDutyPeriod.getString("WORKPERIOD"));
|
map.put("periodStr", shiftDutyPeriod.getString("DURATION") + ',' + shiftDutyPeriod.getString("WORKSTATUS") + ',' + shiftDutyPeriod.getString("WORKPERIOD"));
|
||||||
map.put("licenseinfor", pd1);
|
map.put("licenseinfor", pd1);
|
||||||
map.put("userCerList", userCerList);
|
map.put("userCerList", userCerList);
|
||||||
|
map.put("face_file", face_file);
|
||||||
map.put("roleList", roleList);
|
map.put("roleList", roleList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
@ -518,24 +536,13 @@ public class UsersController extends BaseController {
|
||||||
@RequestMapping(value = "/editUser")
|
@RequestMapping(value = "/editUser")
|
||||||
@RequiresPermissions("user:edit")
|
@RequiresPermissions("user:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@SyncPlatformAdvice(type = SyncTypeEnum.PERSONNEL, isUpdate = true)
|
||||||
public Object editUser() throws Exception {
|
public Object editUser() 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();
|
||||||
|
|
||||||
// if(pd.get("USERAVATARURL")!=null && !pd.getString("USERAVATARURL").equals("")){
|
|
||||||
// System.out.println("USERAVATARURL原长度:"+pd.getString("USERAVATARURL").length());
|
|
||||||
// String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL"));
|
|
||||||
// System.out.println("USERAVATARURL压缩长度:"+USERAVATARURL64.length());
|
|
||||||
//// try{
|
|
||||||
//// FaceUtil.compareFace(pd.getString("USERAVATARURL"),pd.getString("USERAVATARURL"));
|
|
||||||
//// }catch (Exception e){
|
|
||||||
//// map.put("result", "Error");
|
|
||||||
//// map.put("msg", "人脸图像不符合要求 请重新上传!");
|
|
||||||
//// return map;
|
|
||||||
//// }
|
|
||||||
// }
|
|
||||||
FHLOG.save(Jurisdiction.getUsername(), "从系统用户中修改" + pd.getString("USERNAME") + "的资料"); //记录日志
|
FHLOG.save(Jurisdiction.getUsername(), "从系统用户中修改" + pd.getString("USERNAME") + "的资料"); //记录日志
|
||||||
if (!Jurisdiction.getUsername().equals(pd.getString("USERNAME"))) { //如果当前登录用户修改用户资料提交的用户名非本人
|
if (!Jurisdiction.getUsername().equals(pd.getString("USERNAME"))) { //如果当前登录用户修改用户资料提交的用户名非本人
|
||||||
if ("admin".equals(pd.getString("USERNAME")) && !"admin".equals(Jurisdiction.getUsername())) {
|
if ("admin".equals(pd.getString("USERNAME")) && !"admin".equals(Jurisdiction.getUsername())) {
|
||||||
|
@ -547,9 +554,6 @@ public class UsersController extends BaseController {
|
||||||
pd.put("ROLE_ID", upd.getString("ROLE_ID")); //对角色ID还原本人角色ID
|
pd.put("ROLE_ID", upd.getString("ROLE_ID")); //对角色ID还原本人角色ID
|
||||||
pd.put("ROLE_IDS", Tools.notEmpty(upd.getString("ROLE_IDS")) ? upd.get("ROLE_IDS") : ""); //对角色ID还原本人副职角色ID
|
pd.put("ROLE_IDS", Tools.notEmpty(upd.getString("ROLE_IDS")) ? upd.get("ROLE_IDS") : ""); //对角色ID还原本人副职角色ID
|
||||||
}
|
}
|
||||||
// if(pd.getString("PASSWORD") != null && !"".equals(pd.getString("PASSWORD"))){
|
|
||||||
// pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), pd.getString("PASSWORD")).toString());
|
|
||||||
// }
|
|
||||||
if (!Tools.isEmpty(pd.getString("ROLE_ID"))) {
|
if (!Tools.isEmpty(pd.getString("ROLE_ID"))) {
|
||||||
if (pd.getString("ROLE_ID").contains(",")) {
|
if (pd.getString("ROLE_ID").contains(",")) {
|
||||||
String roleId = pd.getString("ROLE_ID").substring(0, pd.getString("ROLE_ID").indexOf(","));//截取第一个,之前的数据
|
String roleId = pd.getString("ROLE_ID").substring(0, pd.getString("ROLE_ID").indexOf(","));//截取第一个,之前的数据
|
||||||
|
@ -575,6 +579,9 @@ public class UsersController extends BaseController {
|
||||||
if (Tools.notEmpty(pd.getString("CARDNO"))) {
|
if (Tools.notEmpty(pd.getString("CARDNO"))) {
|
||||||
usersService.resetCardNo(pd);
|
usersService.resetCardNo(pd);
|
||||||
}
|
}
|
||||||
|
//每次人员信息更改都要将人物状态置为未推送且不可查询,需推送后在进行使用
|
||||||
|
pd.put("ISDELETE","1");
|
||||||
|
pd.put("ISPUSH","0");
|
||||||
usersService.editUser(pd); //执行修改
|
usersService.editUser(pd); //执行修改
|
||||||
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
||||||
pd.put("IS_ONLINELEARNING", "1");
|
pd.put("IS_ONLINELEARNING", "1");
|
||||||
|
@ -610,6 +617,9 @@ public class UsersController extends BaseController {
|
||||||
}
|
}
|
||||||
userInfoService.delete(pd);
|
userInfoService.delete(pd);
|
||||||
userInfoService.save(pd);
|
userInfoService.save(pd);
|
||||||
|
} else {
|
||||||
|
userInfoService.delete(pd);
|
||||||
|
userInfoService.save(pd);
|
||||||
}
|
}
|
||||||
if (null == licenseInforService.findById(pd)) {
|
if (null == licenseInforService.findById(pd)) {
|
||||||
if (pd.getString("PERSON_TYPE") != null) {
|
if (pd.getString("PERSON_TYPE") != null) {
|
||||||
|
@ -627,16 +637,6 @@ public class UsersController extends BaseController {
|
||||||
if (pd.getString("INFORWORKValue") != null || !(pd.getString("INFORWORKValue") == "")) {
|
if (pd.getString("INFORWORKValue") != null || !(pd.getString("INFORWORKValue") == "")) {
|
||||||
pd.put("INFORWORK", pd.getString("INFORWORKValue"));
|
pd.put("INFORWORK", pd.getString("INFORWORKValue"));
|
||||||
}
|
}
|
||||||
// if("select".equals(pd.getString("letDutiesType"))){
|
|
||||||
// pd.put("TYPE_OF_WORK",pd.getString("TYPE_OF_WORK"));
|
|
||||||
// }else{
|
|
||||||
// PageData dicPd = new PageData();
|
|
||||||
// dicPd.put("PARENT_ID","09e36ac01e9540f8bc84eab1c1a78754");
|
|
||||||
// dicPd.put("BIANMA","zhiwu");
|
|
||||||
// dicPd.put("NAME",pd.getString("INFORPOSTValue"));
|
|
||||||
// dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
|
||||||
// pd.put("TYPE_OF_WORK",dicPd.getString("DICTIONARIES_ID"));
|
|
||||||
// }
|
|
||||||
if (Tools.notEmpty(pd.getString("INFORPOSTValue"))) {
|
if (Tools.notEmpty(pd.getString("INFORPOSTValue"))) {
|
||||||
if ("select".equals(pd.getString("letDutiesType"))) {
|
if ("select".equals(pd.getString("letDutiesType"))) {
|
||||||
PageData dicPd = new PageData();
|
PageData dicPd = new PageData();
|
||||||
|
@ -777,8 +777,13 @@ public class UsersController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
System.out.println(pd.getString("isUpdateFace"));
|
||||||
|
if (pd.getString("isUpdateFace").equals("1")) { //若修改了人脸图片
|
||||||
|
imgfilesService.delete(pd); //删除旧人脸图片
|
||||||
|
}
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
map.put("code","0");
|
||||||
|
map.put("syncInfo", JSONUtil.toJsonStr(usersService.findById(pd)));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -788,6 +793,7 @@ public class UsersController extends BaseController {
|
||||||
@RequestMapping(value = "/editUserFuns")
|
@RequestMapping(value = "/editUserFuns")
|
||||||
@RequiresPermissions("user:edit")
|
@RequiresPermissions("user:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@SyncPlatformAdvice(type = SyncTypeEnum.PERSONNEL, isUpdate = true)
|
||||||
public Object editUserFuns() throws Exception {
|
public Object editUserFuns() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -796,6 +802,8 @@ public class UsersController extends BaseController {
|
||||||
FHLOG.save(Jurisdiction.getUsername(), "从系统用户中修改" + pd.getString("USERNAME") + "的小程序菜单权限"); //记录日志
|
FHLOG.save(Jurisdiction.getUsername(), "从系统用户中修改" + pd.getString("USERNAME") + "的小程序菜单权限"); //记录日志
|
||||||
usersService.editUserFuns(pd); //执行修改
|
usersService.editUserFuns(pd); //执行修改
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
map.put("code", "0");
|
||||||
|
map.put("syncInfo", JSONUtils.toJSONString(usersService.findById(pd)));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -804,6 +812,7 @@ public class UsersController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/editUserOwn")
|
@RequestMapping(value = "/editUserOwn")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@SyncPlatformAdvice(type = SyncTypeEnum.PERSONNEL, isUpdate = true)
|
||||||
public Object editUserOwn() throws Exception {
|
public Object editUserOwn() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -825,6 +834,8 @@ public class UsersController extends BaseController {
|
||||||
usersService.editUser(pd); //执行修改
|
usersService.editUser(pd); //执行修改
|
||||||
FHLOG.save(Jurisdiction.getUsername(), "从个人资料中修改" + pd.getString("USERNAME") + "的资料"); //记录日志
|
FHLOG.save(Jurisdiction.getUsername(), "从个人资料中修改" + pd.getString("USERNAME") + "的资料"); //记录日志
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
map.put("code", "0");
|
||||||
|
map.put("syncInfo", JSONUtils.toJSONString(usersService.findById(pd)));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -897,8 +908,9 @@ public class UsersController extends BaseController {
|
||||||
@RequestMapping(value = "/saveUser")
|
@RequestMapping(value = "/saveUser")
|
||||||
@RequiresPermissions("user:add")
|
@RequiresPermissions("user:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@SyncPlatformAdvice(type = SyncTypeEnum.PERSONNEL, isInsert = true)
|
||||||
public Object saveUser() throws Exception {
|
public Object saveUser() throws Exception {
|
||||||
Map<String, String> map = new HashMap<String, String>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -908,107 +920,124 @@ public class UsersController extends BaseController {
|
||||||
pd.put("IP", ""); //IP
|
pd.put("IP", ""); //IP
|
||||||
pd.put("STATUS", "0"); //状态
|
pd.put("STATUS", "0"); //状态
|
||||||
pd.put("ISMAIN", "0"); //状态
|
pd.put("ISMAIN", "0"); //状态
|
||||||
pd.put("ISDELETE", "0"); //是否删除,0表示不删除
|
pd.put("ISDELETE", "1"); //是否删除,0表示不删除
|
||||||
pd.put("SKIN", "pcoded-navbar navbar-image-3,navbar pcoded-header navbar-expand-lg navbar-light header-dark,"); //用户默认皮肤
|
pd.put("SKIN", "pcoded-navbar navbar-image-3,navbar pcoded-header navbar-expand-lg navbar-light header-dark,"); //用户默认皮肤
|
||||||
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), pd.getString("PASSWORD")).toString()); //密码加密
|
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), pd.getString("PASSWORD")).toString()); //密码加密
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
if (null == usersService.findByUsername(pd)) { //判断用户名是否存在
|
pd.put("ISPUSH", "0");
|
||||||
if (pd.getString("ROLE_ID").contains(",")) {
|
Map<String, String> resultMap = doCheck(pd.getString("USERNAME"), pd.getString("USER_ID_CARD"), "");
|
||||||
String roleId = pd.getString("ROLE_ID").substring(0, pd.getString("ROLE_ID").indexOf(","));//截取第一个,之前的数据
|
if (resultMap.get("result").equals("success")) {
|
||||||
String roleIds = pd.getString("ROLE_ID").substring(roleId.length() + 1, pd.getString("ROLE_ID").length());//截取第一个,之后的数据
|
if (null == usersService.findByUsername(pd)) { //判断用户名是否存在
|
||||||
pd.put("ROLE_ID", roleId);
|
if (pd.getString("ROLE_ID").contains(",")) {
|
||||||
pd.put("ROLE_IDS", roleIds);
|
String roleId = pd.getString("ROLE_ID").substring(0, pd.getString("ROLE_ID").indexOf(","));//截取第一个,之前的数据
|
||||||
}
|
String roleIds = pd.getString("ROLE_ID").substring(roleId.length() + 1, pd.getString("ROLE_ID").length());//截取第一个,之后的数据
|
||||||
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
pd.put("ROLE_ID", roleId);
|
||||||
pd.put("IS_ONLINELEARNING", '1');
|
pd.put("ROLE_IDS", roleIds);
|
||||||
}
|
}
|
||||||
// todo
|
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
||||||
// 定位卡号 规则 如果俩个人使用同一一个卡号,最后一个人会是这个卡号。保证一个卡号一个人用。(11.28)
|
pd.put("IS_ONLINELEARNING", '1');
|
||||||
// 不同的公司,它定位卡的配置方案是不一样的,就你像九公司,九公司的卡是随机的。就他不是卡跟着人走,他就一天一变。 目前暂定这样
|
}
|
||||||
if (Tools.notEmpty(pd.getString("CARDNO"))) {
|
// todo
|
||||||
usersService.resetCardNo(pd);
|
// 定位卡号 规则 如果俩个人使用同一一个卡号,最后一个人会是这个卡号。保证一个卡号一个人用。(11.28)
|
||||||
}else {
|
// 不同的公司,它定位卡的配置方案是不一样的,就你像九公司,九公司的卡是随机的。就他不是卡跟着人走,他就一天一变。 目前暂定这样
|
||||||
pd.put("CARDNO",null);
|
if (Tools.notEmpty(pd.getString("CARDNO"))) {
|
||||||
}
|
usersService.resetCardNo(pd);
|
||||||
usersService.saveUser(pd);
|
}else {
|
||||||
//执行保存
|
pd.put("CARDNO",null);
|
||||||
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
}
|
||||||
pd.put("IS_ONLINELEARNING", '1');
|
usersService.saveUser(pd);
|
||||||
if ("select".equals(pd.getString("letDutiesType"))) {
|
//执行保存
|
||||||
pd.put("DUTIES", pd.getString("DUTIES"));
|
if ("true".equals(pd.getString("ISSTUDENT"))) {
|
||||||
} else {
|
pd.put("IS_ONLINELEARNING", '1');
|
||||||
PageData dicPd = new PageData();
|
if ("select".equals(pd.getString("letDutiesType"))) {
|
||||||
dicPd.put("PARENT_ID", "09e36ac01e9540f8bc84eab1c1a78754");
|
pd.put("DUTIES", pd.getString("DUTIES"));
|
||||||
dicPd.put("BIANMA", "zhiwu");
|
} else {
|
||||||
dicPd.put("NAME", pd.getString("DUTIESValue"));
|
PageData dicPd = new PageData();
|
||||||
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
dicPd.put("PARENT_ID", "09e36ac01e9540f8bc84eab1c1a78754");
|
||||||
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
|
dicPd.put("BIANMA", "zhiwu");
|
||||||
}
|
dicPd.put("NAME", pd.getString("DUTIESValue"));
|
||||||
if ("select".equals(pd.getString("letTitleType"))) {
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
||||||
pd.put("TITLE", pd.getString("TITLE"));
|
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
|
||||||
} else {
|
}
|
||||||
PageData dicPd = new PageData();
|
if ("select".equals(pd.getString("letTitleType"))) {
|
||||||
dicPd.put("PARENT_ID", "945a6b10e59946078b500f0fbafa8679");
|
pd.put("TITLE", pd.getString("TITLE"));
|
||||||
dicPd.put("BIANMA", "zhicheng");
|
} else {
|
||||||
dicPd.put("NAME", pd.getString("letTitleValue"));
|
PageData dicPd = new PageData();
|
||||||
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
dicPd.put("PARENT_ID", "945a6b10e59946078b500f0fbafa8679");
|
||||||
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
dicPd.put("BIANMA", "zhicheng");
|
||||||
}
|
dicPd.put("NAME", pd.getString("letTitleValue"));
|
||||||
if ("select".equals(pd.getString("letTypeOfWorkType"))) {
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
||||||
pd.put("TYPE_OF_WORK", pd.getString("TYPE_OF_WORK"));
|
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
|
||||||
} else {
|
}
|
||||||
PageData dicPd = new PageData();
|
if ("select".equals(pd.getString("letTypeOfWorkType"))) {
|
||||||
dicPd.put("PARENT_ID", "55484e491a5e442d839c4595380713ec");
|
pd.put("TYPE_OF_WORK", pd.getString("TYPE_OF_WORK"));
|
||||||
dicPd.put("BIANMA", "gongzhong");
|
} else {
|
||||||
dicPd.put("NAME", pd.getString("letTypeOfWorkValue"));
|
PageData dicPd = new PageData();
|
||||||
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
dicPd.put("PARENT_ID", "55484e491a5e442d839c4595380713ec");
|
||||||
pd.put("TYPE_OF_WORK", dicPd.getString("DICTIONARIES_ID"));
|
dicPd.put("BIANMA", "gongzhong");
|
||||||
}
|
dicPd.put("NAME", pd.getString("letTypeOfWorkValue"));
|
||||||
userInfoService.save(pd);
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
||||||
}
|
pd.put("TYPE_OF_WORK", dicPd.getString("DICTIONARIES_ID"));
|
||||||
String PERSON_TYPE = pd.getString("PERSONNEL_TYPE");
|
}
|
||||||
if (pd.getString("PERSON_TYPE").equals("主要负责人") || pd.getString("PERSON_TYPE").equals("安全管理人员") || pd.getString("PERSON_TYPE").equals("特种作业人员")) {
|
} else {
|
||||||
if ("select".equals(pd.getString("inforpostType"))) {
|
userInfoService.save(pd);
|
||||||
pd.put("INFORPOST", pd.getString("INFORPOST"));
|
}
|
||||||
} else {
|
String PERSON_TYPE = pd.getString("PERSONNEL_TYPE");
|
||||||
PageData dicPd = new PageData();
|
if (pd.getString("PERSON_TYPE").equals("主要负责人") || pd.getString("PERSON_TYPE").equals("安全管理人员") || pd.getString("PERSON_TYPE").equals("特种作业人员")) {
|
||||||
dicPd.put("PARENT_ID", "09e36ac01e9540f8bc84eab1c1a78754");
|
if ("select".equals(pd.getString("inforpostType"))) {
|
||||||
dicPd.put("BIANMA", "zhiwu");
|
pd.put("INFORPOST", pd.getString("INFORPOST"));
|
||||||
dicPd.put("NAME", pd.getString("INFORPOSTValue"));
|
} else {
|
||||||
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
PageData dicPd = new PageData();
|
||||||
pd.put("INFORPOST", dicPd.getString("DICTIONARIES_ID"));
|
dicPd.put("PARENT_ID", "09e36ac01e9540f8bc84eab1c1a78754");
|
||||||
}
|
dicPd.put("BIANMA", "zhiwu");
|
||||||
if ("select".equals(pd.getString("infortitleType"))) {
|
dicPd.put("NAME", pd.getString("INFORPOSTValue"));
|
||||||
pd.put("INFORTITLE", pd.getString("INFORTITLE"));
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
||||||
} else {
|
pd.put("INFORPOST", dicPd.getString("DICTIONARIES_ID"));
|
||||||
PageData dicPd = new PageData();
|
}
|
||||||
dicPd.put("PARENT_ID", "945a6b10e59946078b500f0fbafa8679");
|
if ("select".equals(pd.getString("infortitleType"))) {
|
||||||
dicPd.put("BIANMA", "zhicheng");
|
pd.put("INFORTITLE", pd.getString("INFORTITLE"));
|
||||||
dicPd.put("NAME", pd.getString("INFORTITLEValue"));
|
} else {
|
||||||
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
PageData dicPd = new PageData();
|
||||||
pd.put("INFORTITLE", dicPd.getString("DICTIONARIES_ID"));
|
dicPd.put("PARENT_ID", "945a6b10e59946078b500f0fbafa8679");
|
||||||
}
|
dicPd.put("BIANMA", "zhicheng");
|
||||||
if ("select".equals(pd.getString("inforworkType"))) {
|
dicPd.put("NAME", pd.getString("INFORTITLEValue"));
|
||||||
pd.put("INFORWORK", pd.getString("INFORWORK"));
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
||||||
} else {
|
pd.put("INFORTITLE", dicPd.getString("DICTIONARIES_ID"));
|
||||||
PageData dicPd = new PageData();
|
}
|
||||||
dicPd.put("PARENT_ID", "55484e491a5e442d839c4595380713ec");
|
if ("select".equals(pd.getString("inforworkType"))) {
|
||||||
dicPd.put("BIANMA", "gongzhong");
|
pd.put("INFORWORK", pd.getString("INFORWORK"));
|
||||||
dicPd.put("NAME", pd.getString("INFORWORKValue"));
|
} else {
|
||||||
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
PageData dicPd = new PageData();
|
||||||
pd.put("INFORWORK", dicPd.getString("DICTIONARIES_ID"));
|
dicPd.put("PARENT_ID", "55484e491a5e442d839c4595380713ec");
|
||||||
}
|
dicPd.put("BIANMA", "gongzhong");
|
||||||
pd.put("INFOR_ID", this.get32UUID());
|
dicPd.put("NAME", pd.getString("INFORWORKValue"));
|
||||||
pd.put("USER_ID", ID);
|
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
|
||||||
licenseInforService.save(pd); //保存用户证照信息
|
pd.put("INFORWORK", dicPd.getString("DICTIONARIES_ID"));
|
||||||
|
}
|
||||||
|
pd.put("INFOR_ID", this.get32UUID());
|
||||||
|
pd.put("USER_ID", ID);
|
||||||
|
licenseInforService.save(pd); //保存用户证照信息
|
||||||
|
}
|
||||||
|
//封装调用参数
|
||||||
|
|
||||||
|
} else {
|
||||||
|
map.put("result", "Error");
|
||||||
|
map.put("msg", "用户名重复");
|
||||||
|
return map;
|
||||||
}
|
}
|
||||||
|
FHLOG.save(Jurisdiction.getUsername(), "新增用户:" + pd.getString("USERNAME")); //记录日志
|
||||||
|
PageData userPd = new PageData();
|
||||||
|
userPd.put("USER_ID",ID);
|
||||||
|
PageData userinfo = usersService.findById(userPd);
|
||||||
|
userinfo.put("ISDELETE","0");
|
||||||
|
map.put("USERINFO", userinfo);
|
||||||
|
map.put("USER_ID",ID);
|
||||||
|
map.put("result", errInfo); //返回结果
|
||||||
|
map.put("code", "0");
|
||||||
|
map.put("syncInfo", JSONUtils.toJSONString(userinfo));
|
||||||
} else {
|
} else {
|
||||||
map.put("result", "Error");
|
map.put("result", "您输入的身份证号和用户名二次校验失败,请确认后重新申请"); //返回结果
|
||||||
map.put("msg", "用户名重复");
|
|
||||||
return map;
|
|
||||||
}
|
}
|
||||||
FHLOG.save(Jurisdiction.getUsername(), "新增用户:" + pd.getString("USERNAME")); //记录日志
|
|
||||||
map.put("result", errInfo); //返回结果
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1025,113 +1054,128 @@ public class UsersController extends BaseController {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
FHLOG.save(Jurisdiction.getUsername(), "删除用户ID:" + pd.getString("USER_ID")); //记录日志
|
Map<String, String> returnMap = null;
|
||||||
usersService.deleteUser(pd); //删除用户
|
if (pd.getString("ISPUSH").equals("1")) {
|
||||||
ueditorService.delete(pd); //删除副文本关联数据
|
pd.put("ISDELETE","1");
|
||||||
|
HashMap<String, String> param = new HashMap<>();
|
||||||
|
Set set = pd.keySet();
|
||||||
|
for (Object key : set) {
|
||||||
|
param.put(key.toString(),pd.getString(key.toString()));
|
||||||
|
}
|
||||||
|
String UserDto = JSON.toJSONString(param);
|
||||||
|
String result = HttpClientUtilDoGet.sendHttpPost(tongBuUrl + "/docking/core/user/addOrUpdate", UserDto,param);
|
||||||
|
returnMap = (Map<String, String>) JSON.parse(result);
|
||||||
|
}
|
||||||
|
|
||||||
List<PageData> listIds = listManagerService.listListByUser(pd);
|
if (pd.getString("ISPUSH").equals("0") || returnMap.get("result").equals("success")) {
|
||||||
if (listIds != null && listIds.size() > 0) {
|
FHLOG.save(Jurisdiction.getUsername(), "删除用户ID:" + pd.getString("USER_ID")); //记录日志
|
||||||
for (PageData listPd : listIds) {
|
usersService.deleteUser(pd); //删除用户
|
||||||
PageData pd1 = new PageData();
|
ueditorService.delete(pd); //删除副文本关联数据
|
||||||
pd1.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
List<PageData> listIds = listManagerService.listListByUser(pd);
|
||||||
pd1.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
if (listIds != null && listIds.size() > 0) {
|
||||||
pd1.put("LISTMANAGER_ID", listPd.get("LISTMANAGER_ID"));
|
for (PageData listPd : listIds) {
|
||||||
listManagerService.remove(pd1);
|
PageData pd1 = new PageData();
|
||||||
pd1 = listManagerService.findById(pd1);
|
pd1.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
if (pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
|
pd1.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
if ("listType0005".equals(pd1.get("TYPE").toString())) {
|
pd1.put("LISTMANAGER_ID", listPd.get("LISTMANAGER_ID"));
|
||||||
pd1.put("LISTSTATISTICS_ID", this.get32UUID()); //主键
|
listManagerService.remove(pd1);
|
||||||
pd1.put("STARTTIME", pd1.get("START_DATE").toString() + " 00:00:00");
|
pd1 = listManagerService.findById(pd1);
|
||||||
pd1.put("ENDTIME", pd1.get("END_DATE").toString() + " 23:59:59");
|
if (pd1.get("TYPE") != null && Tools.notEmpty(pd1.get("TYPE").toString())) {
|
||||||
pd1.put("PERIOD", null);
|
if ("listType0005".equals(pd1.get("TYPE").toString())) {
|
||||||
PageData statistics = listStatisticsService.findByCondition(pd1);
|
pd1.put("LISTSTATISTICS_ID", this.get32UUID()); //主键
|
||||||
if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
pd1.put("STARTTIME", pd1.get("START_DATE").toString() + " 00:00:00");
|
||||||
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 2);
|
pd1.put("ENDTIME", pd1.get("END_DATE").toString() + " 23:59:59");
|
||||||
listStatisticsService.edit(statistics);
|
pd1.put("PERIOD", null);
|
||||||
}
|
PageData statistics = listStatisticsService.findByCondition(pd1);
|
||||||
pd1.put("ISSTATISTICS", '0');
|
if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
||||||
// 本期已检查的不计入统计
|
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 2);
|
||||||
checkrecordService.editStatistics(pd1);
|
listStatisticsService.edit(statistics);
|
||||||
} else {
|
|
||||||
if (pd1.get("PERIOD") != null && Tools.notEmpty(pd1.get("PERIOD").toString())) {
|
|
||||||
String period = pd1.get("PERIOD").toString();
|
|
||||||
switch (period) {
|
|
||||||
case "checkPeriod0001"://每日
|
|
||||||
pd1.put("STARTTIME", DateUtil.getDay() + " 00:00:00");
|
|
||||||
pd1.put("ENDTIME", DateUtil.getDay() + " 23:59:59");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0002"://每周
|
|
||||||
pd1.put("STARTTIME", DateUtil.getWeekStart());
|
|
||||||
pd1.put("ENDTIME", DateUtil.getWeekEnd());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0003"://每旬
|
|
||||||
String year = DateUtil.getYear().toString();
|
|
||||||
String month = DateUtil.getMonth().toString();
|
|
||||||
Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
|
|
||||||
String startTime = year + "-" + month + "-";
|
|
||||||
String endTime = year + "-" + month + "-";
|
|
||||||
if (day <= 10) {
|
|
||||||
startTime = startTime + "01 00:00:00";
|
|
||||||
endTime = endTime + "10 23:59:59";
|
|
||||||
} else if (day > 10 && day <= 20) {
|
|
||||||
startTime = startTime + "11 00:00:00";
|
|
||||||
endTime = endTime + "20 23:59:59";
|
|
||||||
} else {
|
|
||||||
startTime = startTime + "21 00:00:00";
|
|
||||||
endTime = DateUtil.getMonthEndDay() + " 23:59:59";
|
|
||||||
}
|
|
||||||
pd1.put("STARTTIME", startTime);
|
|
||||||
pd1.put("ENDTIME", endTime);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0004"://每月
|
|
||||||
pd1.put("STARTTIME", DateUtil.getMonthFirstDay() + " 00:00:00");
|
|
||||||
pd1.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0005"://每季
|
|
||||||
pd1.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00");
|
|
||||||
pd1.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0006"://每年
|
|
||||||
pd1.put("STARTTIME", DateUtil.getCurrYearFirst() + " 00:00:00");
|
|
||||||
pd1.put("ENDTIME", DateUtil.getCurrYearLast() + " 23:59:59");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0007"://半年
|
|
||||||
String byear = DateUtil.getYear().toString();
|
|
||||||
Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
|
|
||||||
if (bmonth <= 6) {
|
|
||||||
pd1.put("STARTTIME", byear + "-01-01 00:00:00");
|
|
||||||
pd1.put("ENDTIME", byear + "-06-30 23:59:59");
|
|
||||||
} else if (bmonth > 6) {
|
|
||||||
pd1.put("STARTTIME", byear + "-07-01 00:00:00");
|
|
||||||
pd1.put("ENDTIME", byear + "-12-31 23:59:59");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
pd1.put("ISSTATISTICS", '0');
|
||||||
PageData statistics = listStatisticsService.findByCondition(pd1);
|
// 本期已检查的不计入统计
|
||||||
if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
checkrecordService.editStatistics(pd1);
|
||||||
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 1);
|
} else {
|
||||||
listStatisticsService.edit(statistics);
|
if (pd1.get("PERIOD") != null && Tools.notEmpty(pd1.get("PERIOD").toString())) {
|
||||||
}
|
String period = pd1.get("PERIOD").toString();
|
||||||
|
switch (period) {
|
||||||
|
case "checkPeriod0001"://每日
|
||||||
|
pd1.put("STARTTIME", DateUtil.getDay() + " 00:00:00");
|
||||||
|
pd1.put("ENDTIME", DateUtil.getDay() + " 23:59:59");
|
||||||
|
break;
|
||||||
|
|
||||||
pd1.put("ISSTATISTICS", '0');
|
case "checkPeriod0002"://每周
|
||||||
// 本期已检查的不计入统计
|
pd1.put("STARTTIME", DateUtil.getWeekStart());
|
||||||
checkrecordService.editStatistics(pd1);
|
pd1.put("ENDTIME", DateUtil.getWeekEnd());
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "checkPeriod0003"://每旬
|
||||||
|
String year = DateUtil.getYear().toString();
|
||||||
|
String month = DateUtil.getMonth().toString();
|
||||||
|
Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
|
||||||
|
String startTime = year + "-" + month + "-";
|
||||||
|
String endTime = year + "-" + month + "-";
|
||||||
|
if (day <= 10) {
|
||||||
|
startTime = startTime + "01 00:00:00";
|
||||||
|
endTime = endTime + "10 23:59:59";
|
||||||
|
} else if (day > 10 && day <= 20) {
|
||||||
|
startTime = startTime + "11 00:00:00";
|
||||||
|
endTime = endTime + "20 23:59:59";
|
||||||
|
} else {
|
||||||
|
startTime = startTime + "21 00:00:00";
|
||||||
|
endTime = DateUtil.getMonthEndDay() + " 23:59:59";
|
||||||
|
}
|
||||||
|
pd1.put("STARTTIME", startTime);
|
||||||
|
pd1.put("ENDTIME", endTime);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "checkPeriod0004"://每月
|
||||||
|
pd1.put("STARTTIME", DateUtil.getMonthFirstDay() + " 00:00:00");
|
||||||
|
pd1.put("ENDTIME", DateUtil.getMonthEndDay() + " 23:59:59");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "checkPeriod0005"://每季
|
||||||
|
pd1.put("STARTTIME", DateUtil.quarterStart() + " 00:00:00");
|
||||||
|
pd1.put("ENDTIME", DateUtil.quarterEnd() + " 23:59:59");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "checkPeriod0006"://每年
|
||||||
|
pd1.put("STARTTIME", DateUtil.getCurrYearFirst() + " 00:00:00");
|
||||||
|
pd1.put("ENDTIME", DateUtil.getCurrYearLast() + " 23:59:59");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "checkPeriod0007"://半年
|
||||||
|
String byear = DateUtil.getYear().toString();
|
||||||
|
Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
|
||||||
|
if (bmonth <= 6) {
|
||||||
|
pd1.put("STARTTIME", byear + "-01-01 00:00:00");
|
||||||
|
pd1.put("ENDTIME", byear + "-06-30 23:59:59");
|
||||||
|
} else if (bmonth > 6) {
|
||||||
|
pd1.put("STARTTIME", byear + "-07-01 00:00:00");
|
||||||
|
pd1.put("ENDTIME", byear + "-12-31 23:59:59");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PageData statistics = listStatisticsService.findByCondition(pd1);
|
||||||
|
if (statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
||||||
|
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString()) - 1);
|
||||||
|
listStatisticsService.edit(statistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
pd1.put("ISSTATISTICS", '0');
|
||||||
|
// 本期已检查的不计入统计
|
||||||
|
checkrecordService.editStatistics(pd1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
map.put("result", errInfo); //返回结果
|
||||||
|
} else {
|
||||||
|
map.put("result", "error"); //返回结果
|
||||||
}
|
}
|
||||||
|
|
||||||
map.put("result", errInfo); //返回结果
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2429,4 +2473,120 @@ public class UsersController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/goCheck")
|
||||||
|
@ResponseBody
|
||||||
|
public Object goCheck() throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
HashMap<String, String> param = new HashMap<>();
|
||||||
|
param.put("USERNAME",pd.getString("USERNAME"));
|
||||||
|
param.put("CARD_NO",pd.getString("CARD_NO"));
|
||||||
|
if (!Tools.isEmpty(pd.get("USER_ID"))) {
|
||||||
|
param.put("USER_ID",pd.getString("USER_ID"));
|
||||||
|
} else {
|
||||||
|
param.put("USER_ID","");
|
||||||
|
}
|
||||||
|
return doCheck(param.get("USERNAME"),param.get("CARD_NO"),param.get("USER_ID"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> doCheck(String USERNAME, String CARD_NO, String USER_ID) throws Exception {
|
||||||
|
String result = HttpClientUtilDoGet.sendHttpGet(tongBuUrl + "/docking/core/user/getCheck"+"?USERNAME="+USERNAME+"&CARD_NO="+CARD_NO+"&USER_ID="+USER_ID);
|
||||||
|
Map<String, String> returnMap = (Map<String, String>) JSON.parse(result);
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/goPush")
|
||||||
|
@ResponseBody
|
||||||
|
public Object goPush() throws Exception {
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||||
|
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //创建人
|
||||||
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
|
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
|
||||||
|
PageData sexPd = new PageData();
|
||||||
|
if (Tools.notEmpty(pd.getString("SEX"))) {
|
||||||
|
sexPd.put("DICTIONARIES_ID",pd.getString("SEX"));
|
||||||
|
PageData byId = dictionariesService.findById(sexPd);
|
||||||
|
if (Tools.notEmpty(byId)) {
|
||||||
|
pd.put("SEX",byId.getString("NAME"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
StringBuilder ORG_PATH = new StringBuilder();
|
||||||
|
boolean hasPid = true;
|
||||||
|
PageData department = departmentService.findById(pd);
|
||||||
|
ORG_PATH.insert(0, department.getString("NAME"));
|
||||||
|
String deptId = department.getString("PARENT_ID");
|
||||||
|
PageData deptPd = new PageData();
|
||||||
|
deptPd.put("DEPARTMENT_ID",deptId);
|
||||||
|
if (!department.get("PARENT_ID").equals("0")) {
|
||||||
|
while (hasPid) {
|
||||||
|
PageData dept = departmentService.findById(deptPd);
|
||||||
|
if (dept.get("PARENT_ID").equals("0")) {
|
||||||
|
hasPid = false;
|
||||||
|
} else {
|
||||||
|
deptId = dept.getString("PARENT_ID");
|
||||||
|
deptPd.put("DEPARTMENT_ID",deptId);
|
||||||
|
}
|
||||||
|
ORG_PATH.insert(0, dept.getString("NAME") + "/");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pd.put("ORG_PATH",ORG_PATH);
|
||||||
|
HashMap<String, Object> param = new HashMap<>();
|
||||||
|
Set set = pd.keySet();
|
||||||
|
for (Object key : set) {
|
||||||
|
param.put(key.toString(),pd.getString(key.toString()));
|
||||||
|
}
|
||||||
|
//要推送的照片集合
|
||||||
|
List<PageData> userPhotoDTOList = new ArrayList<>();
|
||||||
|
//人脸照片
|
||||||
|
PageData photoPd = new PageData();
|
||||||
|
photoPd.put("USER_PHOTO_ID",pd.getString("IMGFILES_ID"));
|
||||||
|
photoPd.put("USER_ID",pd.getString("FOREIGN_KEY"));
|
||||||
|
photoPd.put("PHOTO_URL",pd.getString("FILEPATH"));
|
||||||
|
photoPd.put("PHOTO_TYPE","1");
|
||||||
|
photoPd.put("ISDELETE","0");
|
||||||
|
userPhotoDTOList.add(photoPd);
|
||||||
|
param.put("userPhotoDTOList", userPhotoDTOList);
|
||||||
|
String userResult = HttpClientUtilDoGet.sendHttpGet(tongBuUrl + "/docking/core/user/getUserInfoById"+"?USER_ID="+pd.getString("USER_ID"));
|
||||||
|
Map<String, Object> userReturnMap = (Map<String, Object>) JSON.parse(userResult);
|
||||||
|
if (userReturnMap.get("USERINFO") != null) { //有用户数据获取修改信息
|
||||||
|
PageData userInfoPd = JSON.parseObject(userReturnMap.get("USERINFO").toString(), PageData.class);
|
||||||
|
String updateDescription = UpdateEnum.getUpdateDescription(userInfoPd, pd);
|
||||||
|
param.put("REMARKS",updateDescription);
|
||||||
|
|
||||||
|
} else { //没有数据则获取新增信息
|
||||||
|
String insertDescription = UpdateEnum.getInsertDescription(pd);
|
||||||
|
param.put("REMARKS",insertDescription);
|
||||||
|
}
|
||||||
|
String UserDto = JSON.toJSONString(param);
|
||||||
|
String result = HttpClientUtilDoGet.sendHttpPost(tongBuUrl + "/docking/core/user/addOrUpdate", UserDto,null);
|
||||||
|
Map<String, String> returnMap = (Map<String, String>) JSON.parse(result);
|
||||||
|
if (returnMap.get("result").equals("success")) {
|
||||||
|
PageData pushPd = new PageData();
|
||||||
|
pushPd.put("ISPUSH","1");
|
||||||
|
if (!Tools.isEmpty(pd.get("operateType")) && pd.getString("operateType").equals("delete")) {
|
||||||
|
pushPd.put("ISDELETE","1");
|
||||||
|
} else {
|
||||||
|
pushPd.put("ISDELETE","0");
|
||||||
|
}
|
||||||
|
pushPd.put("USER_ID",pd.getString("USER_ID"));
|
||||||
|
usersService.editPushStatus(pushPd);
|
||||||
|
}
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ public class TenCorpDto {
|
||||||
private String producer_name = "qa-prevention-cfd";
|
private String producer_name = "qa-prevention-cfd";
|
||||||
private String topic;
|
private String topic;
|
||||||
//印记(方便寻找该条请求)
|
//印记(方便寻找该条请求)
|
||||||
|
// 中台根据这个区分同步的消息类型(人员同步/隐患同步/安检同步等)
|
||||||
private String mark;
|
private String mark;
|
||||||
// 标记名称
|
// 标记名称
|
||||||
private String mark_name;
|
private String mark_name;
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.zcloud.dto;
|
||||||
|
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.util.Tools;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum UpdateEnum {
|
||||||
|
// USER_ID("USER_ID","USER_ID","用户ID"),
|
||||||
|
USERNAME("USERNAME","USERNAME","用户名"),
|
||||||
|
NAME("NAME","NAME","姓名"),
|
||||||
|
// CORPINFO_ID("CORPINFO_ID","CORPINFO_ID","单位ID"),
|
||||||
|
CORPINFO_NAME("CORPINFO_NAME","CORPINFO_NAME","单位名称"),
|
||||||
|
EMAIL("EMAIL","EMAIL","邮箱地址"),
|
||||||
|
CARD_TYPE("CARD_TYPE","CARD_TYPE","证件类型"),
|
||||||
|
CARD_TYPE_NAME("CARD_TYPE_NAME","CARD_TYPE_NAME","证件名称"),
|
||||||
|
CARD_NO("CARD_NO","CARD_NO","证件号码"),
|
||||||
|
NATION("NATION","NATION","民族"),
|
||||||
|
SEX("SEX","SEX","性别"),
|
||||||
|
ORG_PATH("ORG_PATH","ORG_PATH","组织路径"),
|
||||||
|
USER_TYPE("USER_TYPE","USER_TYPE","用户类型"),
|
||||||
|
// ISDELETE("ISDELETE","ISDELETE","是否删除"),
|
||||||
|
// CREATOR("CREATOR","CREATOR","创建人"),
|
||||||
|
// CREATTIME("CREATTIME","CREATTIME","创建时间"),
|
||||||
|
// OPERATOR("OPERATOR","OPERATOR","修改人"),
|
||||||
|
// OPERATTIME("OPERATTIME","OPERATTIME","修改时间"),
|
||||||
|
// DEPARTMENT_ID("DEPARTMENT_ID","DEPARTMENT_ID","部门ID"),
|
||||||
|
DEPARTMENT_NAME("DEPARTMENT_NAME","DEPARTMENT_NAME","部门名称");
|
||||||
|
|
||||||
|
private String enterpriseKey; //企业端字段
|
||||||
|
|
||||||
|
private String centerKey; //中台字段
|
||||||
|
|
||||||
|
private String name; //字段名称
|
||||||
|
|
||||||
|
public String getEnterpriseKey() {
|
||||||
|
return enterpriseKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提供修改前后的pd,根据提供参数自动提取修改描述 origin 为原值 target 为新值
|
||||||
|
*/
|
||||||
|
public static String getUpdateDescription(PageData origin,PageData target) {
|
||||||
|
StringBuilder desc = new StringBuilder();
|
||||||
|
for (UpdateEnum keyMap : values()) {
|
||||||
|
//获取key centerKey为从人员中台获取的旧数据key enterpriseKey为当前端要推送的新数据key
|
||||||
|
String centerKey = keyMap.getCenterKey();
|
||||||
|
String enterpriseKey = keyMap.getEnterpriseKey();
|
||||||
|
if (origin.containsKey(centerKey) && target.containsKey(enterpriseKey)) {
|
||||||
|
//取出源&目标值
|
||||||
|
String originValue = origin.getString(centerKey);
|
||||||
|
String targetValue = target.getString(enterpriseKey);
|
||||||
|
if (!originValue.equals(targetValue)){
|
||||||
|
desc.append(keyMap.getName()).append(": 由旧值\"").append(originValue).append("\"变为了\"").append(targetValue).append("\"; \n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return desc.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提供新增的数据
|
||||||
|
*/
|
||||||
|
public static String getInsertDescription(PageData origin) {
|
||||||
|
StringBuilder remarks = new StringBuilder();
|
||||||
|
for (UpdateEnum keyMap : values()) {
|
||||||
|
//获取key
|
||||||
|
String key = keyMap.getEnterpriseKey();
|
||||||
|
if (origin.containsKey(key) && Tools.notEmpty(origin.getString(key))) {
|
||||||
|
//取出源&目标值
|
||||||
|
String originValue = origin.getString(key);
|
||||||
|
remarks.append(keyMap.getName()).append(": 新增的值为\"").append(originValue).append("\"; \n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return remarks.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.zcloud.flow.util;
|
||||||
|
|
||||||
|
import com.zcloud.util.Base64Utils;
|
||||||
|
|
||||||
|
import javax.crypto.Cipher;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.security.Key;
|
||||||
|
import java.security.KeyFactory;
|
||||||
|
import java.security.spec.KeySpec;
|
||||||
|
import java.security.spec.PKCS8EncodedKeySpec;
|
||||||
|
import java.security.spec.X509EncodedKeySpec;
|
||||||
|
|
||||||
|
public class GJRSAUtils {
|
||||||
|
private static final String CRYPTO_METHOD = "RSA";
|
||||||
|
private static final String CYPHER = "RSA/ECB/PKCS1Padding";
|
||||||
|
private static final String CHARSET = "UTF-8";
|
||||||
|
|
||||||
|
private GJRSAUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String encrypt(String clearText, String pubKey) {
|
||||||
|
String encryptedBase64 = "";
|
||||||
|
ByteArrayOutputStream out = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
byte[] bs = clearText.getBytes(CHARSET);
|
||||||
|
out = new ByteArrayOutputStream();
|
||||||
|
int LEN = 128;
|
||||||
|
byte[] tmp = new byte[LEN];
|
||||||
|
int length = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < bs.length; ++i) {
|
||||||
|
if (length == LEN) {
|
||||||
|
byte[] bb = encrypt(tmp, 0, length, pubKey);
|
||||||
|
out.write(bb);
|
||||||
|
tmp = new byte[LEN];
|
||||||
|
length = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp[length] = bs[i];
|
||||||
|
++length;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (length > 0) {
|
||||||
|
byte[] bb = encrypt(tmp, 0, length, pubKey);
|
||||||
|
out.write(bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
encryptedBase64 = new String(Base64Utils.encode(out.toByteArray()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (out != null) {
|
||||||
|
try {
|
||||||
|
out.close();
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return encryptedBase64.replaceAll("(\\r|\\n)", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String decrypt(String encryptedBase64, String privateKey) {
|
||||||
|
String decryptedString = "";
|
||||||
|
ByteArrayOutputStream out = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
byte[] encryptedBytes = Base64Utils.decode(encryptedBase64);
|
||||||
|
out = new ByteArrayOutputStream();
|
||||||
|
int LEN = 256;
|
||||||
|
byte[] tmp = new byte[LEN];
|
||||||
|
int length = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < encryptedBytes.length; ++i) {
|
||||||
|
if (length == LEN) {
|
||||||
|
byte[] bb = decrypt(tmp, 0, length, privateKey);
|
||||||
|
out.write(bb);
|
||||||
|
tmp = new byte[LEN];
|
||||||
|
length = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp[length] = encryptedBytes[i];
|
||||||
|
++length;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (length > 0) {
|
||||||
|
byte[] bb = decrypt(tmp, 0, length, privateKey);
|
||||||
|
out.write(bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
decryptedString = new String(out.toByteArray(), CHARSET);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (out != null) {
|
||||||
|
try {
|
||||||
|
out.close();
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return decryptedString;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static byte[] encrypt(byte[] bs, int index, int length, String pub_key) throws Exception {
|
||||||
|
KeyFactory keyFac = KeyFactory.getInstance(CRYPTO_METHOD);
|
||||||
|
KeySpec keySpec = new X509EncodedKeySpec(Base64Utils.decode(pub_key.trim()));
|
||||||
|
Key key = keyFac.generatePublic(keySpec);
|
||||||
|
Cipher cipher = Cipher.getInstance(CYPHER);
|
||||||
|
cipher.init(1, key);
|
||||||
|
return cipher.doFinal(bs, index, length);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static byte[] decrypt(byte[] encryptedBytes, int index, int length, String private_key) throws Exception {
|
||||||
|
KeyFactory keyFac = KeyFactory.getInstance(CRYPTO_METHOD);
|
||||||
|
KeySpec keySpec = new PKCS8EncodedKeySpec(Base64Utils.decode(private_key.trim()));
|
||||||
|
Key key = keyFac.generatePrivate(keySpec);
|
||||||
|
Cipher cipher = Cipher.getInstance(CYPHER);
|
||||||
|
cipher.init(2, key);
|
||||||
|
return cipher.doFinal(encryptedBytes, index, length);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.zcloud.flow.util;
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.security.MessageDigest;
|
||||||
|
|
||||||
|
public class GJSHAUtils {
|
||||||
|
private static final String[] HEX_DIGITS = new String[]{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"};
|
||||||
|
|
||||||
|
private GJSHAUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String sha256(String text) {
|
||||||
|
try {
|
||||||
|
MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
|
||||||
|
byte[] bytes = text.getBytes(StandardCharsets.UTF_8);
|
||||||
|
messageDigest.update(bytes);
|
||||||
|
return byteArrayToHexString(messageDigest.digest());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String sha256(byte[] bytes) {
|
||||||
|
try {
|
||||||
|
MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
|
||||||
|
messageDigest.update(bytes);
|
||||||
|
return byteArrayToHexString(messageDigest.digest());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String byteArrayToHexString(byte[] bytes) {
|
||||||
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
|
int bytesLen = bytes.length;
|
||||||
|
for (int i = 0; i < bytesLen; ++i) {
|
||||||
|
byte tem = bytes[i];
|
||||||
|
stringBuilder.append(byteToHexString(tem));
|
||||||
|
}
|
||||||
|
return stringBuilder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String byteToHexString(byte b) {
|
||||||
|
int n = b;
|
||||||
|
if (b < 0) {
|
||||||
|
n = 256 + b;
|
||||||
|
}
|
||||||
|
int d1 = n / 16;
|
||||||
|
int d2 = n % 16;
|
||||||
|
return HEX_DIGITS[d1] + HEX_DIGITS[d2];
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,164 @@
|
||||||
|
package com.zcloud.flow.util;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.RandomUtil;
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.alibaba.fastjson.TypeReference;
|
||||||
|
import com.zcloud.flow.util.dto.UserDTO;
|
||||||
|
import lombok.extern.apachecommons.CommonsLog;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工匠学院
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class GJSendMessageUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工匠学苑 服务地址(测试环境)
|
||||||
|
**/
|
||||||
|
@Value("${gongJiangXueYuanTestUrl}")
|
||||||
|
private String SERVER_URL_TEST;
|
||||||
|
/**
|
||||||
|
* 工匠学苑 服务地址(生产环境)
|
||||||
|
**/
|
||||||
|
@Value("${gongJiangXueYuanProdUrl}")
|
||||||
|
private String SERVER_URL_PROD;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工匠学苑 RSA公钥
|
||||||
|
**/
|
||||||
|
@Value("${gongJiangXueYuanSendPublicKey}")
|
||||||
|
private String RSA_PUBLIC_KEY;
|
||||||
|
/**
|
||||||
|
* 系统对接密钥
|
||||||
|
**/
|
||||||
|
@Value("${gongJiangXueYuanSendPrivateKey}")
|
||||||
|
private final String SECRET_KEY = "58e5e358b220335e7b1c6cc3576ceecc28b4a95d96cbbe0";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签名 header
|
||||||
|
**/
|
||||||
|
public static final String SIGN_HEADER = "gjxy-sign";
|
||||||
|
/**
|
||||||
|
* 随机字符串 header
|
||||||
|
**/
|
||||||
|
public static final String NONCE_HEADER = "gjxy-nonce";
|
||||||
|
/**
|
||||||
|
* 时间戳 header
|
||||||
|
**/
|
||||||
|
public static final String TIMESTAMP_HEADER = "gjxy-timestamp";
|
||||||
|
|
||||||
|
public void sendMessage(List<UserDTO> users) throws Exception {
|
||||||
|
|
||||||
|
Map<String, Object> paramDataMap = new HashMap<>();
|
||||||
|
paramDataMap.put("userList", users);
|
||||||
|
String body = "";
|
||||||
|
try {
|
||||||
|
// 发起请求
|
||||||
|
body = this.createPostFormHttpRequest("/API-BACKEND/openapi/user/v1/syncNotify", paramDataMap);
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new RuntimeException("网络通信异常");
|
||||||
|
}
|
||||||
|
Map<String, String> _body = JSONObject.parseObject(body, new TypeReference<Map<String, String>>() {});
|
||||||
|
Map<String, String> data = JSONObject.parseObject(_body.get("data"), new TypeReference<Map<String, String>>() {});
|
||||||
|
if (!"1".equals(_body.get("code"))) {
|
||||||
|
System.out.println(_body.get("message"));
|
||||||
|
throw new RuntimeException("工匠学院异常,请联系学院老师");
|
||||||
|
}
|
||||||
|
if (!data.get("syncUserTotal").equals(data.get("syncSuccessCount"))){
|
||||||
|
String errorMsg = JSONObject.parseArray(data.get("msgList"), Map.class).stream().map(e -> "[" + e.get("msg") + "]").collect(Collectors.joining());
|
||||||
|
throw new RuntimeException("工匠学院异常,请联系学院老师。错误信息:" + errorMsg);
|
||||||
|
}
|
||||||
|
System.out.println("==========================");
|
||||||
|
System.out.println(body);
|
||||||
|
System.out.println("==========================");
|
||||||
|
System.out.println(JSONObject.toJSONString(paramDataMap));
|
||||||
|
System.out.println("==========================");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* post请求
|
||||||
|
*
|
||||||
|
* @param uri 接口地址
|
||||||
|
* @param paramDataMap 请求参数(明文)
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String createPostFormHttpRequest(String uri, Map<String, Object> paramDataMap) throws Exception {
|
||||||
|
// 参数RSA加密
|
||||||
|
String paramDataJsonStr = JSON.toJSONString(paramDataMap);
|
||||||
|
String paramDataRsaEncrypt = GJRSAUtils.encrypt(paramDataJsonStr, RSA_PUBLIC_KEY);
|
||||||
|
|
||||||
|
// 请求参数
|
||||||
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("param", paramDataRsaEncrypt);
|
||||||
|
|
||||||
|
// 时间戳
|
||||||
|
String timestamp = String.valueOf(System.currentTimeMillis());
|
||||||
|
// 随机字符串
|
||||||
|
String nonce = RandomUtil.randomString(16);
|
||||||
|
// 签名
|
||||||
|
String sign = signBySHA256(SECRET_KEY, nonce, timestamp, paramMap);
|
||||||
|
Map<String, Object> lmap = new HashMap<>();
|
||||||
|
lmap.put("param", paramDataMap);
|
||||||
|
HttpResponse response = HttpUtil.createPost(SERVER_URL_PROD + uri)
|
||||||
|
.header(NONCE_HEADER, nonce)
|
||||||
|
.header(SIGN_HEADER, sign)
|
||||||
|
.header(TIMESTAMP_HEADER, timestamp)
|
||||||
|
.form("param", paramDataRsaEncrypt)
|
||||||
|
.execute();
|
||||||
|
System.out.println(response.body());
|
||||||
|
return response.body();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建签名
|
||||||
|
*
|
||||||
|
* @param secretKey 对接密钥
|
||||||
|
* @param nonce 随机字符串
|
||||||
|
* @param timestamp 时间戳
|
||||||
|
* @param paramMap 请求参数(明文)
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
private static String signBySHA256(String secretKey, String nonce, String timestamp, Map<String, Object> paramMap) {
|
||||||
|
try {
|
||||||
|
// 参数名排序
|
||||||
|
List<String> paramNames = new ArrayList<>(paramMap.keySet());
|
||||||
|
Collections.sort(paramNames);
|
||||||
|
StringBuilder result = new StringBuilder();
|
||||||
|
// 拼接参数字符串
|
||||||
|
for (String paramName : paramNames) {
|
||||||
|
if (result.length() > 1) {
|
||||||
|
result.append("|");
|
||||||
|
}
|
||||||
|
if (paramName != null && paramName.length() > 0) {
|
||||||
|
String value;
|
||||||
|
if (paramMap.get(paramName) == null) {
|
||||||
|
value = "";
|
||||||
|
} else {
|
||||||
|
value = paramMap.get(paramName).toString();
|
||||||
|
if (value.length() > 4096) {
|
||||||
|
value = value.substring(0, 4096);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.append(paramName).append("=").append(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.append(":").append(nonce).append(":").append(secretKey).append("&").append(timestamp);
|
||||||
|
return GJSHAUtils.sha256(result.toString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.zcloud.flow.util.dto;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
public class UserDTO {
|
||||||
|
/**
|
||||||
|
* 用户名
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String realName;
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
private String userSex;
|
||||||
|
/**
|
||||||
|
* 身份证号码
|
||||||
|
*/
|
||||||
|
private String idCard;
|
||||||
|
/**
|
||||||
|
* 组织树(所属企业/部门)
|
||||||
|
* 示例:河北XXX总公司/河北XXX分公司/XXX部门
|
||||||
|
*/
|
||||||
|
private String orgTree;
|
||||||
|
/**
|
||||||
|
* 免冠照片url地址
|
||||||
|
*/
|
||||||
|
private String avatarUrl;
|
||||||
|
/**
|
||||||
|
* 手机号码
|
||||||
|
*/
|
||||||
|
private String phoneNumber;
|
||||||
|
}
|
|
@ -3,14 +3,20 @@ package com.zcloud.flow.xgf.GuFen;
|
||||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||||
import com.yomahub.liteflow.core.NodeComponent;
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.flow.util.GJSendMessageUtil;
|
||||||
|
import com.zcloud.flow.util.dto.UserDTO;
|
||||||
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
|
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
|
||||||
|
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
||||||
import com.zcloud.service.xgf.XgfUserService;
|
import com.zcloud.service.xgf.XgfUserService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@LiteflowComponent("GuFenSupervise")
|
@LiteflowComponent("GuFenSupervise")
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
|
@ -25,6 +31,13 @@ public class GuFenSupervise extends NodeComponent {
|
||||||
@Resource
|
@Resource
|
||||||
private XgfUserMapper xgfUserMapper;
|
private XgfUserMapper xgfUserMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private XgfUserDetailsMapper xgfUserDetailsMapper;
|
||||||
|
@Resource
|
||||||
|
private GJSendMessageUtil gjSendMessageUtil;
|
||||||
|
@Value("${gongJiangXueYuanGetImgUrl}")
|
||||||
|
private String imgBaseUrl;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAccess() {
|
public boolean isAccess() {
|
||||||
XgfFlowDto info = this.getRequestData();
|
XgfFlowDto info = this.getRequestData();
|
||||||
|
@ -83,7 +96,22 @@ public class GuFenSupervise extends NodeComponent {
|
||||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||||
entity.put("STATUS", "2");
|
entity.put("STATUS", "2");
|
||||||
xgfUserMapper.edit(entity);
|
xgfUserMapper.edit(entity);
|
||||||
|
// created by liu jun 2024-06-26 工匠学院对接
|
||||||
|
condition.clear();
|
||||||
|
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
|
||||||
|
PageData entityInfo = xgfUserDetailsMapper.findById(condition);
|
||||||
|
UserDTO userDTO = UserDTO.builder()
|
||||||
|
.userName(entity.getString("USERNAME"))
|
||||||
|
.realName(entity.getString("NAME"))
|
||||||
|
.userSex("0".equals(entityInfo.getString("SEX")) ? "男" : "女")
|
||||||
|
.phoneNumber(entity.getString("USERNAME"))
|
||||||
|
.idCard(entityInfo.getString("CARD_ID"))
|
||||||
|
.orgTree("集团外公司(含外协单位)/"+ entity.getString("BELONG_TO_CORP_NAME"))
|
||||||
|
.avatarUrl(imgBaseUrl + entityInfo.getString("PHOTO"))
|
||||||
|
.build();
|
||||||
|
List<UserDTO> list = new ArrayList<UserDTO>();
|
||||||
|
list.add(userDTO);
|
||||||
|
gjSendMessageUtil.sendMessage(list);
|
||||||
// 保存操作记录
|
// 保存操作记录
|
||||||
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,22 @@ package com.zcloud.flow.xgf.GuFen;
|
||||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||||
import com.yomahub.liteflow.core.NodeComponent;
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.flow.util.GJSendMessageUtil;
|
||||||
|
import com.zcloud.flow.util.dto.UserDTO;
|
||||||
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
|
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
|
||||||
|
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
||||||
import com.zcloud.service.xgf.XgfUserService;
|
import com.zcloud.service.xgf.XgfUserService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
import com.zcloud.util.Jurisdiction;
|
import com.zcloud.util.Jurisdiction;
|
||||||
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@LiteflowComponent("GuFenWeiTuoSupervise")
|
@LiteflowComponent("GuFenWeiTuoSupervise")
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
|
@ -30,6 +36,13 @@ public class GuFenWeiTuoSupervise extends NodeComponent {
|
||||||
@Resource
|
@Resource
|
||||||
private CorpInfoMapper corpInfoMapper;
|
private CorpInfoMapper corpInfoMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private XgfUserDetailsMapper xgfUserDetailsMapper;
|
||||||
|
@Resource
|
||||||
|
private GJSendMessageUtil gjSendMessageUtil;
|
||||||
|
@Value("${gongJiangXueYuanGetImgUrl}")
|
||||||
|
private String imgBaseUrl;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAccess() {
|
public boolean isAccess() {
|
||||||
System.out.println("2???????");
|
System.out.println("2???????");
|
||||||
|
@ -87,6 +100,22 @@ public class GuFenWeiTuoSupervise extends NodeComponent {
|
||||||
entity.put("STATUS", "2");
|
entity.put("STATUS", "2");
|
||||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||||
xgfUserMapper.edit(entity);
|
xgfUserMapper.edit(entity);
|
||||||
|
// created by liu jun 2024-06-26 工匠学院对接
|
||||||
|
condition.clear();
|
||||||
|
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
|
||||||
|
PageData entityInfo = xgfUserDetailsMapper.findById(condition);
|
||||||
|
UserDTO userDTO = UserDTO.builder()
|
||||||
|
.userName(entity.getString("USERNAME"))
|
||||||
|
.realName(entity.getString("NAME"))
|
||||||
|
.userSex("0".equals(entityInfo.getString("SEX")) ? "男" : "女")
|
||||||
|
.phoneNumber(entity.getString("USERNAME"))
|
||||||
|
.idCard(entityInfo.getString("CARD_ID"))
|
||||||
|
.orgTree("集团外公司(含外协单位)/"+ entity.getString("BELONG_TO_CORP_NAME"))
|
||||||
|
.avatarUrl(imgBaseUrl + entityInfo.getString("PHOTO"))
|
||||||
|
.build();
|
||||||
|
List<UserDTO> list = new ArrayList<UserDTO>();
|
||||||
|
list.add(userDTO);
|
||||||
|
gjSendMessageUtil.sendMessage(list);
|
||||||
|
|
||||||
// 保存操作记录
|
// 保存操作记录
|
||||||
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
||||||
|
|
|
@ -3,14 +3,21 @@ package com.zcloud.flow.xgf.JiTuan;
|
||||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||||
import com.yomahub.liteflow.core.NodeComponent;
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.flow.util.GJSendMessageUtil;
|
||||||
|
import com.zcloud.flow.util.GJSendMessageUtil;
|
||||||
|
import com.zcloud.flow.util.dto.UserDTO;
|
||||||
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
||||||
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
|
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
|
||||||
|
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
||||||
import com.zcloud.service.xgf.XgfUserService;
|
import com.zcloud.service.xgf.XgfUserService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@LiteflowComponent("JiTuanSupervise")
|
@LiteflowComponent("JiTuanSupervise")
|
||||||
public class JiTuanSupervise extends NodeComponent {
|
public class JiTuanSupervise extends NodeComponent {
|
||||||
|
@ -24,6 +31,13 @@ public class JiTuanSupervise extends NodeComponent {
|
||||||
@Resource
|
@Resource
|
||||||
private XgfUserMapper xgfUserMapper;
|
private XgfUserMapper xgfUserMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private XgfUserDetailsMapper xgfUserDetailsMapper;
|
||||||
|
@Resource
|
||||||
|
private GJSendMessageUtil gjSendMessageUtil;
|
||||||
|
@Value("${gongJiangXueYuanGetImgUrl}")
|
||||||
|
private String imgBaseUrl;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAccess() {
|
public boolean isAccess() {
|
||||||
|
|
||||||
|
@ -85,7 +99,22 @@ public class JiTuanSupervise extends NodeComponent {
|
||||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||||
entity.put("STATUS", "2");
|
entity.put("STATUS", "2");
|
||||||
xgfUserMapper.edit(entity);
|
xgfUserMapper.edit(entity);
|
||||||
|
// created by liu jun 2024-06-26 工匠学院对接
|
||||||
|
condition.clear();
|
||||||
|
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
|
||||||
|
PageData entityInfo = xgfUserDetailsMapper.findById(condition);
|
||||||
|
UserDTO userDTO = UserDTO.builder()
|
||||||
|
.userName(entity.getString("USERNAME"))
|
||||||
|
.realName(entity.getString("NAME"))
|
||||||
|
.userSex("0".equals(entityInfo.getString("SEX")) ? "男" : "女")
|
||||||
|
.phoneNumber(entity.getString("USERNAME"))
|
||||||
|
.idCard(entityInfo.getString("CARD_ID"))
|
||||||
|
.orgTree("集团外公司(含外协单位)/"+ entity.getString("BELONG_TO_CORP_NAME"))
|
||||||
|
.avatarUrl(imgBaseUrl + entityInfo.getString("PHOTO"))
|
||||||
|
.build();
|
||||||
|
List<UserDTO> list = new ArrayList<UserDTO>();
|
||||||
|
list.add(userDTO);
|
||||||
|
gjSendMessageUtil.sendMessage(list);
|
||||||
// 保存操作记录
|
// 保存操作记录
|
||||||
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,22 @@ package com.zcloud.flow.xgf.JiTuan;
|
||||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||||
import com.yomahub.liteflow.core.NodeComponent;
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.flow.util.GJSendMessageUtil;
|
||||||
|
import com.zcloud.flow.util.dto.UserDTO;
|
||||||
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
||||||
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
|
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
|
||||||
|
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
||||||
import com.zcloud.service.xgf.XgfUserService;
|
import com.zcloud.service.xgf.XgfUserService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
import com.zcloud.util.Jurisdiction;
|
import com.zcloud.util.Jurisdiction;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@LiteflowComponent("JiTuanWeiTuoSupervise")
|
@LiteflowComponent("JiTuanWeiTuoSupervise")
|
||||||
public class JiTuanWeiTuoSupervise extends NodeComponent {
|
public class JiTuanWeiTuoSupervise extends NodeComponent {
|
||||||
|
@ -29,6 +35,13 @@ public class JiTuanWeiTuoSupervise extends NodeComponent {
|
||||||
@Resource
|
@Resource
|
||||||
private CorpInfoMapper corpInfoMapper;
|
private CorpInfoMapper corpInfoMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private XgfUserDetailsMapper xgfUserDetailsMapper;
|
||||||
|
@Resource
|
||||||
|
private GJSendMessageUtil gjSendMessageUtil;
|
||||||
|
@Value("${gongJiangXueYuanGetImgUrl}")
|
||||||
|
private String imgBaseUrl;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAccess() {
|
public boolean isAccess() {
|
||||||
XgfFlowDto info = this.getRequestData();
|
XgfFlowDto info = this.getRequestData();
|
||||||
|
@ -86,7 +99,22 @@ public class JiTuanWeiTuoSupervise extends NodeComponent {
|
||||||
entity.put("STATUS", "2");
|
entity.put("STATUS", "2");
|
||||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||||
xgfUserMapper.edit(entity);
|
xgfUserMapper.edit(entity);
|
||||||
|
// created by liu jun 2024-06-26 工匠学院对接
|
||||||
|
condition.clear();
|
||||||
|
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
|
||||||
|
PageData entityInfo = xgfUserDetailsMapper.findById(condition);
|
||||||
|
UserDTO userDTO = UserDTO.builder()
|
||||||
|
.userName(entity.getString("USERNAME"))
|
||||||
|
.realName(entity.getString("NAME"))
|
||||||
|
.userSex("0".equals(entityInfo.getString("SEX")) ? "男" : "女")
|
||||||
|
.phoneNumber(entity.getString("USERNAME"))
|
||||||
|
.idCard(entityInfo.getString("CARD_ID"))
|
||||||
|
.orgTree("集团外公司(含外协单位)/"+ entity.getString("BELONG_TO_CORP_NAME"))
|
||||||
|
.avatarUrl(imgBaseUrl + entityInfo.getString("PHOTO"))
|
||||||
|
.build();
|
||||||
|
List<UserDTO> list = new ArrayList<UserDTO>();
|
||||||
|
list.add(userDTO);
|
||||||
|
gjSendMessageUtil.sendMessage(list);
|
||||||
// 保存操作记录
|
// 保存操作记录
|
||||||
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,22 @@ package com.zcloud.flow.xgf.YiBan;
|
||||||
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||||
import com.yomahub.liteflow.core.NodeComponent;
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.flow.util.GJSendMessageUtil;
|
||||||
|
import com.zcloud.flow.util.dto.UserDTO;
|
||||||
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
|
import com.zcloud.mapper.datasource.xgf.XgfFlowsMapper;
|
||||||
|
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
|
||||||
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
||||||
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
||||||
import com.zcloud.service.xgf.XgfUserService;
|
import com.zcloud.service.xgf.XgfUserService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
import com.zcloud.util.Jurisdiction;
|
import com.zcloud.util.Jurisdiction;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@LiteflowComponent("YiBanSupervise")
|
@LiteflowComponent("YiBanSupervise")
|
||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
|
@ -27,8 +33,15 @@ public class YiBanSupervise extends NodeComponent {
|
||||||
@Resource
|
@Resource
|
||||||
private XgfUserMapper xgfUserMapper;
|
private XgfUserMapper xgfUserMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private XgfUserDetailsMapper xgfUserDetailsMapper;
|
||||||
|
@Resource
|
||||||
|
private GJSendMessageUtil gjSendMessageUtil;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private CorpInfoMapper corpInfoMapper;
|
private CorpInfoMapper corpInfoMapper;
|
||||||
|
@Value("${gongJiangXueYuanGetImgUrl}")
|
||||||
|
private String imgBaseUrl;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAccess() {
|
public boolean isAccess() {
|
||||||
|
@ -118,7 +131,22 @@ public class YiBanSupervise extends NodeComponent {
|
||||||
entity.put("STATUS", "2");
|
entity.put("STATUS", "2");
|
||||||
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
entity.put("CHECK_STEP", Integer.parseInt(entity.get("CHECK_STEP").toString()) + 1);
|
||||||
xgfUserMapper.edit(entity);
|
xgfUserMapper.edit(entity);
|
||||||
|
// created by liu jun 2024-06-26 工匠学院对接
|
||||||
|
condition.clear();
|
||||||
|
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
|
||||||
|
PageData entityInfo = xgfUserDetailsMapper.findById(condition);
|
||||||
|
UserDTO userDTO = UserDTO.builder()
|
||||||
|
.userName(entity.getString("USERNAME"))
|
||||||
|
.realName(entity.getString("NAME"))
|
||||||
|
.userSex("0".equals(entityInfo.getString("SEX")) ? "男" : "女")
|
||||||
|
.phoneNumber(entity.getString("USERNAME"))
|
||||||
|
.idCard(entityInfo.getString("CARD_ID"))
|
||||||
|
.orgTree("集团外公司(含外协单位)/"+ entity.getString("BELONG_TO_CORP_NAME"))
|
||||||
|
.avatarUrl(imgBaseUrl + entityInfo.getString("PHOTO"))
|
||||||
|
.build();
|
||||||
|
List<UserDTO> list = new ArrayList<UserDTO>();
|
||||||
|
list.add(userDTO);
|
||||||
|
gjSendMessageUtil.sendMessage(list);
|
||||||
// 保存操作记录
|
// 保存操作记录
|
||||||
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
xgfUserService.saveLog(info, info.getSTATUS(), "1");
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.zcloud.mapper.datasource.mq;
|
||||||
|
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明:mq消费信息错误日志表
|
||||||
|
* 作者:LLX
|
||||||
|
* 时间:2024-01-10
|
||||||
|
* 官网:www.zcloudchina.com
|
||||||
|
*/
|
||||||
|
public interface MqConsumptionErrorLogMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add
|
||||||
|
* @param pd
|
||||||
|
*/
|
||||||
|
void save(PageData pd);
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.zcloud.mapper.datasource.mq;
|
||||||
|
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明:mq消费信息日志表
|
||||||
|
* 作者:LLX
|
||||||
|
* 时间:2024-01-08
|
||||||
|
* 官网:www.zcloudchina.com
|
||||||
|
*/
|
||||||
|
public interface MqConsumptionLogMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add
|
||||||
|
* @param pd
|
||||||
|
*/
|
||||||
|
void save(PageData pd);
|
||||||
|
}
|
|
@ -313,4 +313,6 @@ public interface UsersMapper {
|
||||||
List<PageData> listUserByDepId(PageData pd);
|
List<PageData> listUserByDepId(PageData pd);
|
||||||
|
|
||||||
List<PageData> getDepartmentIds(@Param("departmentIds") String[] departmentIds);
|
List<PageData> getDepartmentIds(@Param("departmentIds") String[] departmentIds);
|
||||||
|
|
||||||
|
void editPushStatus(PageData pd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.zcloud.service.mq.impl;
|
package com.zcloud.service.mq.impl;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.zcloud.dto.TenCorpDto;
|
import com.zcloud.dto.TenCorpDto;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
@ -33,6 +34,10 @@ public class DockSendMessageServiceImpl implements DockSendMessageService {
|
||||||
private String cmtDataDocking;
|
private String cmtDataDocking;
|
||||||
@Value("${mq.czks.data.topic}")
|
@Value("${mq.czks.data.topic}")
|
||||||
private String czksDataDocking;
|
private String czksDataDocking;
|
||||||
|
|
||||||
|
@Value("${mq.producer.dataChange.slice-data-change.topic}")
|
||||||
|
private String sliceDataChangeTopic;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private RocketMQTemplate rocketMQTemplate;
|
private RocketMQTemplate rocketMQTemplate;
|
||||||
|
|
||||||
|
@ -72,6 +77,12 @@ public class DockSendMessageServiceImpl implements DockSendMessageService {
|
||||||
if (tenCorpDto.getTopic().equals(csyDataDocking)) {
|
if (tenCorpDto.getTopic().equals(csyDataDocking)) {
|
||||||
sendResult = rocketMQTemplate.syncSend(this.csyDataDocking, tenCorpDto.toString());
|
sendResult = rocketMQTemplate.syncSend(this.csyDataDocking, tenCorpDto.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 中台同步
|
||||||
|
if (tenCorpDto.getTopic().equals(sliceDataChangeTopic)){
|
||||||
|
sendResult = rocketMQTemplate.syncSend(this.sliceDataChangeTopic, JSONUtil.toJsonStr(tenCorpDto));
|
||||||
|
}
|
||||||
|
|
||||||
if (sendResult != null && !sendResult.getSendStatus().equals(SendStatus.SEND_OK)) {
|
if (sendResult != null && !sendResult.getSendStatus().equals(SendStatus.SEND_OK)) {
|
||||||
throw new RuntimeException("产品入栈失败");
|
throw new RuntimeException("产品入栈失败");
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,4 +364,6 @@ public interface UsersService {
|
||||||
List<PageData> listUserByDepId(PageData pd) throws Exception;
|
List<PageData> listUserByDepId(PageData pd) throws Exception;
|
||||||
|
|
||||||
List<PageData> getDepartmentIds(String[] departmentIds) throws Exception;
|
List<PageData> getDepartmentIds(String[] departmentIds) throws Exception;
|
||||||
|
|
||||||
|
public void editPushStatus(PageData pd)throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -501,4 +501,12 @@ public class UsersServiceImpl implements UsersService {
|
||||||
public List<PageData> getDepartmentIds(String[] departmentIds) throws Exception {
|
public List<PageData> getDepartmentIds(String[] departmentIds) throws Exception {
|
||||||
return usersMapper.getDepartmentIds(departmentIds);
|
return usersMapper.getDepartmentIds(departmentIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**修改用户
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void editPushStatus(PageData pd)throws Exception{
|
||||||
|
usersMapper.editPushStatus(pd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.zcloud.service.xgf;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
import com.zcloud.flow.xgf.util.XgfFlowDto;
|
||||||
import org.springframework.dao.EmptyResultDataAccessException;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -46,4 +45,6 @@ public interface XgfUserService {
|
||||||
List<PageData> getWorkTask(PageData condition) throws Exception;
|
List<PageData> getWorkTask(PageData condition) throws Exception;
|
||||||
|
|
||||||
void syncPhoto(PageData request) throws Exception;
|
void syncPhoto(PageData request) throws Exception;
|
||||||
|
|
||||||
|
void edit4Mq(PageData syncInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -931,6 +931,13 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
flow.put("APPOINT_SEVEN_USER_ID", "");
|
flow.put("APPOINT_SEVEN_USER_ID", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存操作记录
|
||||||
|
* @param info
|
||||||
|
* @param status 通过标识符
|
||||||
|
* @param endFlag 流程结束标识符
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
public void saveLog(PageData info, String status, String endFlag) throws Exception {
|
public void saveLog(PageData info, String status, String endFlag) throws Exception {
|
||||||
/* 保存审批记录 */
|
/* 保存审批记录 */
|
||||||
PageData condition = new PageData();
|
PageData condition = new PageData();
|
||||||
|
@ -1197,4 +1204,29 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
return "0";
|
return "0";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void edit4Mq(PageData syncInfo) {
|
||||||
|
// 相关方推送更新
|
||||||
|
syncInfo.put("XGF_USER_ID",syncInfo.getString("USER_ID"));
|
||||||
|
PageData localData = xgfUserMapper.findById(syncInfo);
|
||||||
|
|
||||||
|
if (localData != null && !localData.isEmpty()){
|
||||||
|
syncInfo.put("STUDY_STATUS", syncInfo.getString("STATUS"));
|
||||||
|
syncInfo.put("STATUS", "");
|
||||||
|
syncInfo.put("BELONG_TO_CORP", syncInfo.getString("EMPLOYER"));
|
||||||
|
syncInfo.put("BELONG_TO_CORP_NAME", syncInfo.getString("EMPLOYER_NAME"));
|
||||||
|
syncInfo.put("XGF_USER_NAME", syncInfo.getString("NAME"));
|
||||||
|
|
||||||
|
xgfUserMapper.edit(syncInfo);
|
||||||
|
|
||||||
|
// details
|
||||||
|
syncInfo.put("XGF_USER_DETAILS_ID",localData.getString("XGF_USER_ID"));
|
||||||
|
PageData localDetailsData = xgfUserDetailsMapper.findById(syncInfo);
|
||||||
|
if (localDetailsData != null && !localDetailsData.isEmpty()){
|
||||||
|
xgfUserDetailsMapper.edit(syncInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,108 @@
|
||||||
|
package com.zcloud.syncData;
|
||||||
|
|
||||||
|
import com.zcloud.dto.TenCorpDto;
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.service.mq.DockSendMessageService;
|
||||||
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
|
import org.aspectj.lang.annotation.Around;
|
||||||
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
import org.aspectj.lang.annotation.Pointcut;
|
||||||
|
import org.aspectj.lang.reflect.MethodSignature;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明:同步切面
|
||||||
|
* 使用次切面的方法需使用@SyncPlatformAdvice注解,返回类型为Map或其子类
|
||||||
|
* map中需要包含code字段,用于标识该方法的执行结果:"0"成功,其他失败
|
||||||
|
* map中需要包含syncInfo字段,用于传递该方法的需要同步的参数,以JSON格式传递
|
||||||
|
* :@SyncPlatformAdvice 注解中的 type 参数为必填项,表示同步的数据类型
|
||||||
|
* 类型可参考SyncTypeEnum类
|
||||||
|
* 作者:water_xu
|
||||||
|
* 官网:www.zcloudchina.com
|
||||||
|
*/
|
||||||
|
@Aspect
|
||||||
|
@Component
|
||||||
|
public class SyncDataAdviceAspect {
|
||||||
|
|
||||||
|
@Pointcut(value = "@annotation(com.zcloud.syncData.SyncPlatformAdvice)")
|
||||||
|
public void syncPointCut() {}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DockSendMessageService dockSendMessageService;
|
||||||
|
|
||||||
|
@Value("${mq.producer.dataChange.slice-data-change.topic}")
|
||||||
|
private String sliceDataChangeTopic;
|
||||||
|
|
||||||
|
@Around("syncPointCut()")
|
||||||
|
public Object around(ProceedingJoinPoint point) throws Throwable {
|
||||||
|
|
||||||
|
// 执行目标方法
|
||||||
|
Object result = null;
|
||||||
|
try {
|
||||||
|
result = point.proceed();
|
||||||
|
}catch (Exception e){
|
||||||
|
System.out.println("==========中台同步切面执行目标方法异常==========");
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
if (result instanceof Map) {
|
||||||
|
Map resultMap = (Map) result;
|
||||||
|
if ("0".equals(resultMap.get("code")) || "0".equals(resultMap.get("CODE"))) {
|
||||||
|
MethodSignature signature = (MethodSignature) point.getSignature();
|
||||||
|
Method method = signature.getMethod();
|
||||||
|
if (method.isAnnotationPresent(SyncPlatformAdvice.class)) {
|
||||||
|
SyncPlatformAdvice syncPlatformAdvice = method.getAnnotation(SyncPlatformAdvice.class);
|
||||||
|
|
||||||
|
// 处理数据
|
||||||
|
TenCorpDto message = new TenCorpDto();
|
||||||
|
PageData pd = new PageData();
|
||||||
|
resultMap.put("EXCEPT_SOURCE","qy");
|
||||||
|
if (resultMap.get("syncInfo") == null || "".equals(resultMap.get("syncInfo"))){
|
||||||
|
System.out.println("!!!----------使用同步切面需要返回的map中包含syncInfo字段-----------!!!");
|
||||||
|
System.out.println("!!!-------------syncInfo为需要同步的数据 以JSON传递--------------!!!");
|
||||||
|
System.out.println("!!!----------使用同步切面需要返回的map中包含syncInfo字段-----------!!!");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
pd.putAll(resultMap);
|
||||||
|
message.setData(pd);
|
||||||
|
message.setMessage("qy");
|
||||||
|
message.setMark(syncPlatformAdvice.type().getDescription());
|
||||||
|
message.setProducer_name("qy");
|
||||||
|
message.setTopic(sliceDataChangeTopic);
|
||||||
|
|
||||||
|
// 判断同步类型
|
||||||
|
if (syncPlatformAdvice.type().equals(SyncTypeEnum.HIDDEN)){
|
||||||
|
// 同步隐患
|
||||||
|
}
|
||||||
|
if (syncPlatformAdvice.type().equals(SyncTypeEnum.PERSONNEL)){
|
||||||
|
// 同步人员
|
||||||
|
dockSendMessageService.sendMessage(message);
|
||||||
|
}
|
||||||
|
if (syncPlatformAdvice.type().equals(SyncTypeEnum.SAFETY_ENVIRONMENTAL_CHECK)){
|
||||||
|
// 同步安全环保检查
|
||||||
|
}
|
||||||
|
if (syncPlatformAdvice.type().equals(SyncTypeEnum.KEY_PROJECT)){
|
||||||
|
// 同步重点工程
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (resultMap.get("code") == null || "".equals(resultMap.get("code"))){
|
||||||
|
System.out.println("!!!----------使用同步切面需要返回的map中包含code字段-----------!!!");
|
||||||
|
System.out.println("!!!------------------code为\"0\"成功 其他失败------------------!!!");
|
||||||
|
System.out.println("!!!----------使用同步切面需要返回的map中包含code字段-----------!!!");
|
||||||
|
}else{
|
||||||
|
// 方法内执行失败,返回给调用端失败信息
|
||||||
|
throw new RuntimeException(resultMap.get("code") + " ==> " + resultMap.get("msg").toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.zcloud.syncData;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户同步通知注解,在方法体上加入此注解会进行AOP解析,并以MQ通知给消费者
|
||||||
|
* @author :water_xu
|
||||||
|
* @date :2024.8.6
|
||||||
|
*/
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface SyncPlatformAdvice {
|
||||||
|
// 没啥用
|
||||||
|
String value() default "";
|
||||||
|
// 数据类型标记 (必须)
|
||||||
|
SyncTypeEnum type();
|
||||||
|
// 是否更新
|
||||||
|
boolean isUpdate() default false;
|
||||||
|
// 是否插入
|
||||||
|
boolean isInsert() default false;
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.zcloud.syncData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于向中台同步的切面枚举,区分同步的类型
|
||||||
|
* @autor water_xu
|
||||||
|
* @date 2024.8.8
|
||||||
|
*/
|
||||||
|
public enum SyncTypeEnum {
|
||||||
|
PERSONNEL("人员"),
|
||||||
|
HIDDEN("隐患"),
|
||||||
|
SAFETY_ENVIRONMENTAL_CHECK("安全环保检查"),
|
||||||
|
KEY_PROJECT("重点工程");
|
||||||
|
|
||||||
|
private final String description;
|
||||||
|
|
||||||
|
SyncTypeEnum(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据给定的字符串描述判断是否为枚举中的一个类型。
|
||||||
|
*
|
||||||
|
* @param description 描述字符串
|
||||||
|
* @return 如果匹配则返回 true,否则返回 false
|
||||||
|
*/
|
||||||
|
public static boolean matches(String description) {
|
||||||
|
for (SyncTypeEnum type : values()) {
|
||||||
|
if (type.getDescription().equals(description)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,118 @@
|
||||||
|
package com.zcloud.syncData.listener;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.dto.TenCorpDto;
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.mapper.datasource.mq.MqConsumptionErrorLogMapper;
|
||||||
|
import com.zcloud.mapper.datasource.mq.MqConsumptionLogMapper;
|
||||||
|
import com.zcloud.service.system.UsersService;
|
||||||
|
import com.zcloud.service.xgf.XgfUserService;
|
||||||
|
import com.zcloud.syncData.SyncTypeEnum;
|
||||||
|
import com.zcloud.util.DateUtil;
|
||||||
|
import com.zcloud.util.StackTraceUtils;
|
||||||
|
import com.zcloud.util.UuidUtil;
|
||||||
|
import com.zcloud.util.Warden;
|
||||||
|
import org.apache.rocketmq.spring.annotation.MessageModel;
|
||||||
|
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
||||||
|
import org.apache.rocketmq.spring.annotation.SelectorType;
|
||||||
|
import org.apache.rocketmq.spring.core.RocketMQListener;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@RocketMQMessageListener(
|
||||||
|
consumerGroup = "${mq.consumer.dataChange.tongbu-data-change.group}",
|
||||||
|
topic = "${mq.consumer.dataChange.tongbu-data-change.topic}",
|
||||||
|
selectorType = SelectorType.TAG,
|
||||||
|
messageModel = MessageModel.BROADCASTING) // 添加广播模式
|
||||||
|
public class SyncDataListener implements RocketMQListener<String> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MqConsumptionLogMapper mqConsumptionLogMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UsersService usersService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private XgfUserService xgfUserService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private static MqConsumptionErrorLogMapper mqConsumptionErrorLogMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMessage(String message) {
|
||||||
|
//获取消息
|
||||||
|
TenCorpDto tenCorpDto = JSON.parseObject(message, TenCorpDto.class);
|
||||||
|
|
||||||
|
PageData productionPD = new PageData();
|
||||||
|
productionPD.put("CONSUMPTION_ID", Warden.get32UUID());
|
||||||
|
productionPD.put("MESSAGE_LOG_ID",tenCorpDto.getMessageLogId());
|
||||||
|
productionPD.put("CONSUMPTION_TYPE","gwj-MqQyDataListener.onMessage(String message)");
|
||||||
|
productionPD.put("CONSUMPTION_TIME", DateUtil.getTime());
|
||||||
|
productionPD.put("CREATE_TIME", tenCorpDto.getCREATE_TIME() == null ? "" : tenCorpDto.getCREATE_TIME());
|
||||||
|
productionPD.put("MARK", tenCorpDto.getMark() == null ? "" : tenCorpDto.getMark());
|
||||||
|
productionPD.put("DATA", tenCorpDto.getData()== null ? "" : tenCorpDto.getData().toString());
|
||||||
|
//从消息中获取参数数据
|
||||||
|
PageData pd = tenCorpDto.getData();
|
||||||
|
// save:
|
||||||
|
pd.put("SUCCESS",0);
|
||||||
|
pd.put("CONSUMPTION_ID", UuidUtil.get32UUID());
|
||||||
|
pd.putAll(tenCorpDto.getPd());
|
||||||
|
pd.put("CONSUMPTION_TIME", DateUtil.date2Str(new Date()));
|
||||||
|
pd.put("CONSUMPTION_TYPE","MqQyDataListener");
|
||||||
|
if ("qy".equals(tenCorpDto.getMessage())){
|
||||||
|
// 在本端发的同步消息,不需要再次同步该数据
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
//拿到原路径
|
||||||
|
String url = pd.getString("url");
|
||||||
|
System.out.println(url + pd);
|
||||||
|
|
||||||
|
// 人员
|
||||||
|
if (SyncTypeEnum.PERSONNEL.getDescription().equals(tenCorpDto.getMark())){
|
||||||
|
System.out.println("people");
|
||||||
|
String str = tenCorpDto.getData().getString("syncInfo");
|
||||||
|
PageData syncInfo = JSONUtil.toBean(str, PageData.class);
|
||||||
|
if ("xgf".equals(tenCorpDto.getMessage())){
|
||||||
|
// 相关方推送
|
||||||
|
xgfUserService.edit4Mq(syncInfo);
|
||||||
|
}
|
||||||
|
PageData localData = usersService.findById(syncInfo);
|
||||||
|
if (localData != null && !localData.isEmpty()){
|
||||||
|
usersService.editUser(syncInfo);
|
||||||
|
} else {
|
||||||
|
// 2024.8.9 按郭跃鹏提出:后期各公司从企业端分离后,需要其他公司的用户进行SQL联查,要求新增一张core_user的同步表,用于记录中台的所有用户数据
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// 隐患
|
||||||
|
if (SyncTypeEnum.HIDDEN.getDescription().equals(tenCorpDto.getMark())){
|
||||||
|
|
||||||
|
}
|
||||||
|
// 安全环保检查
|
||||||
|
if (SyncTypeEnum.SAFETY_ENVIRONMENTAL_CHECK.getDescription().equals(tenCorpDto.getMark())){
|
||||||
|
|
||||||
|
}
|
||||||
|
// 重点工程
|
||||||
|
if (SyncTypeEnum.KEY_PROJECT.getDescription().equals(tenCorpDto.getMark())){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
mqConsumptionLogMapper.save(productionPD);
|
||||||
|
mqConsumptionLogMapper.save(pd);
|
||||||
|
} catch (Exception e) {
|
||||||
|
productionPD.put("SUCCESS",'0');
|
||||||
|
productionPD.put("ERROR_MESSAGE", StackTraceUtils.printStackTraceToString(e));
|
||||||
|
mqConsumptionErrorLogMapper.save(productionPD);
|
||||||
|
pd.put("ERROR_MESSAGE",e.getMessage());
|
||||||
|
mqConsumptionLogMapper.save(pd);
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,224 @@
|
||||||
|
package com.zcloud.util;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.http.Consts;
|
||||||
|
import org.apache.http.HttpEntity;
|
||||||
|
import org.apache.http.client.config.RequestConfig;
|
||||||
|
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||||
|
import org.apache.http.client.methods.*;
|
||||||
|
import org.apache.http.entity.StringEntity;
|
||||||
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
|
import org.apache.http.impl.client.HttpClients;
|
||||||
|
import org.apache.http.message.BasicNameValuePair;
|
||||||
|
import org.apache.http.util.EntityUtils;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class HttpClientUtilDoGet {
|
||||||
|
private static final RequestConfig requestConfig = RequestConfig.custom()
|
||||||
|
.setSocketTimeout(60000) // 60s
|
||||||
|
.setConnectTimeout(10000) // 10s
|
||||||
|
.setConnectionRequestTimeout(10000) // 10s
|
||||||
|
.build();
|
||||||
|
|
||||||
|
|
||||||
|
public static String sendHttpPost(String httpUrl, String body, Map<String, String> header) {
|
||||||
|
HttpPost httpPost = new HttpPost(httpUrl);
|
||||||
|
try {
|
||||||
|
if (StringUtils.isNotEmpty(body)) {
|
||||||
|
StringEntity stringEntity = new StringEntity(body, "UTF-8");
|
||||||
|
stringEntity.setContentType("application/json");
|
||||||
|
httpPost.setEntity(stringEntity);
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isNotEmpty(header)) {
|
||||||
|
for (Map.Entry<String, String> entry : header.entrySet()) {
|
||||||
|
httpPost.addHeader(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return sendHttpPost(httpPost);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String sendHttpPost(HttpPost httpPost) {
|
||||||
|
CloseableHttpClient httpClient = null;
|
||||||
|
CloseableHttpResponse response = null;
|
||||||
|
String responseContent = "";
|
||||||
|
try {
|
||||||
|
httpClient = HttpClients.createDefault();
|
||||||
|
httpPost.setConfig(requestConfig);
|
||||||
|
response = httpClient.execute(httpPost);
|
||||||
|
HttpEntity entity = response.getEntity();
|
||||||
|
responseContent = EntityUtils.toString(entity, "UTF-8");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (response != null) {
|
||||||
|
response.close();
|
||||||
|
}
|
||||||
|
if (httpClient != null) {
|
||||||
|
httpClient.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return responseContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String sendHttpPut(String httpUrl, String body, Map<String, String> header) {
|
||||||
|
HttpPut httpPut = new HttpPut(httpUrl);
|
||||||
|
try {
|
||||||
|
if (StringUtils.isNotEmpty(body)) {
|
||||||
|
StringEntity stringEntity = new StringEntity(body, "UTF-8");
|
||||||
|
stringEntity.setContentType("application/json");
|
||||||
|
httpPut.setEntity(stringEntity);
|
||||||
|
}
|
||||||
|
if (CollectionUtil.isNotEmpty(header)) {
|
||||||
|
for (Map.Entry<String, String> entry : header.entrySet()) {
|
||||||
|
httpPut.addHeader(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return sendHttpPut(httpPut);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String sendHttpPut(HttpPut httpPut) {
|
||||||
|
CloseableHttpClient httpClient = null;
|
||||||
|
CloseableHttpResponse response = null;
|
||||||
|
String responseContent = "";
|
||||||
|
try {
|
||||||
|
httpClient = HttpClients.createDefault();
|
||||||
|
httpPut.setConfig(requestConfig);
|
||||||
|
response = httpClient.execute(httpPut);
|
||||||
|
HttpEntity entity = response.getEntity();
|
||||||
|
responseContent = EntityUtils.toString(entity, "UTF-8");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (response != null) {
|
||||||
|
response.close();
|
||||||
|
}
|
||||||
|
if (httpClient != null) {
|
||||||
|
httpClient.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return responseContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String sendHttpGet(String httpUrl, Map<String, String> params, Map<String, String> header) {
|
||||||
|
List<BasicNameValuePair> list = new ArrayList<>();
|
||||||
|
if (CollectionUtil.isNotEmpty(params)) {
|
||||||
|
for (Map.Entry<String, String> entry : params.entrySet()) {
|
||||||
|
list.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
|
||||||
|
}
|
||||||
|
String paramStr = "";
|
||||||
|
try {
|
||||||
|
paramStr = EntityUtils.toString(new UrlEncodedFormEntity(list, Consts.UTF_8));
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(paramStr)) {
|
||||||
|
httpUrl = httpUrl + "?" + paramStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HttpGet httpGet = new HttpGet(httpUrl);// 创建get请求
|
||||||
|
if (CollectionUtil.isNotEmpty(header)) {
|
||||||
|
for (Map.Entry<String, String> entry : header.entrySet()) {
|
||||||
|
httpGet.addHeader(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sendHttpGet(httpGet);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String sendHttpGet(String httpUrl) {
|
||||||
|
HttpGet httpGet = new HttpGet(httpUrl);// 创建get请求
|
||||||
|
return sendHttpGet(httpGet);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String sendHttpGet(HttpGet httpGet) {
|
||||||
|
CloseableHttpClient httpClient = null;
|
||||||
|
CloseableHttpResponse response = null;
|
||||||
|
HttpEntity entity = null;
|
||||||
|
String responseContent = null;
|
||||||
|
try {
|
||||||
|
httpClient = HttpClients.createDefault();
|
||||||
|
httpGet.setConfig(requestConfig);
|
||||||
|
response = httpClient.execute(httpGet);
|
||||||
|
entity = response.getEntity();
|
||||||
|
responseContent = EntityUtils.toString(entity, "UTF-8");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (response != null) {
|
||||||
|
response.close();
|
||||||
|
}
|
||||||
|
if (httpClient != null) {
|
||||||
|
httpClient.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmpty(responseContent)) {
|
||||||
|
System.out.println("responseContent is null");
|
||||||
|
}
|
||||||
|
return responseContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String sendHttpDelete(String httpUrl, Map<String, String> header) {
|
||||||
|
HttpDelete httpDelete = new HttpDelete(httpUrl);
|
||||||
|
if (header != null && !header.isEmpty()) {
|
||||||
|
for (Map.Entry<String, String> entry : header.entrySet()) {
|
||||||
|
httpDelete.addHeader(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sendHttpDelete(httpDelete);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String sendHttpDelete(HttpDelete httpDelete) {
|
||||||
|
CloseableHttpClient httpClient = null;
|
||||||
|
CloseableHttpResponse response = null;
|
||||||
|
HttpEntity entity = null;
|
||||||
|
String responseContent = null;
|
||||||
|
try {
|
||||||
|
httpClient = HttpClients.createDefault();
|
||||||
|
httpDelete.setConfig(requestConfig);
|
||||||
|
response = httpClient.execute(httpDelete);
|
||||||
|
entity = response.getEntity();
|
||||||
|
responseContent = EntityUtils.toString(entity, "UTF-8");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (response != null) {
|
||||||
|
response.close();
|
||||||
|
}
|
||||||
|
if (httpClient != null) {
|
||||||
|
httpClient.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmpty(responseContent)) {
|
||||||
|
System.out.println("responseContent is null");
|
||||||
|
}
|
||||||
|
return responseContent;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.zcloud.util;
|
||||||
|
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
|
||||||
|
public class StackTraceUtils {
|
||||||
|
public static String printStackTraceToString(Throwable t) {
|
||||||
|
StringWriter sw = new StringWriter();
|
||||||
|
t.printStackTrace(new PrintWriter(sw, true));
|
||||||
|
return sw.getBuffer().toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -42,6 +42,16 @@ public class Tools {
|
||||||
return s!=null && !"".equals(s) && !"null".equals(s);
|
return s!=null && !"".equals(s) && !"null".equals(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测字符串是否不为空(null,"","null")
|
||||||
|
* @param s
|
||||||
|
* @return 不为空则返回true,否则返回false
|
||||||
|
*/
|
||||||
|
public static boolean notEmpty(Object s){
|
||||||
|
return s!=null && !"".equals(s) && !"null".equals(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测字符串是否为空(null,"","null")
|
* 检测字符串是否为空(null,"","null")
|
||||||
* @param s
|
* @param s
|
||||||
|
|
|
@ -55,7 +55,7 @@ spring.main.banner-mode=off
|
||||||
#web.front-path=h:/
|
#web.front-path=h:/
|
||||||
#spring.resources.static-locations=file:${web.upload-path},file:${web.front-path}
|
#spring.resources.static-locations=file:${web.upload-path},file:${web.front-path}
|
||||||
|
|
||||||
#preventionxgf.api.url=http://192.168.0.79:8088
|
#preventionxgf.api.url=http://127.0.0.1:8088/
|
||||||
#
|
#
|
||||||
#qa-regulatory-gwj.api.url=http://192.168.0.79:8008
|
#qa-regulatory-gwj.api.url=http://192.168.0.79:8008
|
||||||
preventionxgf.api.url=http://39.100.115.58:8082/qa-prevention-xgf/
|
preventionxgf.api.url=http://39.100.115.58:8082/qa-prevention-xgf/
|
||||||
|
@ -91,12 +91,12 @@ corp.default.pic-path=https://qgqy.qhdsafety.com/
|
||||||
corp.default.back-end-path=https://qgqy.qhdsafety.com/file/
|
corp.default.back-end-path=https://qgqy.qhdsafety.com/file/
|
||||||
|
|
||||||
|
|
||||||
#用户标识
|
#\u7528\u6237\u6807\u8BC6
|
||||||
# 沧州矿石
|
# \u6CA7\u5DDE\u77FF\u77F3
|
||||||
czks-useridentity=CZKS
|
czks-useridentity=CZKS
|
||||||
czks-baseimgpath=https://wwag.qhdsafety.com/file/
|
czks-baseimgpath=https://wwag.qhdsafety.com/file/
|
||||||
czks-backendaddr=http://192.168.0.79:8091/
|
czks-backendaddr=http://192.168.0.79:8091/
|
||||||
# 港务局
|
# \u6E2F\u52A1\u5C40
|
||||||
gwj-useridentity=GWJ
|
gwj-useridentity=GWJ
|
||||||
gwj-baseimgpath=https://qgqy.qhdsafety.com/file/
|
gwj-baseimgpath=https://qgqy.qhdsafety.com/file/
|
||||||
gwj-backendaddr=http://192.168.0.31:8991/qa-prevention-gwj/
|
gwj-backendaddr=http://192.168.0.31:8991/qa-prevention-gwj/
|
||||||
|
@ -106,6 +106,7 @@ perLoc.url=http://192.168.210.32:8084
|
||||||
perLoc.userName=qaaqadmin
|
perLoc.userName=qaaqadmin
|
||||||
perLoc.pwd=Cfd2023@
|
perLoc.pwd=Cfd2023@
|
||||||
baseimgpath =http://192.168.192.201:8991/file/
|
baseimgpath =http://192.168.192.201:8991/file/
|
||||||
|
tongbu.url=http://127.0.0.1:8094
|
||||||
|
|
||||||
mq.csy.data.topic=csy_docking
|
mq.csy.data.topic=csy_docking
|
||||||
mq.csy.data.group=scheduled_tasks_csy_docking
|
mq.csy.data.group=scheduled_tasks_csy_docking
|
||||||
|
@ -125,10 +126,28 @@ mq.czks.file.group=scheduled_tasks_czks_dockingPicture
|
||||||
mq.gwj.data.topic=czks_docking
|
mq.gwj.data.topic=czks_docking
|
||||||
mq.gwj.file.topic=czks_dockingPicture
|
mq.gwj.file.topic=czks_dockingPicture
|
||||||
|
|
||||||
#港务局文件服务器前缀
|
#\u6E2F\u52A1\u5C40\u6587\u4EF6\u670D\u52A1\u5668\u524D\u7F00
|
||||||
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
|
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
|
||||||
#河北秦安文件服务器前缀
|
#\u6CB3\u5317\u79E6\u5B89\u6587\u4EF6\u670D\u52A1\u5668\u524D\u7F00
|
||||||
heBeiQinAnFile=https://file.zcloudchina.com/YTHFile
|
heBeiQinAnFile=https://file.zcloudchina.com/YTHFile
|
||||||
|
biaoZhunShuJuKu=https://file.zcloudchina.com/
|
||||||
|
|
||||||
liteflow.rule-source=flow.xml
|
liteflow.rule-source=flow.xml
|
||||||
liteflow.print-execution-log=false
|
liteflow.print-execution-log=false
|
||||||
|
|
||||||
|
gongJiangXueYuanSendPublicKey=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzbwmqhb5xVejFQFoa8NF2FGtb2nMtpalZ2Zcy78tL/5Y5Od78EKb9dALuv4b+F/PexynKrQDlnRhAouuqF8S1LuC0njbWSaFMofCeyeoltSQTEcjwzEAOPH9CnzGOZQ19tB2vEamVoLefWC4H0V+e5hWv7DDCm3bLNaHhMnR1/o0ASZqzIHYDEzVZNGrxR8WIhxUh7fORk75nEUyz2S6WKq1MlOkm8ZssMsFW+KacRTnexn8Q2p8/7/3zRCScLoH3pHA+J35nuP+doigUmPJzwHfPsr1QeYdadtuwZdfCZVQ7U4R4vB83NsSElAgTW+xHzy7Y1EcgZgYfSedetb03QIDAQAB
|
||||||
|
gongJiangXueYuanSendPrivateKey=58e5e358b220335e7b1c6cc3576ceecc28b4a95d96cbbe0
|
||||||
|
gongJiangXueYuanTestUrl=https://hbgk.bjzqwl.com
|
||||||
|
gongJiangXueYuanProdUrl=https://gjxy.bjttsx.com
|
||||||
|
# \u7ED9\u5DE5\u5320\u5B66\u9662\u63A8\u9001\u4EBA\u5458\u6570\u636E\u65F6\u7684\u56FE\u7247\u9644\u4EF6\u524D\u7F00 \uFF08\u6B63\u5F0F\u516C\u7F51\uFF09
|
||||||
|
#gongJiangXueYuanGetImgUrl=https://skqhdg.porthebei.com:9004/file/
|
||||||
|
# \u7ED9\u5DE5\u5320\u5B66\u9662\u63A8\u9001\u4EBA\u5458\u6570\u636E\u65F6\u7684\u56FE\u7247\u9644\u4EF6\u524D\u7F00 \uFF08\u6D4B\u8BD5\u516C\u7F51\uFF09
|
||||||
|
gongJiangXueYuanGetImgUrl=https://wwag.qhdsafety.com/file/
|
||||||
|
|
||||||
|
# \u4E2D\u53F0
|
||||||
|
# \u6D88\u8D39\u4E2D\u53F0\u901A\u77E5
|
||||||
|
mq.consumer.dataChange.tongbu-data-change.topic=tongbu_dataChange_docking
|
||||||
|
mq.consumer.dataChange.tongbu-data-change.group=tongbu_dataChange_group
|
||||||
|
|
||||||
|
# \u672C\u5730\u6570\u636E\u4FEE\u6539\u540E\u5411\u8FD9\u4E2Atopic\u63A8\u9001\uFF08\u6240\u6709\u7C7B\u578B\u540C\u6B65\u6570\u636E\u516C\u7528\uFF09
|
||||||
|
mq.producer.dataChange.slice-data-change.topic=slice_dataChange_docking
|
|
@ -118,22 +118,25 @@ mq.czks.data.group=scheduled_tasks_czks_docking
|
||||||
mq.czks.file.topic=czks_dockingPicture
|
mq.czks.file.topic=czks_dockingPicture
|
||||||
mq.czks.file.group=scheduled_tasks_czks_dockingPicture
|
mq.czks.file.group=scheduled_tasks_czks_dockingPicture
|
||||||
|
|
||||||
mq.gwj.data.topic=czks_docking
|
|
||||||
mq.gwj.file.topic=czks_dockingPicture
|
|
||||||
baseimgpath =http://192.168.192.201:8991/file/
|
|
||||||
|
|
||||||
heBeiQinAnFile=https://file.zcloudchina.com/YTHFile
|
|
||||||
biaoZhunShuJuKu=https://file.zcloudchina.com/
|
biaoZhunShuJuKu=https://file.zcloudchina.com/
|
||||||
dw.url=http://192.168.192.201:8888/qa-dingWei-gwj/
|
|
||||||
|
|
||||||
#<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>ʶ
|
#\uFFFD\u00FB\uFFFD\uFFFD\uFFFD\u02B6
|
||||||
# <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>ʯ
|
# \uFFFD\uFFFD\uFFFD\u077F\uFFFD\u02AF
|
||||||
czks-useridentity=CZKS
|
czks-useridentity=CZKS
|
||||||
czks-baseimgpath=https://wwag.qhdsafety.com/file/
|
czks-baseimgpath=https://wwag.qhdsafety.com/file/
|
||||||
czks-backendaddr=http://192.168.0.79:8091/
|
czks-backendaddr=http://192.168.0.79:8091/
|
||||||
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
# \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
|
||||||
gwj-useridentity=GWJ
|
gwj-useridentity=GWJ
|
||||||
gwj-baseimgpath=https://qgqy.qhdsafety.com/file/
|
gwj-baseimgpath=https://qgqy.qhdsafety.com/file/
|
||||||
gwj-backendaddr=http://192.168.0.31:8991/qa-prevention-gwj/
|
gwj-backendaddr=http://192.168.0.31:8991/qa-prevention-gwj/
|
||||||
|
|
||||||
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
|
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
|
||||||
|
|
||||||
|
gongJiangXueYuanSendPublicKey=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzbwmqhb5xVejFQFoa8NF2FGtb2nMtpalZ2Zcy78tL/5Y5Od78EKb9dALuv4b+F/PexynKrQDlnRhAouuqF8S1LuC0njbWSaFMofCeyeoltSQTEcjwzEAOPH9CnzGOZQ19tB2vEamVoLefWC4H0V+e5hWv7DDCm3bLNaHhMnR1/o0ASZqzIHYDEzVZNGrxR8WIhxUh7fORk75nEUyz2S6WKq1MlOkm8ZssMsFW+KacRTnexn8Q2p8/7/3zRCScLoH3pHA+J35nuP+doigUmPJzwHfPsr1QeYdadtuwZdfCZVQ7U4R4vB83NsSElAgTW+xHzy7Y1EcgZgYfSedetb03QIDAQAB
|
||||||
|
gongJiangXueYuanSendPrivateKey=58e5e358b220335e7b1c6cc3576ceecc28b4a95d96cbbe0
|
||||||
|
gongJiangXueYuanTestUrl=https://hbgk.bjzqwl.com
|
||||||
|
gongJiangXueYuanProdUrl=https://gjxy.bjttsx.com
|
||||||
|
# \u7ED9\u5DE5\u5320\u5B66\u9662\u63A8\u9001\u4EBA\u5458\u6570\u636E\u65F6\u7684\u56FE\u7247\u9644\u4EF6\u524D\u7F00 \uFF08\u6B63\u5F0F\u516C\u7F51\uFF09
|
||||||
|
#gongJiangXueYuanGetImgUrl=https://skqhdg.porthebei.com:9004/file/
|
||||||
|
# \u7ED9\u5DE5\u5320\u5B66\u9662\u63A8\u9001\u4EBA\u5458\u6570\u636E\u65F6\u7684\u56FE\u7247\u9644\u4EF6\u524D\u7F00 \uFF08\u6D4B\u8BD5\u516C\u7F51\uFF09
|
||||||
|
gongJiangXueYuanGetImgUrl=https://wwag.qhdsafety.com/file/
|
|
@ -80,6 +80,21 @@ rocketmq.producer.retry-next-server=true
|
||||||
rocketmq.producer.retry-times-when-send-async-failed=3
|
rocketmq.producer.retry-times-when-send-async-failed=3
|
||||||
## topic \u524D\u7F00
|
## topic \u524D\u7F00
|
||||||
|
|
||||||
|
mq.csy.data.topic=csy_docking
|
||||||
|
mq.csy.data.group=scheduled_tasks_csy_docking
|
||||||
|
mq.csy.file.topic=csy_dockingPicture
|
||||||
|
mq.csy.file.group=scheduled_tasks_csy_dockingPicture
|
||||||
|
|
||||||
|
mq.cmt.data.topic=cmt_docking
|
||||||
|
mq.cmt.data.group=scheduled_tasks_cmt_docking
|
||||||
|
mq.cmt.file.topic=cmt_dockingPicture
|
||||||
|
mq.cmt.file.group=scheduled_tasks_cmt_dockingPicture
|
||||||
|
|
||||||
|
mq.czks.data.topic=czks_docking
|
||||||
|
mq.czks.data.group=scheduled_tasks_czks_docking
|
||||||
|
mq.czks.file.topic=czks_dockingPicture
|
||||||
|
mq.czks.file.group=scheduled_tasks_czks_dockingPicture
|
||||||
|
|
||||||
mq.topic.info=info
|
mq.topic.info=info
|
||||||
mq.topic.eightWork=eightWork
|
mq.topic.eightWork=eightWork
|
||||||
mq.group.info=scheduled_tasks
|
mq.group.info=scheduled_tasks
|
||||||
|
@ -104,3 +119,21 @@ biaoZhunShuJuKu=https://file.zcloudchina.com/
|
||||||
|
|
||||||
liteflow.rule-source=flow.xml
|
liteflow.rule-source=flow.xml
|
||||||
liteflow.print-execution-log=false
|
liteflow.print-execution-log=false
|
||||||
|
|
||||||
|
gongJiangXueYuanSendPublicKey=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzbwmqhb5xVejFQFoa8NF2FGtb2nMtpalZ2Zcy78tL/5Y5Od78EKb9dALuv4b+F/PexynKrQDlnRhAouuqF8S1LuC0njbWSaFMofCeyeoltSQTEcjwzEAOPH9CnzGOZQ19tB2vEamVoLefWC4H0V+e5hWv7DDCm3bLNaHhMnR1/o0ASZqzIHYDEzVZNGrxR8WIhxUh7fORk75nEUyz2S6WKq1MlOkm8ZssMsFW+KacRTnexn8Q2p8/7/3zRCScLoH3pHA+J35nuP+doigUmPJzwHfPsr1QeYdadtuwZdfCZVQ7U4R4vB83NsSElAgTW+xHzy7Y1EcgZgYfSedetb03QIDAQAB
|
||||||
|
gongJiangXueYuanSendPrivateKey=58e5e358b220335e7b1c6cc3576ceecc28b4a95d96cbbe0
|
||||||
|
gongJiangXueYuanTestUrl=https://hbgk.bjzqwl.com
|
||||||
|
gongJiangXueYuanProdUrl=https://gjxy.bjttsx.com
|
||||||
|
# \u7ED9\u5DE5\u5320\u5B66\u9662\u63A8\u9001\u4EBA\u5458\u6570\u636E\u65F6\u7684\u56FE\u7247\u9644\u4EF6\u524D\u7F00 \uFF08\u6B63\u5F0F\u516C\u7F51\uFF09
|
||||||
|
gongJiangXueYuanGetImgUrl=https://skqhdg.porthebei.com:9004/file/
|
||||||
|
# \u7ED9\u5DE5\u5320\u5B66\u9662\u63A8\u9001\u4EBA\u5458\u6570\u636E\u65F6\u7684\u56FE\u7247\u9644\u4EF6\u524D\u7F00 \uFF08\u6D4B\u8BD5\u516C\u7F51\uFF09
|
||||||
|
#gongJiangXueYuanGetImgUrl=https://wwag.qhdsafety.com/file/
|
||||||
|
|
||||||
|
# \u4E2D\u53F0
|
||||||
|
# \u6D88\u8D39\u4E2D\u53F0\u901A\u77E5
|
||||||
|
mq.consumer.dataChange.tongbu-data-change.topic=tongbu_dataChange_docking
|
||||||
|
mq.consumer.dataChange.tongbu-data-change.group=tongbu_dataChange_group
|
||||||
|
|
||||||
|
# \u672C\u5730\u6570\u636E\u4FEE\u6539\u540E\u5411\u8FD9\u4E2Atopic\u63A8\u9001\uFF08\u6240\u6709\u7C7B\u578B\u540C\u6B65\u6570\u636E\u516C\u7528\uFF09
|
||||||
|
mq.producer.dataChange.slice-data-change.topic=slice_dataChange_docking
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ spring.application.name=qa-prevention-gwj
|
||||||
server.port=8091
|
server.port=8091
|
||||||
|
|
||||||
#??
|
#??
|
||||||
spring.profiles.active=local
|
#spring.profiles.active=local
|
||||||
#<EFBFBD><EFBFBD><EFBFBD><EFBFBD>31ʱʹ<EFBFBD><EFBFBD>
|
#\uFFFD\uFFFD\uFFFD\uFFFD31\u02B1\u02B9\uFFFD\uFFFD
|
||||||
#spring.profiles.active=dev
|
spring.profiles.active=dev
|
||||||
#??
|
#??
|
||||||
#spring.profiles.active=master
|
#spring.profiles.active=master
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?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">
|
||||||
|
<mapper namespace="com.zcloud.mapper.datasource.mq.MqConsumptionErrorLogMapper">
|
||||||
|
<sql id="tableName">
|
||||||
|
`qa-gwj-prevention`.`mq_consumption_error_log`
|
||||||
|
</sql>
|
||||||
|
<sql id="Field2">
|
||||||
|
CONSUMPTION_ID,
|
||||||
|
MARK,
|
||||||
|
DATA,
|
||||||
|
MESSAGE_LOG_ID,
|
||||||
|
SUCCESS,
|
||||||
|
CREATE_TIME,
|
||||||
|
CONSUMPTION_TIME,
|
||||||
|
CONSUMPTION_TYPE,
|
||||||
|
ERROR_MESSAGE,
|
||||||
|
URL
|
||||||
|
</sql>
|
||||||
|
<sql id="FieldValue">
|
||||||
|
#{CONSUMPTION_ID},
|
||||||
|
#{MARK},
|
||||||
|
#{DATA},
|
||||||
|
#{MESSAGE_LOG_ID},
|
||||||
|
#{SUCCESS},
|
||||||
|
#{CREATE_TIME},
|
||||||
|
#{CONSUMPTION_TIME},
|
||||||
|
#{CONSUMPTION_TYPE},
|
||||||
|
#{ERROR_MESSAGE},
|
||||||
|
#{URL}
|
||||||
|
</sql>
|
||||||
|
<insert id="save" parameterType="pd">
|
||||||
|
insert into
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
(
|
||||||
|
<include refid="Field2"></include>
|
||||||
|
) values (
|
||||||
|
<include refid="FieldValue"></include>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?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">
|
||||||
|
<mapper namespace="com.zcloud.mapper.datasource.mq.MqConsumptionLogMapper">
|
||||||
|
<sql id="tableName">
|
||||||
|
`qa-gwj-prevention`.`mq_consumption_log`
|
||||||
|
</sql>
|
||||||
|
<sql id="Field2">
|
||||||
|
CONSUMPTION_ID,
|
||||||
|
MARK,
|
||||||
|
DATA,
|
||||||
|
MESSAGE_LOG_ID,
|
||||||
|
SUCCESS,
|
||||||
|
CREATE_TIME,
|
||||||
|
CONSUMPTION_TIME,
|
||||||
|
CONSUMPTION_TYPE,
|
||||||
|
ERROR_MESSAGE,
|
||||||
|
URL
|
||||||
|
</sql>
|
||||||
|
<sql id="FieldValue">
|
||||||
|
#{CONSUMPTION_ID},
|
||||||
|
#{MARK},
|
||||||
|
#{DATA},
|
||||||
|
#{MESSAGE_LOG_ID},
|
||||||
|
#{SUCCESS},
|
||||||
|
#{CREATE_TIME},
|
||||||
|
#{CONSUMPTION_TIME},
|
||||||
|
#{CONSUMPTION_TYPE},
|
||||||
|
#{ERROR_MESSAGE},
|
||||||
|
#{URL}
|
||||||
|
</sql>
|
||||||
|
<insert id="save" parameterType="pd">
|
||||||
|
insert into
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
(
|
||||||
|
<include refid="Field2"></include>
|
||||||
|
) values (
|
||||||
|
<include refid="FieldValue"></include>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -92,7 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
CORPINFO_ID,
|
CORPINFO_ID,
|
||||||
CARDNO,
|
CARDNO,
|
||||||
MKMJCARD,
|
MKMJCARD,
|
||||||
ISDELETE
|
ISDELETE,
|
||||||
|
ISPUSH
|
||||||
</sql>
|
</sql>
|
||||||
<!-- 字段 -->
|
<!-- 字段 -->
|
||||||
<sql id="Fieldf">
|
<sql id="Fieldf">
|
||||||
|
@ -133,7 +134,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
f.CORPINFO_ID,
|
f.CORPINFO_ID,
|
||||||
f.CARDNO,
|
f.CARDNO,
|
||||||
f.MKMJCARD,
|
f.MKMJCARD,
|
||||||
f.ISDELETE
|
f.ISDELETE,
|
||||||
|
f.ISPUSH
|
||||||
</sql>
|
</sql>
|
||||||
<!-- 字段值 -->
|
<!-- 字段值 -->
|
||||||
<sql id="FieldValue">
|
<sql id="FieldValue">
|
||||||
|
@ -171,7 +173,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{CORPINFO_ID},
|
#{CORPINFO_ID},
|
||||||
#{CARDNO},
|
#{CARDNO},
|
||||||
#{MKMJCARD},
|
#{MKMJCARD},
|
||||||
#{ISDELETE}
|
#{ISDELETE},
|
||||||
|
#{ISPUSH}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 用户列表(全部) -->
|
<!-- 用户列表(全部) -->
|
||||||
|
@ -257,9 +260,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
LEFT JOIN OA_DEPARTMENT dept on f.DEPARTMENT_ID = dept.DEPARTMENT_ID
|
LEFT JOIN OA_DEPARTMENT dept on f.DEPARTMENT_ID = dept.DEPARTMENT_ID
|
||||||
where
|
where
|
||||||
f.USERNAME = #{USERNAME} and f.ISDELETE='0'
|
USERNAME = #{USERNAME} and ISDELETE='0'
|
||||||
<if test="VERIFYUSER_ID != null and VERIFYUSER_ID != ''">
|
<if test="VERIFYUSER_ID != null and VERIFYUSER_ID != ''">
|
||||||
and f.USER_ID != #{VERIFYUSER_ID}
|
and USER_ID != #{VERIFYUSER_ID}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="findByName" parameterType="pd" resultType="pd" >
|
<select id="findByName" parameterType="pd" resultType="pd" >
|
||||||
|
@ -280,11 +283,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
post.NAME as postName,
|
post.NAME as postName,
|
||||||
dicRer.NAME as personnelTypeName,
|
dicRer.NAME as personnelTypeName,
|
||||||
dicWork.NAME as typeOfWorkName,
|
dicWork.NAME as typeOfWorkName,
|
||||||
info.ENTRY_DATE
|
c.CORP_NAME as CORPINFO_NAME,
|
||||||
|
info.ENTRY_DATE,
|
||||||
|
dicsex.NAME as SEX,
|
||||||
|
info.POLITICAL_OUTLOOK as POLITICAL_OUTLOOK,
|
||||||
|
info.DATE_OF_BIRTH as DATE_OF_BIRTH,
|
||||||
|
info.TYPE_OF_WORK as TYPE_OF_WORK,
|
||||||
|
info.ENTRY_DATE as ENTRY_DATE,
|
||||||
|
info.WORKING_DATE as WORKING_DATE,
|
||||||
|
info.INCUMBENCY as INCUMBENCY,
|
||||||
|
info.ISSTATE as ISSTATE,
|
||||||
|
info.USER_ID_CARD as CARD_NO,
|
||||||
|
dicna.NAME as NATION,
|
||||||
|
dept.NAME as DEPARTMENT_NAME
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include>f
|
<include refid="tableName"></include>f
|
||||||
left join SYS_USERINFO info on info.USER_ID = f.USER_ID
|
left join SYS_USERINFO info on info.USER_ID = f.USER_ID
|
||||||
|
left join bus_corp_info c on c.CORPINFO_ID = f.CORPINFO_ID
|
||||||
left join sys_dictionaries dicsex on dicsex.DICTIONARIES_ID = info.SEX
|
left join sys_dictionaries dicsex on dicsex.DICTIONARIES_ID = info.SEX
|
||||||
|
left join sys_dictionaries dicna on dicna.DICTIONARIES_ID = info.NATION
|
||||||
left join oa_department dept on dept.DEPARTMENT_ID = f.DEPARTMENT_ID
|
left join oa_department dept on dept.DEPARTMENT_ID = f.DEPARTMENT_ID
|
||||||
left join sys_post post on post.POST_ID = f.POST_ID
|
left join sys_post post on post.POST_ID = f.POST_ID
|
||||||
left join sys_dictionaries dicRer on dicRer.DICTIONARIES_ID = info.PERSONNEL_TYPE
|
left join sys_dictionaries dicRer on dicRer.DICTIONARIES_ID = info.PERSONNEL_TYPE
|
||||||
|
@ -387,6 +404,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
IS_HAZARDCONFIRMER = #{IS_HAZARDCONFIRMER},
|
IS_HAZARDCONFIRMER = #{IS_HAZARDCONFIRMER},
|
||||||
IS_ONLINELEARNING = #{IS_ONLINELEARNING},
|
IS_ONLINELEARNING = #{IS_ONLINELEARNING},
|
||||||
PHONE = #{PHONE}
|
PHONE = #{PHONE}
|
||||||
|
<if test="ISPUSH != null and ISPUSH != ''">
|
||||||
|
,ISPUSH = #{ISPUSH}
|
||||||
|
</if>
|
||||||
<if test="CARDNO != null and CARDNO != ''">
|
<if test="CARDNO != null and CARDNO != ''">
|
||||||
,CARDNO = #{CARDNO}
|
,CARDNO = #{CARDNO}
|
||||||
</if>
|
</if>
|
||||||
|
@ -405,6 +425,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="SHIFTDUTYONE != null and SHIFTDUTYONE != ''">
|
<if test="SHIFTDUTYONE != null and SHIFTDUTYONE != ''">
|
||||||
,SHIFTDUTYONE = #{SHIFTDUTYONE}
|
,SHIFTDUTYONE = #{SHIFTDUTYONE}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="ISDELETE != null and ISDELETE != ''">
|
||||||
|
,ISDELETE = #{ISDELETE}
|
||||||
|
</if>
|
||||||
<if test="SHIFTDUTYTWO != null and SHIFTDUTYTWO != ''">
|
<if test="SHIFTDUTYTWO != null and SHIFTDUTYTWO != ''">
|
||||||
,SHIFTDUTYTWO = #{SHIFTDUTYTWO}
|
,SHIFTDUTYTWO = #{SHIFTDUTYTWO}
|
||||||
</if>
|
</if>
|
||||||
|
@ -464,20 +487,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select u.USER_ID,
|
select u.USER_ID,
|
||||||
u.USERNAME,
|
u.USERNAME,
|
||||||
u.PASSWORD,
|
u.PASSWORD,
|
||||||
u.LAST_LOGIN,
|
|
||||||
u.NAME,
|
u.NAME,
|
||||||
|
u.LAST_LOGIN,
|
||||||
u.IP,
|
u.IP,
|
||||||
|
u.STATUS,
|
||||||
|
u.BZ,
|
||||||
|
u.SKIN,
|
||||||
u.EMAIL,
|
u.EMAIL,
|
||||||
u.NUMBER,
|
u.NUMBER,
|
||||||
u.PHONE,
|
u.PHONE,
|
||||||
|
u.ROLE_IDS,
|
||||||
|
u.DEPARTMENT_ID,
|
||||||
|
u.CORPINFO_ID,
|
||||||
|
u.FUN_IDS,
|
||||||
|
u.APPID,
|
||||||
|
u.POST_ID,
|
||||||
u.ISMAIN,
|
u.ISMAIN,
|
||||||
u.PERSON_TYPE,
|
u.ERROR_COUNT,
|
||||||
|
u.SORT,
|
||||||
|
u.LEARNERCATEGORY,
|
||||||
|
u.USERAVATARPREFIX,
|
||||||
|
u.USERAVATARURL,
|
||||||
u.SHIFTDUTYONE,
|
u.SHIFTDUTYONE,
|
||||||
u.SHIFTDUTYTWO,
|
u.SHIFTDUTYTWO,
|
||||||
u.DURATION,
|
u.DURATION,
|
||||||
u.WORKSTATUS,
|
u.WORKSTATUS,
|
||||||
u.WORKPERIOD,
|
u.WORKPERIOD,
|
||||||
u.STATUS,
|
u.PERSONNEL_TYPE,
|
||||||
|
u.IS_HAZARDCONFIRMER,
|
||||||
|
u.IS_ONLINELEARNING,
|
||||||
|
u.PERSON_TYPE,
|
||||||
|
u.JCR,
|
||||||
|
u.ISDELETE,
|
||||||
|
u.PUSH_CID,
|
||||||
|
u.EMPNO,
|
||||||
|
u.CFD_STATUS,
|
||||||
|
u.CARDNO,
|
||||||
|
u.USER_IDENTITY,
|
||||||
|
u.BASEIMGPATH,
|
||||||
|
u.BACKENDADDR,
|
||||||
|
u.MKMJCARD,
|
||||||
|
u.ISPUSH,
|
||||||
|
c.CORP_NAME CORPINFO_NAME,
|
||||||
|
sud.NATION,
|
||||||
|
sud.SEX,
|
||||||
|
sud.USER_ID_CARD CARD_NO,
|
||||||
|
sud.POLITICAL_OUTLOOK,
|
||||||
|
sud.DATE_OF_BIRTH,
|
||||||
|
sud.DEGREE_OF_EDUCATION,
|
||||||
|
sud.DUTIES,
|
||||||
|
sud.TYPE_OF_WORK,
|
||||||
|
sud.ENTRY_DATE,
|
||||||
|
sud.WORKING_DATE,
|
||||||
|
sud.INCUMBENCY,
|
||||||
|
sud.ISSTATE,
|
||||||
|
sud.TITLE,
|
||||||
r.ROLE_ID,
|
r.ROLE_ID,
|
||||||
r.ROLE_NAME,
|
r.ROLE_NAME,
|
||||||
o.NAME as PID_NAME,
|
o.NAME as PID_NAME,
|
||||||
|
@ -487,7 +551,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
sw.NAME SHIFTDUTYONENAME,
|
sw.NAME SHIFTDUTYONENAME,
|
||||||
swr.NAME SHIFTDUTYTWONAME,
|
swr.NAME SHIFTDUTYTWONAME,
|
||||||
info.IS_RECORDER,
|
info.IS_RECORDER,
|
||||||
info.IS_CHARGE
|
info.IS_CHARGE,
|
||||||
|
bi.FOREIGN_KEY,
|
||||||
|
bi.FILE_NAME,
|
||||||
|
bi.FILEPATH,
|
||||||
|
bi.IMGFILES_ID
|
||||||
<if test="pd.IS_ARCHIVES != null and pd.IS_ARCHIVES != ''"> <!--档案列表 -->
|
<if test="pd.IS_ARCHIVES != null and pd.IS_ARCHIVES != ''"> <!--档案列表 -->
|
||||||
,(select count(1) from BUS_STAGESTUDENTRELATION s where s.USER_ID = u.USER_ID) as TASK_COUNT,
|
,(select count(1) from BUS_STAGESTUDENTRELATION s where s.USER_ID = u.USER_ID) as TASK_COUNT,
|
||||||
(select count(1) from BUS_STAGESTUDENTRELATION s where s.USER_ID = u.USER_ID and s.STAGEEXAMSTATE=3) as COMPLETE_COUNT
|
(select count(1) from BUS_STAGESTUDENTRELATION s where s.USER_ID = u.USER_ID and s.STAGEEXAMSTATE=3) as COMPLETE_COUNT
|
||||||
|
@ -496,12 +564,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
|
left join SYS_ROLE r on u.ROLE_ID = r.ROLE_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
|
||||||
left join OA_DEPARTMENT o ON o.DEPARTMENT_ID = d.PARENT_ID
|
left join OA_DEPARTMENT o ON o.DEPARTMENT_ID = d.PARENT_ID
|
||||||
|
left join sys_userinfo sud on sud.USER_ID=u.USER_ID
|
||||||
left join SYS_POST p on p.POST_ID=u.POST_ID
|
left join SYS_POST p on p.POST_ID=u.POST_ID
|
||||||
|
left join bus_corp_info c on c.CORPINFO_ID = u.CORPINFO_ID
|
||||||
left join BUS_SHIFTWORKRULES sw on sw.SHIFTWORKRULES_ID = u.SHIFTDUTYONE
|
left join BUS_SHIFTWORKRULES sw on sw.SHIFTWORKRULES_ID = u.SHIFTDUTYONE
|
||||||
left join BUS_SHIFTWORKRULES swr on swr.SHIFTWORKRULES_ID = u.SHIFTDUTYTWO
|
left join BUS_SHIFTWORKRULES swr on swr.SHIFTWORKRULES_ID = u.SHIFTDUTYTWO
|
||||||
left join SYS_USERINFO info on info.USER_ID = u.USER_ID
|
left join SYS_USERINFO info on info.USER_ID = u.USER_ID
|
||||||
where u.ISDELETE = '0' and
|
LEFT JOIN bus_imgfiles bi ON bi.FOREIGN_KEY = u.USER_ID AND bi.TYPE = '30'
|
||||||
|
where
|
||||||
u.USERNAME != 'admin'
|
u.USERNAME != 'admin'
|
||||||
|
<!-- Refer to 赵煜:这个一般的时候是没有这个参数的 目前不需要动 用and可以 -->
|
||||||
|
<if test="pd.ISPUSH==null and pd.ISPUSH==''"> <!-- 查询未推送成功的数据 -->
|
||||||
|
and u.ISDELETE = '0'
|
||||||
|
</if>
|
||||||
<!-- and r.PARENT_ID = '1' -->
|
<!-- and r.PARENT_ID = '1' -->
|
||||||
<if test="pd.KEYWORDS!= null and pd.KEYWORDS != ''">
|
<if test="pd.KEYWORDS!= null and pd.KEYWORDS != ''">
|
||||||
and
|
and
|
||||||
|
@ -551,6 +626,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="pd.IS_CHARGE != null and pd.IS_CHARGE != '' and pd.IS_CHARGE == 1 ">
|
<if test="pd.IS_CHARGE != null and pd.IS_CHARGE != '' and pd.IS_CHARGE == 1 ">
|
||||||
and info.IS_CHARGE = #{pd.IS_CHARGE}
|
and info.IS_CHARGE = #{pd.IS_CHARGE}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="pd.NOMAIN!=null and pd.NOMAIN!=''"> <!-- 登录时间检索 -->
|
||||||
|
and u.ISMAIN != "1"
|
||||||
|
</if>
|
||||||
|
<if test="pd.ISPUSH!=null and pd.ISPUSH!=''"> <!-- 登录时间检索 -->
|
||||||
|
<if test='pd.ISPUSH == "1"'>
|
||||||
|
and (u.ISPUSH = "1" or u.ISMAIN = "1")
|
||||||
|
and u.ISDELETE = '0'
|
||||||
|
</if>
|
||||||
|
<if test='pd.ISPUSH != "1"'>
|
||||||
|
AND (u.ISPUSH != "1" or u.ISPUSH is null)
|
||||||
|
AND (u.ISDELETE != "1" or u.ISPUSH = "0" )
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
<if test="pd.IS_HAZARDCONFIRMER != null and pd.IS_HAZARDCONFIRMER != ''"><!-- 关键词检索 -->
|
<if test="pd.IS_HAZARDCONFIRMER != null and pd.IS_HAZARDCONFIRMER != ''"><!-- 关键词检索 -->
|
||||||
AND
|
AND
|
||||||
u.IS_HAZARDCONFIRMER =#{pd.IS_HAZARDCONFIRMER}
|
u.IS_HAZARDCONFIRMER =#{pd.IS_HAZARDCONFIRMER}
|
||||||
|
@ -1439,8 +1527,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
p.NAME as POST_NAME
|
p.NAME as POST_NAME
|
||||||
from
|
from
|
||||||
`qa-gwj-prevention`.sys_user u
|
`qa-gwj-prevention`.sys_user u
|
||||||
left join `qa-gwj-prevention`oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
left join `qa-gwj-prevention`.oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
||||||
left join `qa-gwj-prevention`sys_post p on p.POST_ID = u.POST_ID
|
left join `qa-gwj-prevention`.sys_post p on p.POST_ID = u.POST_ID
|
||||||
where
|
where
|
||||||
u.CARDNO = #{CARDNO}
|
u.CARDNO = #{CARDNO}
|
||||||
</select>
|
</select>
|
||||||
|
@ -1465,4 +1553,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="editPushStatus" parameterType="pd">
|
||||||
|
update
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
set
|
||||||
|
ISPUSH = #{ISPUSH},
|
||||||
|
ISDELETE = #{ISDELETE}
|
||||||
|
where
|
||||||
|
USER_ID = #{USER_ID}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -218,65 +218,182 @@
|
||||||
<update id="edit" parameterType="pd">
|
<update id="edit" parameterType="pd">
|
||||||
update
|
update
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
set
|
<set>
|
||||||
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID},
|
<if test="XGF_USER_DETAILS_ID != null and XGF_USER_DETAILS_ID != ''">
|
||||||
XGF_USER_ID = #{XGF_USER_ID},
|
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID},
|
||||||
XGF_USER_NAME = #{XGF_USER_NAME},
|
</if>
|
||||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
<if test="XGF_USER_ID != null and XGF_USER_ID != ''">
|
||||||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
XGF_USER_ID = #{XGF_USER_ID},
|
||||||
PHONE = #{PHONE},
|
</if>
|
||||||
CREATE_TIME = #{CREATE_TIME},
|
<if test="XGF_USER_NAME != null and XGF_USER_NAME != ''">
|
||||||
DEPART_STATE = #{DEPART_STATE},
|
XGF_USER_NAME = #{XGF_USER_NAME},
|
||||||
IS_DELETE = #{IS_DELETE},
|
</if>
|
||||||
AGE = #{AGE},
|
<if test="BELONG_TO_CORP != null and BELONG_TO_CORP != ''">
|
||||||
HKLOCAL = #{HKLOCAL},
|
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||||
ADDRESS = #{ADDRESS},
|
</if>
|
||||||
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},
|
<if test="BELONG_TO_CORP_NAME != null and BELONG_TO_CORP_NAME != ''">
|
||||||
DEGREE_OF_EDUCATION_NAME = #{DEGREE_OF_EDUCATION_NAME},
|
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||||
CORP_START_DATE = #{CORP_START_DATE},
|
</if>
|
||||||
POST_ID = #{POST_ID},
|
<if test="PHONE != null and PHONE != ''">
|
||||||
POST_NAME = #{POST_NAME},
|
PHONE = #{PHONE},
|
||||||
WORK_SIGN = #{WORK_SIGN},
|
</if>
|
||||||
JOINED_DATE = #{JOINED_DATE},
|
<if test="CREATE_TIME != null and CREATE_TIME != ''">
|
||||||
WORK_DATE = #{WORK_DATE},
|
CREATE_TIME = #{CREATE_TIME},
|
||||||
PHOTO = #{PHOTO},
|
</if>
|
||||||
DATE_OF_BIRTH = #{DATE_OF_BIRTH},
|
<if test="DEPART_STATE != null and DEPART_STATE != ''">
|
||||||
ISPAY = #{ISPAY},
|
DEPART_STATE = #{DEPART_STATE},
|
||||||
ISPAY_NUMBER = #{ISPAY_NUMBER},
|
</if>
|
||||||
IS_SAFETY_TELL = #{IS_SAFETY_TELL},
|
<if test="IS_DELETE != null and IS_DELETE != ''">
|
||||||
IS_SAFETY_TIME = #{IS_SAFETY_TIME},
|
IS_DELETE = #{IS_DELETE},
|
||||||
IS_INJURIES_PAY = #{IS_INJURIES_PAY},
|
</if>
|
||||||
IS_SIGN_LABOR = #{IS_SIGN_LABOR},
|
<if test="AGE != null and AGE != ''">
|
||||||
SEX = #{SEX},
|
AGE = #{AGE},
|
||||||
ENTRY_DATE = #{ENTRY_DATE},
|
</if>
|
||||||
PERSON_WORK_TYPE = #{PERSON_WORK_TYPE},
|
<if test="HKLOCAL != null and HKLOCAL != ''">
|
||||||
PERSON_WORK_TYPE_NAME = #{PERSON_WORK_TYPE_NAME},
|
HKLOCAL = #{HKLOCAL},
|
||||||
NATIONALITY = #{NATIONALITY},
|
</if>
|
||||||
NATIONALITY_NAME = #{NATIONALITY_NAME},
|
<if test="ADDRESS != null and ADDRESS != ''">
|
||||||
POLITICAL_TIME = #{POLITICAL_TIME},
|
ADDRESS = #{ADDRESS},
|
||||||
POLITICAL_STATUS = #{POLITICAL_STATUS},
|
</if>
|
||||||
POLITICAL_STATUS_NAME = #{POLITICAL_STATUS_NAME},
|
<if test="DEGREE_OF_EDUCATION != null and DEGREE_OF_EDUCATION != ''">
|
||||||
IS_INJURIES_PAY_TIME = #{IS_INJURIES_PAY_TIME},
|
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},
|
||||||
IS_LEVEL_THREE = #{IS_LEVEL_THREE},
|
</if>
|
||||||
IS_BODY_ADAPT = #{IS_BODY_ADAPT},
|
<if test="DEGREE_OF_EDUCATION_NAME != null and DEGREE_OF_EDUCATION_NAME != ''">
|
||||||
IS_SPECIAL_JOB = #{IS_SPECIAL_JOB},
|
DEGREE_OF_EDUCATION_NAME = #{DEGREE_OF_EDUCATION_NAME},
|
||||||
CORPINFO_ID = #{CORPINFO_ID},
|
</if>
|
||||||
MANAGER_DEPARTMENT_ID = #{MANAGER_DEPARTMENT_ID},
|
<if test="CORP_START_DATE != null and CORP_START_DATE != ''">
|
||||||
MANAGER_DEPARTMENT_NAME = #{MANAGER_DEPARTMENT_NAME},
|
CORP_START_DATE = #{CORP_START_DATE},
|
||||||
COMPETENT_DEPARTMENT_ID = #{COMPETENT_DEPARTMENT_ID},
|
</if>
|
||||||
COMPETENT_DEPARTMENT_NAME = #{COMPETENT_DEPARTMENT_NAME},
|
<if test="POST_ID != null and POST_ID != ''">
|
||||||
MAIN_DEPARTMENT_ID = #{MAIN_DEPARTMENT_ID},
|
POST_ID = #{POST_ID},
|
||||||
MAIN_DEPARTMENT_NAME = #{MAIN_DEPARTMENT_NAME},
|
</if>
|
||||||
CARD_ID = #{CARD_ID},
|
<if test="POST_NAME != null and POST_NAME != ''">
|
||||||
DEPARTMENT_ID = #{DEPARTMENT_ID},
|
POST_NAME = #{POST_NAME},
|
||||||
DEPARTMENT_NAME = #{DEPARTMENT_NAME},
|
</if>
|
||||||
IS_BF = #{IS_BF},
|
<if test="WORK_SIGN != null and WORK_SIGN != ''">
|
||||||
IS_SOCIAL = #{IS_SOCIAL},
|
WORK_SIGN = #{WORK_SIGN},
|
||||||
SOCIAL_NUMBER = #{SOCIAL_NUMBER},
|
</if>
|
||||||
zzName = #{zzName},
|
<if test="JOINED_DATE != null and JOINED_DATE != ''">
|
||||||
ANNEX = #{ANNEX},
|
JOINED_DATE = #{JOINED_DATE},
|
||||||
ATTORNEY = #{ATTORNEY},
|
</if>
|
||||||
COMMITMENT_LETTER = #{COMMITMENT_LETTER}
|
<if test="WORK_DATE != null and WORK_DATE != ''">
|
||||||
|
WORK_DATE = #{WORK_DATE},
|
||||||
|
</if>
|
||||||
|
<if test="PHOTO != null and PHOTO != ''">
|
||||||
|
PHOTO = #{PHOTO},
|
||||||
|
</if>
|
||||||
|
<if test="DATE_OF_BIRTH != null and DATE_OF_BIRTH != ''">
|
||||||
|
DATE_OF_BIRTH = #{DATE_OF_BIRTH},
|
||||||
|
</if>
|
||||||
|
<if test="ISPAY != null and ISPAY != ''">
|
||||||
|
ISPAY = #{ISPAY},
|
||||||
|
</if>
|
||||||
|
<if test="ISPAY_NUMBER != null and ISPAY_NUMBER != ''">
|
||||||
|
ISPAY_NUMBER = #{ISPAY_NUMBER},
|
||||||
|
</if>
|
||||||
|
<if test="IS_SAFETY_TELL != null and IS_SAFETY_TELL != ''">
|
||||||
|
IS_SAFETY_TELL = #{IS_SAFETY_TELL},
|
||||||
|
</if>
|
||||||
|
<if test="IS_SAFETY_TIME != null and IS_SAFETY_TIME != ''">
|
||||||
|
IS_SAFETY_TIME = #{IS_SAFETY_TIME},
|
||||||
|
</if>
|
||||||
|
<if test="IS_INJURIES_PAY != null and IS_INJURIES_PAY != ''">
|
||||||
|
IS_INJURIES_PAY = #{IS_INJURIES_PAY},
|
||||||
|
</if>
|
||||||
|
<if test="IS_SIGN_LABOR != null and IS_SIGN_LABOR != ''">
|
||||||
|
IS_SIGN_LABOR = #{IS_SIGN_LABOR},
|
||||||
|
</if>
|
||||||
|
<if test="SEX != null and SEX != ''">
|
||||||
|
SEX = #{SEX},
|
||||||
|
</if>
|
||||||
|
<if test="ENTRY_DATE != null and ENTRY_DATE != ''">
|
||||||
|
ENTRY_DATE = #{ENTRY_DATE},
|
||||||
|
</if>
|
||||||
|
<if test="PERSON_WORK_TYPE != null and PERSON_WORK_TYPE != ''">
|
||||||
|
PERSON_WORK_TYPE = #{PERSON_WORK_TYPE},
|
||||||
|
</if>
|
||||||
|
<if test="PERSON_WORK_TYPE_NAME != null and PERSON_WORK_TYPE_NAME != ''">
|
||||||
|
PERSON_WORK_TYPE_NAME = #{PERSON_WORK_TYPE_NAME},
|
||||||
|
</if>
|
||||||
|
<if test="NATIONALITY != null and NATIONALITY != ''">
|
||||||
|
NATIONALITY = #{NATIONALITY},
|
||||||
|
</if>
|
||||||
|
<if test="NATIONALITY_NAME != null and NATIONALITY_NAME != ''">
|
||||||
|
NATIONALITY_NAME = #{NATIONALITY_NAME},
|
||||||
|
</if>
|
||||||
|
<if test="POLITICAL_TIME != null and POLITICAL_TIME != ''">
|
||||||
|
POLITICAL_TIME = #{POLITICAL_TIME},
|
||||||
|
</if>
|
||||||
|
<if test="POLITICAL_STATUS != null and POLITICAL_STATUS != ''">
|
||||||
|
POLITICAL_STATUS = #{POLITICAL_STATUS},
|
||||||
|
</if>
|
||||||
|
<if test="POLITICAL_STATUS_NAME != null and POLITICAL_STATUS_NAME != ''">
|
||||||
|
POLITICAL_STATUS_NAME = #{POLITICAL_STATUS_NAME},
|
||||||
|
</if>
|
||||||
|
<if test="IS_INJURIES_PAY_TIME != null and IS_INJURIES_PAY_TIME != ''">
|
||||||
|
IS_INJURIES_PAY_TIME = #{IS_INJURIES_PAY_TIME},
|
||||||
|
</if>
|
||||||
|
<if test="IS_LEVEL_THREE != null and IS_LEVEL_THREE != ''">
|
||||||
|
IS_LEVEL_THREE = #{IS_LEVEL_THREE},
|
||||||
|
</if>
|
||||||
|
<if test="IS_BODY_ADAPT != null and IS_BODY_ADAPT != ''">
|
||||||
|
IS_BODY_ADAPT = #{IS_BODY_ADAPT},
|
||||||
|
</if>
|
||||||
|
<if test="IS_SPECIAL_JOB != null and IS_SPECIAL_JOB != ''">
|
||||||
|
IS_SPECIAL_JOB = #{IS_SPECIAL_JOB},
|
||||||
|
</if>
|
||||||
|
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||||
|
CORPINFO_ID = #{CORPINFO_ID},
|
||||||
|
</if>
|
||||||
|
<if test="MANAGER_DEPARTMENT_ID != null and MANAGER_DEPARTMENT_ID != ''">
|
||||||
|
MANAGER_DEPARTMENT_ID = #{MANAGER_DEPARTMENT_ID},
|
||||||
|
</if>
|
||||||
|
<if test="MANAGER_DEPARTMENT_NAME != null and MANAGER_DEPARTMENT_NAME != ''">
|
||||||
|
MANAGER_DEPARTMENT_NAME = #{MANAGER_DEPARTMENT_NAME},
|
||||||
|
</if>
|
||||||
|
<if test="COMPETENT_DEPARTMENT_ID != null and COMPETENT_DEPARTMENT_ID != ''">
|
||||||
|
COMPETENT_DEPARTMENT_ID = #{COMPETENT_DEPARTMENT_ID},
|
||||||
|
</if>
|
||||||
|
<if test="COMPETENT_DEPARTMENT_NAME != null and COMPETENT_DEPARTMENT_NAME != ''">
|
||||||
|
COMPETENT_DEPARTMENT_NAME = #{COMPETENT_DEPARTMENT_NAME},
|
||||||
|
</if>
|
||||||
|
<if test="MAIN_DEPARTMENT_ID != null and MAIN_DEPARTMENT_ID != ''">
|
||||||
|
MAIN_DEPARTMENT_ID = #{MAIN_DEPARTMENT_ID},
|
||||||
|
</if>
|
||||||
|
<if test="MAIN_DEPARTMENT_NAME != null and MAIN_DEPARTMENT_NAME != ''">
|
||||||
|
MAIN_DEPARTMENT_NAME = #{MAIN_DEPARTMENT_NAME},
|
||||||
|
</if>
|
||||||
|
<if test="CARD_ID != null and CARD_ID != ''">
|
||||||
|
CARD_ID = #{CARD_ID},
|
||||||
|
</if>
|
||||||
|
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''">
|
||||||
|
DEPARTMENT_ID = #{DEPARTMENT_ID},
|
||||||
|
</if>
|
||||||
|
<if test="DEPARTMENT_NAME != null and DEPARTMENT_NAME != ''">
|
||||||
|
DEPARTMENT_NAME = #{DEPARTMENT_NAME},
|
||||||
|
</if>
|
||||||
|
<if test="IS_BF != null and IS_BF != ''">
|
||||||
|
IS_BF = #{IS_BF},
|
||||||
|
</if>
|
||||||
|
<if test="IS_SOCIAL != null and IS_SOCIAL != ''">
|
||||||
|
IS_SOCIAL = #{IS_SOCIAL},
|
||||||
|
</if>
|
||||||
|
<if test="SOCIAL_NUMBER != null and SOCIAL_NUMBER != ''">
|
||||||
|
SOCIAL_NUMBER = #{SOCIAL_NUMBER},
|
||||||
|
</if>
|
||||||
|
<if test="zzName != null and zzName != ''">
|
||||||
|
zzName = #{zzName},
|
||||||
|
</if>
|
||||||
|
<if test="ANNEX != null and ANNEX != ''">
|
||||||
|
ANNEX = #{ANNEX},
|
||||||
|
</if>
|
||||||
|
<if test="ATTORNEY != null and ATTORNEY != ''">
|
||||||
|
ATTORNEY = #{ATTORNEY},
|
||||||
|
</if>
|
||||||
|
<if test="COMMITMENT_LETTER != null and COMMITMENT_LETTER != ''">
|
||||||
|
COMMITMENT_LETTER = #{COMMITMENT_LETTER}
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
where
|
where
|
||||||
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID}
|
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
@ -92,22 +92,53 @@
|
||||||
<update id="edit" parameterType="pd">
|
<update id="edit" parameterType="pd">
|
||||||
update
|
update
|
||||||
<include refid="tableName"></include>
|
<include refid="tableName"></include>
|
||||||
set
|
<set>
|
||||||
USERNAME = #{USERNAME},
|
<if test="USERNAME != null and USERNAME != ''">
|
||||||
NAME = #{NAME},
|
USERNAME = #{USERNAME},
|
||||||
VALID_FLAG = #{VALID_FLAG},
|
</if>
|
||||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
<if test="NAME != null and NAME != ''">
|
||||||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
NAME = #{NAME},
|
||||||
IS_DELETE = #{IS_DELETE},
|
</if>
|
||||||
CREATE_TIME = #{CREATE_TIME},
|
<if test="VALID_FLAG != null and VALID_FLAG != ''">
|
||||||
CORPINFO_ID = #{CORPINFO_ID},
|
VALID_FLAG = #{VALID_FLAG},
|
||||||
STATUS = #{STATUS},
|
</if>
|
||||||
OPERATOR_TIME = #{OPERATOR_TIME},
|
<if test="BELONG_TO_CORP != null and BELONG_TO_CORP != ''">
|
||||||
ISFLOW = #{ISFLOW},
|
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||||
STUDY_STATUS = #{STUDY_STATUS},
|
</if>
|
||||||
CHECK_STATUS = #{CHECK_STATUS},
|
<if test="BELONG_TO_CORP_NAME != null and BELONG_TO_CORP_NAME != ''">
|
||||||
CHECK_STEP = #{CHECK_STEP},
|
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||||
LIMIT_END_TIME = #{LIMIT_END_TIME}
|
</if>
|
||||||
|
<if test="IS_DELETE != null and IS_DELETE != ''">
|
||||||
|
IS_DELETE = #{IS_DELETE},
|
||||||
|
</if>
|
||||||
|
<if test="CREATE_TIME != null and CREATE_TIME != ''">
|
||||||
|
CREATE_TIME = #{CREATE_TIME},
|
||||||
|
</if>
|
||||||
|
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||||
|
CORPINFO_ID = #{CORPINFO_ID},
|
||||||
|
</if>
|
||||||
|
<if test="STATUS != null and STATUS != ''">
|
||||||
|
STATUS = #{STATUS},
|
||||||
|
</if>
|
||||||
|
<if test="OPERATOR_TIME != null and OPERATOR_TIME != ''">
|
||||||
|
OPERATOR_TIME = #{OPERATOR_TIME},
|
||||||
|
</if>
|
||||||
|
<if test="ISFLOW != null and ISFLOW != ''">
|
||||||
|
ISFLOW = #{ISFLOW},
|
||||||
|
</if>
|
||||||
|
<if test="STUDY_STATUS != null and STUDY_STATUS != ''">
|
||||||
|
STUDY_STATUS = #{STUDY_STATUS},
|
||||||
|
</if>
|
||||||
|
<if test="CHECK_STATUS != null and CHECK_STATUS != ''">
|
||||||
|
CHECK_STATUS = #{CHECK_STATUS},
|
||||||
|
</if>
|
||||||
|
<if test="CHECK_STEP != null and CHECK_STEP != ''">
|
||||||
|
CHECK_STEP = #{CHECK_STEP},
|
||||||
|
</if>
|
||||||
|
<if test="LIMIT_END_TIME != null and LIMIT_END_TIME != ''">
|
||||||
|
LIMIT_END_TIME = #{LIMIT_END_TIME}
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
where
|
where
|
||||||
XGF_USER_ID = #{XGF_USER_ID}
|
XGF_USER_ID = #{XGF_USER_ID}
|
||||||
</update>
|
</update>
|
||||||
|
|
Loading…
Reference in New Issue