|
@@ -23,9 +23,13 @@ import org.springframework.ui.Model;
|
|
import org.springframework.web.bind.WebDataBinder;
|
|
import org.springframework.web.bind.WebDataBinder;
|
|
import org.springframework.web.bind.annotation.InitBinder;
|
|
import org.springframework.web.bind.annotation.InitBinder;
|
|
|
|
|
|
|
|
+import rtx.RTXSvrApi;
|
|
|
|
+
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.liandi.encrypt.Des;
|
|
import com.liandi.encrypt.Des;
|
|
|
|
+import com.xt.jygl.gkjcxx.gq.entity.GqEntity;
|
|
|
|
+import com.xt.jygl.gkjcxx.gq.service.GqService;
|
|
import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.entity.GkjyrEntity;
|
|
import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.entity.GkjyrEntity;
|
|
import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.service.GkjyrService;
|
|
import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.service.GkjyrService;
|
|
import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.vo.GkjyrVo;
|
|
import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.vo.GkjyrVo;
|
|
@@ -40,6 +44,7 @@ import com.xtframe.sec.common.PredicateModel.Operator;
|
|
import com.xtframe.sec.common.QueryService;
|
|
import com.xtframe.sec.common.QueryService;
|
|
import com.xtframe.sec.common.SimplePageRequest;
|
|
import com.xtframe.sec.common.SimplePageRequest;
|
|
import com.xtframe.sec.menu.entity.MenuEntity;
|
|
import com.xtframe.sec.menu.entity.MenuEntity;
|
|
|
|
+import com.xtframe.sec.role.entity.RoleEntity;
|
|
import com.xtframe.sec.user.entity.UserEntity;
|
|
import com.xtframe.sec.user.entity.UserEntity;
|
|
import com.xtframe.sec.utils.SecUtils;
|
|
import com.xtframe.sec.utils.SecUtils;
|
|
import com.xtframe.util.DateTime;
|
|
import com.xtframe.util.DateTime;
|
|
@@ -54,6 +59,8 @@ public class BaseWebCtl extends BaseCtl {
|
|
private GkjyrService gkjyrService;
|
|
private GkjyrService gkjyrService;
|
|
@Autowired
|
|
@Autowired
|
|
protected QueryService query;
|
|
protected QueryService query;
|
|
|
|
+ @Autowired
|
|
|
|
+ private GqService gqService;
|
|
|
|
|
|
public static final String ALGORITHM = "SHA-256";
|
|
public static final String ALGORITHM = "SHA-256";
|
|
public static JsonConfig config = new JsonConfig();
|
|
public static JsonConfig config = new JsonConfig();
|
|
@@ -98,7 +105,7 @@ public class BaseWebCtl extends BaseCtl {
|
|
vo.setSzdzw(null != jyr.getSzd() ? jyr.getSzd().getText() : "");
|
|
vo.setSzdzw(null != jyr.getSzd() ? jyr.getSzd().getText() : "");
|
|
vo.setSzgkzw(null != jyr.getSzgk() ? jyr.getSzgk().getGkmc() : "");
|
|
vo.setSzgkzw(null != jyr.getSzgk() ? jyr.getSzgk().getGkmc() : "");
|
|
vo.setSzgqzw(null != jyr.getSzgq() ? jyr.getSzgq().getGqmc() : "");
|
|
vo.setSzgqzw(null != jyr.getSzgq() ? jyr.getSzgq().getGqmc() : "");
|
|
-
|
|
|
|
|
|
+
|
|
vo.setSzd(null != jyr.getSzd() ? jyr.getSzd().getId() : "");
|
|
vo.setSzd(null != jyr.getSzd() ? jyr.getSzd().getId() : "");
|
|
vo.setSzgk(null != jyr.getSzgk() ? jyr.getSzgk().getId() : "");
|
|
vo.setSzgk(null != jyr.getSzgk() ? jyr.getSzgk().getId() : "");
|
|
vo.setSzgq(null != jyr.getSzgq() ? jyr.getSzgq().getId() : "");
|
|
vo.setSzgq(null != jyr.getSzgq() ? jyr.getSzgq().getId() : "");
|
|
@@ -180,22 +187,22 @@ public class BaseWebCtl extends BaseCtl {
|
|
return pageable;
|
|
return pageable;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean isGET(HttpServletRequest request){
|
|
|
|
- if(null!=request&&null!=request.getMethod()){
|
|
|
|
|
|
+ public boolean isGET(HttpServletRequest request) {
|
|
|
|
+ if (null != request && null != request.getMethod()) {
|
|
return "GET".equalsIgnoreCase(request.getMethod());
|
|
return "GET".equalsIgnoreCase(request.getMethod());
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
- public boolean isPOST(HttpServletRequest request){
|
|
|
|
- if(null!=request&&null!=request.getMethod()){
|
|
|
|
|
|
+
|
|
|
|
+ public boolean isPOST(HttpServletRequest request) {
|
|
|
|
+ if (null != request && null != request.getMethod()) {
|
|
return "POST".equalsIgnoreCase(request.getMethod());
|
|
return "POST".equalsIgnoreCase(request.getMethod());
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
public void putPageInfo(Model model, SimplePageRequest page, Page<?> list) {
|
|
public void putPageInfo(Model model, SimplePageRequest page, Page<?> list) {
|
|
model.addAttribute("page", page);
|
|
model.addAttribute("page", page);
|
|
model.addAttribute("pagesize", list.getContent().size());
|
|
model.addAttribute("pagesize", list.getContent().size());
|
|
@@ -293,10 +300,10 @@ public class BaseWebCtl extends BaseCtl {
|
|
|
|
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
-
|
|
|
|
- public static String destoSHA256Encrypt(String orignal){
|
|
|
|
- if(StringUtils.isNotBlank(orignal)){
|
|
|
|
- System.out.println("destoSHA256Encrypt==="+Des.decrypt(orignal));
|
|
|
|
|
|
+
|
|
|
|
+ public static String destoSHA256Encrypt(String orignal) {
|
|
|
|
+ if (StringUtils.isNotBlank(orignal)) {
|
|
|
|
+ System.out.println("destoSHA256Encrypt===" + Des.decrypt(orignal));
|
|
return SHA256Encrypt(Des.decrypt(orignal));
|
|
return SHA256Encrypt(Des.decrypt(orignal));
|
|
}
|
|
}
|
|
return orignal;
|
|
return orignal;
|
|
@@ -336,12 +343,61 @@ public class BaseWebCtl extends BaseCtl {
|
|
/**
|
|
/**
|
|
* 只有盐城,盐城内河,镇江三个地市需要用webservice同步
|
|
* 只有盐城,盐城内河,镇江三个地市需要用webservice同步
|
|
*/
|
|
*/
|
|
- public boolean needWS(){
|
|
|
|
- String needSzd="90019,90027,90011";
|
|
|
|
- if(needSzd.contains(GlobalData.CITY_CODE)){
|
|
|
|
|
|
+ public boolean needWS() {
|
|
|
|
+ String needSzd = "90019,90027,90011,90012";
|
|
|
|
+ if (needSzd.contains(GlobalData.CITY_CODE)) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ // rtx提醒
|
|
|
|
+ public void rtxSend(String gqid, String role, String msg) {
|
|
|
|
+ if (!StringUtils.isEmpty(gqid)) {
|
|
|
|
+ GqEntity gq = gqService.findOne(gqid);
|
|
|
|
+ RoleEntity roleEntity = securityMgr.roleService().findById(role);
|
|
|
|
+ List<UserEntity> ulist = securityMgr.userService().findByRole(roleEntity.getId());
|
|
|
|
+ if (ulist != null && ulist.size() > 0) {
|
|
|
|
+ for (UserEntity u : ulist) {
|
|
|
|
+ if (u.getSsglbm().getId() == gq.getSsgkglbm().getId()) {
|
|
|
|
+ inserttx(u.getId(), msg);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 更改当前处理人的限时提醒状态
|
|
|
|
+ */
|
|
|
|
+ // 参数顺序 限时天数,系统用户id,步骤,rtx提醒内荣,办理提醒内同,业务key,模块(PC)
|
|
|
|
+ public void inserttx(String userid, String msg) {
|
|
|
|
+ // 发送rtx提醒
|
|
|
|
+ try {
|
|
|
|
+ UserEntity u = (UserEntity) securityMgr.userService().findById(userid);
|
|
|
|
+ if (u != null) {
|
|
|
|
+ try {
|
|
|
|
+ String type = "0";
|
|
|
|
+ String delayTime = "0";
|
|
|
|
+ int iRet = -1;
|
|
|
|
+ RTXSvrApi RtxsvrapiObj = new RTXSvrApi();
|
|
|
|
+ if (RtxsvrapiObj.Init()) {
|
|
|
|
+ iRet = RtxsvrapiObj.sendNotify(u.getUname(), "", msg, type, delayTime);
|
|
|
|
+ if (iRet == 0) {
|
|
|
|
+ System.out.println("发送成功");
|
|
|
|
+ } else {
|
|
|
|
+ System.out.println("发送失败");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ RtxsvrapiObj.UnInit();
|
|
|
|
+ } catch (Throwable e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ } catch (Throwable e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|