|
@@ -157,7 +157,7 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
@RequestMapping(value = "/main")
|
|
@RequestMapping(value = "/main")
|
|
@RequiresPermissions("jyrjbxx:main")
|
|
@RequiresPermissions("jyrjbxx:main")
|
|
public String main(SimplePageRequest page, Model model, final String xkzywlx, final String bwyt, final String whfzbh, final String qyxz, final String sfcswhzy, final String sfcyxkz, final HttpServletRequest request, final String gkjyr, final String szdid, final String szgkid, final String szgqid, final String gkjyxkzh, final String fddbr, final String menuid, final Date xkzstartDate, final Date xkzendDate, final Date fzstartDate, final Date fzendDate, final String jyrxkzsfdq) throws JsonProcessingException {
|
|
public String main(SimplePageRequest page, Model model, final String xkzywlx, final String bwyt, final String whfzbh, final String qyxz, final String sfcswhzy, final String sfcyxkz, final HttpServletRequest request, final String gkjyr, final String szdid, final String szgkid, final String szgqid, final String gkjyxkzh, final String fddbr, final String menuid, final Date xkzstartDate, final Date xkzendDate, final Date fzstartDate, final Date fzendDate, final String jyrxkzsfdq) throws JsonProcessingException {
|
|
- final Map<String, Object> cacheSCmap = CacheSearchCondition.cacheSCmap(request,"jyrjbxx");
|
|
|
|
|
|
+ final Map<String, Object> cacheSCmap = CacheSearchCondition.cacheSCmap(request, "jyrjbxx");
|
|
final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
// 查询条件
|
|
// 查询条件
|
|
Specification<GkjyrEntity> spec = new Specification<GkjyrEntity>() {
|
|
Specification<GkjyrEntity> spec = new Specification<GkjyrEntity>() {
|
|
@@ -235,7 +235,7 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
} else if (isGET(request)) {
|
|
} else if (isGET(request)) {
|
|
|
|
|
|
String sfcyxkzval = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "sfcyxkz");
|
|
String sfcyxkzval = (String) CacheSearchCondition.cacheSCmapVal(cacheSCmap, "sfcyxkz");
|
|
- if (!"all".equals(sfcyxkzval)&&StringUtils.isNotEmpty(sfcyxkzval)) {
|
|
|
|
|
|
+ if (!"all".equals(sfcyxkzval) && StringUtils.isNotEmpty(sfcyxkzval)) {
|
|
if (!"201".equals(sfcyxkzval)) {
|
|
if (!"201".equals(sfcyxkzval)) {
|
|
list.add(cb.isNull(root.get("gkjyxkzh").as(String.class)));
|
|
list.add(cb.isNull(root.get("gkjyxkzh").as(String.class)));
|
|
} else {
|
|
} else {
|
|
@@ -420,31 +420,22 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
return cb.and(list.toArray(new Predicate[] {}));
|
|
return cb.and(list.toArray(new Predicate[] {}));
|
|
}
|
|
}
|
|
};
|
|
};
|
|
-/* String user1 = (String) Utils.getSession().getAttribute("user");
|
|
|
|
- String user2 = SecUtils.getCurrUser().getId();
|
|
|
|
- if (user2 != null) {
|
|
|
|
- if (!user2.equals(user1)) {
|
|
|
|
- SearchCondition.jyrpage = 1;
|
|
|
|
- SearchCondition.gkjyr = "";
|
|
|
|
- SearchCondition.fddbr = "";
|
|
|
|
- SearchCondition.gkjyxkzh = "";
|
|
|
|
- SearchCondition.szdid = "";
|
|
|
|
- SearchCondition.szgkid = "";
|
|
|
|
- SearchCondition.szgqid = "";
|
|
|
|
- SearchCondition.whfzbh = "";
|
|
|
|
- SearchCondition.sfcswhzy = "";
|
|
|
|
- SearchCondition.sfcyxkz = "";
|
|
|
|
- SearchCondition.bwyt = "";
|
|
|
|
- SearchCondition.qyxz = "";
|
|
|
|
- SearchCondition.xkzstartDate = null;
|
|
|
|
- SearchCondition.xkzendDate = null;
|
|
|
|
- SearchCondition.fzstartDate = null;
|
|
|
|
- SearchCondition.fzendDate = null;
|
|
|
|
- SearchCondition.jyrxkzsfdq = "";
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- Utils.getSession().setAttribute("user", user2);*/
|
|
|
|
|
|
+ /*
|
|
|
|
+ * String user1 = (String) Utils.getSession().getAttribute("user");
|
|
|
|
+ * String user2 = SecUtils.getCurrUser().getId(); if (user2 != null) {
|
|
|
|
+ * if (!user2.equals(user1)) { SearchCondition.jyrpage = 1;
|
|
|
|
+ * SearchCondition.gkjyr = ""; SearchCondition.fddbr = "";
|
|
|
|
+ * SearchCondition.gkjyxkzh = ""; SearchCondition.szdid = "";
|
|
|
|
+ * SearchCondition.szgkid = ""; SearchCondition.szgqid = "";
|
|
|
|
+ * SearchCondition.whfzbh = ""; SearchCondition.sfcswhzy = "";
|
|
|
|
+ * SearchCondition.sfcyxkz = ""; SearchCondition.bwyt = "";
|
|
|
|
+ * SearchCondition.qyxz = ""; SearchCondition.xkzstartDate = null;
|
|
|
|
+ * SearchCondition.xkzendDate = null; SearchCondition.fzstartDate =
|
|
|
|
+ * null; SearchCondition.fzendDate = null; SearchCondition.jyrxkzsfdq =
|
|
|
|
+ * ""; }
|
|
|
|
+ *
|
|
|
|
+ * } Utils.getSession().setAttribute("user", user2);
|
|
|
|
+ */
|
|
|
|
|
|
if (page.getPage() < 1) {
|
|
if (page.getPage() < 1) {
|
|
Object jyrpage = CacheSearchCondition.cacheSCmapVal(cacheSCmap, "jyrpage");
|
|
Object jyrpage = CacheSearchCondition.cacheSCmapVal(cacheSCmap, "jyrpage");
|
|
@@ -465,11 +456,19 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
vo.setSzgkzw(null != entity.getSzgk() ? entity.getSzgk().getGkmc() : "");
|
|
vo.setSzgkzw(null != entity.getSzgk() ? entity.getSzgk().getGkmc() : "");
|
|
vo.setSzgqzw(null != entity.getSzgq() ? entity.getSzgq().getGqmc() : "");
|
|
vo.setSzgqzw(null != entity.getSzgq() ? entity.getSzgq().getGqmc() : "");
|
|
vo.setQyxzzw(null != entity.getQyxz() ? entity.getQyxz().getText() : "");
|
|
vo.setQyxzzw(null != entity.getQyxz() ? entity.getQyxz().getText() : "");
|
|
|
|
+ vo.setSfwhqy(null != entity.getSfwhqy() ? entity.getSfwhqy().getText() : "");
|
|
List<XkzxxEntity> xkzs = xkzxxService.findByJyrid(entity.getId());
|
|
List<XkzxxEntity> xkzs = xkzxxService.findByJyrid(entity.getId());
|
|
for (XkzxxEntity xkz : xkzs) {
|
|
for (XkzxxEntity xkz : xkzs) {
|
|
if (BaseEntity.RECORD_STATE_VALID == xkz.getRecordStatus() && Constants.XKZ_SX.equals(xkz.getSfyx())) {
|
|
if (BaseEntity.RECORD_STATE_VALID == xkz.getRecordStatus() && Constants.XKZ_SX.equals(xkz.getSfyx())) {
|
|
vo.setXkzyxq(xkz.getYxqz());
|
|
vo.setXkzyxq(xkz.getYxqz());
|
|
vo.setXkzyxqfmt(DateTime.toString(xkz.getYxqz()));
|
|
vo.setXkzyxqfmt(DateTime.toString(xkz.getYxqz()));
|
|
|
|
+ Date date = new Date();
|
|
|
|
+ long day = (xkz.getYxqz().getTime() - date.getTime()) / (24 * 60 * 60 * 1000);
|
|
|
|
+ if (day <= 30) {
|
|
|
|
+ vo.setSfred("1");
|
|
|
|
+ } else {
|
|
|
|
+ vo.setSfred("2");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -654,7 +653,7 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
try {
|
|
try {
|
|
if (!StringUtils.isEmpty(gkjyrEntity.getId())) {// 修改保存
|
|
if (!StringUtils.isEmpty(gkjyrEntity.getId())) {// 修改保存
|
|
GkjyrEntity yjyr = gkjyrService.findOne(gkjyrEntity.getId());
|
|
GkjyrEntity yjyr = gkjyrService.findOne(gkjyrEntity.getId());
|
|
- //BeanUtils.copyProperties(yjyr, gkjyrEntity);
|
|
|
|
|
|
+ // BeanUtils.copyProperties(yjyr, gkjyrEntity);
|
|
gkjyrEntity.setCreateDateTime(yjyr.getCreateDateTime());
|
|
gkjyrEntity.setCreateDateTime(yjyr.getCreateDateTime());
|
|
gkjyrEntity.setCreateUser(yjyr.getCreateUser());
|
|
gkjyrEntity.setCreateUser(yjyr.getCreateUser());
|
|
gkjyrEntity.setAqid(yjyr.getAqid());
|
|
gkjyrEntity.setAqid(yjyr.getAqid());
|
|
@@ -674,7 +673,7 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
if (StringUtils.isNotEmpty(qyxzid)) {
|
|
if (StringUtils.isNotEmpty(qyxzid)) {
|
|
CodeEntity qyxz = new CodeEntity(qyxzid);
|
|
CodeEntity qyxz = new CodeEntity(qyxzid);
|
|
gkjyrEntity.setQyxz(qyxz);
|
|
gkjyrEntity.setQyxz(qyxz);
|
|
-
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
gkjyrEntity.setQyxz(yjyr.getQyxz());
|
|
gkjyrEntity.setQyxz(yjyr.getQyxz());
|
|
}
|
|
}
|
|
@@ -889,12 +888,12 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
gkjyrVo.setMtjgxszw(null != gkjyr.getMtjgxs() ? gkjyr.getMtjgxs().getText() : "");
|
|
gkjyrVo.setMtjgxszw(null != gkjyr.getMtjgxs() ? gkjyr.getMtjgxs().getText() : "");
|
|
gkjyrVo.setQyxz(null != gkjyr.getQyxz() ? gkjyr.getQyxz().getId() : "");
|
|
gkjyrVo.setQyxz(null != gkjyr.getQyxz() ? gkjyr.getQyxz().getId() : "");
|
|
|
|
|
|
- if(StringUtils.isEmpty(gkjyrVo.getZyid())){
|
|
|
|
|
|
+ if (StringUtils.isEmpty(gkjyrVo.getZyid())) {
|
|
SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
String zyid = dateTimeFormat.format(new Date());
|
|
String zyid = dateTimeFormat.format(new Date());
|
|
gkjyrVo.setZyid(zyid);
|
|
gkjyrVo.setZyid(zyid);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
model.addAttribute("gkjyr", gkjyrVo);
|
|
model.addAttribute("gkjyr", gkjyrVo);
|
|
List<CodeEntity> codelist = securityMgr.codeService().findValidCodesByGroupCode(Constants.GROUP_CODE_SF);
|
|
List<CodeEntity> codelist = securityMgr.codeService().findValidCodesByGroupCode(Constants.GROUP_CODE_SF);
|
|
model.addAttribute("codedata", JSONArray.fromObject(codelist).toString());
|
|
model.addAttribute("codedata", JSONArray.fromObject(codelist).toString());
|
|
@@ -1082,9 +1081,9 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
vo.setSzgk(entity.getSzgk() != null ? entity.getSzgk().getId() : "");
|
|
vo.setSzgk(entity.getSzgk() != null ? entity.getSzgk().getId() : "");
|
|
vo.setSzgq(entity.getSzgq() != null ? entity.getSzgq().getId() : "");
|
|
vo.setSzgq(entity.getSzgq() != null ? entity.getSzgq().getId() : "");
|
|
vo.setSsjyr(entity.getSsjyr() != null ? entity.getSsjyr().getId() : "");
|
|
vo.setSsjyr(entity.getSsjyr() != null ? entity.getSsjyr().getId() : "");
|
|
-
|
|
|
|
- vo.setFzsqh(entity.getFzsqh()!=null ? entity.getFzsqh():"");
|
|
|
|
- vo.setWxhwpm(entity.getWxhwpm()!=null?entity.getWxhwpm():"");
|
|
|
|
|
|
+
|
|
|
|
+ vo.setFzsqh(entity.getFzsqh() != null ? entity.getFzsqh() : "");
|
|
|
|
+ vo.setWxhwpm(entity.getWxhwpm() != null ? entity.getWxhwpm() : "");
|
|
voList5.add(vo);
|
|
voList5.add(vo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1371,13 +1370,12 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
vo.setWxydjzw(entity.getWxydj() != null ? entity.getWxydj().getText() : "");
|
|
vo.setWxydjzw(entity.getWxydj() != null ? entity.getWxydj().getText() : "");
|
|
vo.setYwfhdzw(entity.getYwfhd() != null ? entity.getYwfhd().getText() : "");
|
|
vo.setYwfhdzw(entity.getYwfhd() != null ? entity.getYwfhd().getText() : "");
|
|
vo.setXkzid(entity.getXkzid() != null ? entity.getXkzid() : "");
|
|
vo.setXkzid(entity.getXkzid() != null ? entity.getXkzid() : "");
|
|
-
|
|
|
|
- vo.setCgmc(entity.getCgmc()!=null ? entity.getCgmc() : "");
|
|
|
|
- vo.setHxpmc(entity.getHxpmc()!=null? entity.getHxpmc():"");
|
|
|
|
- vo.setCgqmj(entity.getCgqmj()!=null ?entity.getCgqmj() :0);
|
|
|
|
- vo.setAqgd(entity.getAqgd()!=null ? entity.getAqgd():0);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ vo.setCgmc(entity.getCgmc() != null ? entity.getCgmc() : "");
|
|
|
|
+ vo.setHxpmc(entity.getHxpmc() != null ? entity.getHxpmc() : "");
|
|
|
|
+ vo.setCgqmj(entity.getCgqmj() != null ? entity.getCgqmj() : 0);
|
|
|
|
+ vo.setAqgd(entity.getAqgd() != null ? entity.getAqgd() : 0);
|
|
|
|
+
|
|
XkzglbEntity xkzglb = xkzglbService.findByCzidAndYwid(czid, entity.getId());
|
|
XkzglbEntity xkzglb = xkzglbService.findByCzidAndYwid(czid, entity.getId());
|
|
if (xkzglb != null) {
|
|
if (xkzglb != null) {
|
|
vo.setIsTrue(true);
|
|
vo.setIsTrue(true);
|
|
@@ -1483,15 +1481,15 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
BeanUtils.copyProperties(entity, vo);
|
|
BeanUtils.copyProperties(entity, vo);
|
|
vo.setSzdzw(entity.getSzd() != null ? entity.getSzd().getText() : "");
|
|
vo.setSzdzw(entity.getSzd() != null ? entity.getSzd().getText() : "");
|
|
vo.setSzgkzw(entity.getSzgk() != null ? entity.getSzgk().getGkmc() : "");
|
|
vo.setSzgkzw(entity.getSzgk() != null ? entity.getSzgk().getGkmc() : "");
|
|
- vo.setSzgqzw(entity.getSzgq() != null ? entity.getSzgq().getGqmc(): "");
|
|
|
|
|
|
+ vo.setSzgqzw(entity.getSzgq() != null ? entity.getSzgq().getGqmc() : "");
|
|
vo.setSsjyrzw(entity.getSsjyr() != null ? entity.getSsjyr().getGkjyr() : "");
|
|
vo.setSsjyrzw(entity.getSsjyr() != null ? entity.getSsjyr().getGkjyr() : "");
|
|
vo.setSsmtzw(entity.getSsmt() != null ? entity.getSsmt().getMtmc() : "");
|
|
vo.setSsmtzw(entity.getSsmt() != null ? entity.getSsmt().getMtmc() : "");
|
|
vo.setWxpdczw(entity.getWxpdc() != null ? entity.getWxpdc().getText() : "");
|
|
vo.setWxpdczw(entity.getWxpdc() != null ? entity.getWxpdc().getText() : "");
|
|
vo.setXkzid(entity.getXkzid() != null ? entity.getXkzid() : "");
|
|
vo.setXkzid(entity.getXkzid() != null ? entity.getXkzid() : "");
|
|
-
|
|
|
|
- vo.setZwdcyt(entity.getZwdcyt()!=null ? entity.getZwdcyt():"");
|
|
|
|
- vo.setDczmj(entity.getDczmj()!=null ? entity.getDczmj():0);
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ vo.setZwdcyt(entity.getZwdcyt() != null ? entity.getZwdcyt() : "");
|
|
|
|
+ vo.setDczmj(entity.getDczmj() != null ? entity.getDczmj() : 0);
|
|
|
|
+
|
|
XkzglbEntity xkzglb = xkzglbService.findByCzidAndYwid(czid, entity.getId());
|
|
XkzglbEntity xkzglb = xkzglbService.findByCzidAndYwid(czid, entity.getId());
|
|
if (xkzglb != null) {
|
|
if (xkzglb != null) {
|
|
vo.setIsTrue(true);
|
|
vo.setIsTrue(true);
|
|
@@ -1944,9 +1942,9 @@ public class GkjyrCtl extends BaseWebCtl {
|
|
vo.setSzgqzw(entity.getSzgq() != null ? entity.getSzgq().getGqmc() : "");
|
|
vo.setSzgqzw(entity.getSzgq() != null ? entity.getSzgq().getGqmc() : "");
|
|
vo.setSsjyrzw(entity.getSsjyr() != null ? entity.getSsjyr().getGkjyr() : "");
|
|
vo.setSsjyrzw(entity.getSsjyr() != null ? entity.getSsjyr().getGkjyr() : "");
|
|
vo.setXkzid(entity.getXkzid() != null ? entity.getXkzid() : "");
|
|
vo.setXkzid(entity.getXkzid() != null ? entity.getXkzid() : "");
|
|
-
|
|
|
|
- vo.setXhhgg(entity.getXhhgg()!=null ? entity.getXhhgg():"");
|
|
|
|
- vo.setJxsl(entity.getJxsl()!=null ? entity.getJxsl():0);
|
|
|
|
|
|
+
|
|
|
|
+ vo.setXhhgg(entity.getXhhgg() != null ? entity.getXhhgg() : "");
|
|
|
|
+ vo.setJxsl(entity.getJxsl() != null ? entity.getJxsl() : 0);
|
|
XkzglbEntity xkzglb = xkzglbService.findByCzidAndYwid(czid, entity.getId());
|
|
XkzglbEntity xkzglb = xkzglbService.findByCzidAndYwid(czid, entity.getId());
|
|
if (xkzglb != null) {
|
|
if (xkzglb != null) {
|
|
vo.setIsTrue(true);
|
|
vo.setIsTrue(true);
|