|
@@ -4,6 +4,7 @@ import java.io.File;
|
|
|
import java.sql.Timestamp;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
@@ -154,18 +155,22 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
/**
|
|
|
* 一览
|
|
|
*
|
|
|
- * @param page 分页
|
|
|
+ * @param page
|
|
|
+ * 分页
|
|
|
* @param model
|
|
|
- * @param gkjyr 经营人
|
|
|
- * @param fddbr 法定代表人
|
|
|
- * @param bgdd 办公地址
|
|
|
- * @param menuid
|
|
|
+ * @param gkjyr
|
|
|
+ * 经营人
|
|
|
+ * @param fddbr
|
|
|
+ * 法定代表人
|
|
|
+ * @param bgdd
|
|
|
+ * 办公地址
|
|
|
+ * @param menuid
|
|
|
* @return
|
|
|
* @throws JsonProcessingException
|
|
|
*/
|
|
|
@RequestMapping(value = "/main")
|
|
|
@RequiresPermissions("gkjyxkyx:main")
|
|
|
- public String main(SimplePageRequest page,final HttpServletRequest request, Model model, final String szdid, final String szgkid, final String szgqid, final String gkjyr, final String fddbr, final String bgdd, String menuid) throws JsonProcessingException {
|
|
|
+ public String main(SimplePageRequest page, final HttpServletRequest request, Model model, final String szdid, final String szgkid, final String szgqid, final String gkjyr, final String fddbr, final String bgdd, String menuid) throws JsonProcessingException {
|
|
|
|
|
|
UserEntity user = securityMgr.getCurrUser();
|
|
|
GkjyrEntity jyr = new GkjyrEntity();
|
|
@@ -246,8 +251,8 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
return cb.and(list.toArray(new Predicate[] {}));
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
- if(page.getPage()<1){
|
|
|
+
|
|
|
+ if (page.getPage() < 1) {
|
|
|
page.setPage(SearchCondition.xkzyxpage);
|
|
|
}
|
|
|
Page<XkzyxEntity> list = query.findAll(spec, toPageRequest(page), XkzyxEntity.class);
|
|
@@ -276,7 +281,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- if(!isJyr()){
|
|
|
+ if (!isJyr()) {
|
|
|
XkzxxEntity xkz = xkzxxService.findByOpid(entity.getId(), "13");
|
|
|
if (xkz != null) {
|
|
|
vo.setOpflag("1");
|
|
@@ -293,9 +298,9 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
SearchCondition.xkzyxpage = page.getPage();
|
|
|
CacheSearchCondition.putCacheSCmap(request.getParameterMap(), cacheSCmap);
|
|
|
}
|
|
|
- model.addAttribute("gkjyr", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "gkjyr"));
|
|
|
- model.addAttribute("fddbr", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fddbr"));
|
|
|
- model.addAttribute("bgdd", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "bgdd"));
|
|
|
+ model.addAttribute("gkjyr", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "gkjyr"));
|
|
|
+ model.addAttribute("fddbr", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "fddbr"));
|
|
|
+ model.addAttribute("bgdd", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "bgdd"));
|
|
|
model.addAttribute("szgqid", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "szgqid"));
|
|
|
model.addAttribute("szdid", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "szdid"));
|
|
|
model.addAttribute("szgkid", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "szgkid"));
|
|
@@ -421,7 +426,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
gkjyrVo.setParentJyrIdzw(p.getGkjyr());
|
|
|
}
|
|
|
}
|
|
|
- //许可证信息
|
|
|
+ // 许可证信息
|
|
|
List<XkzxxEntity> xkzs = xkzxxService.findByJyrid(gkjyr.getId());
|
|
|
for (XkzxxEntity xkz : xkzs) {
|
|
|
if (BaseEntity.RECORD_STATE_VALID == xkz.getRecordStatus() && Constants.XKZ_SX.equals(xkz.getSfyx())) {
|
|
@@ -442,7 +447,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
gkjyrVo.setXzqh(null != gkjyr.getXzqh() ? gkjyr.getXzqh().getId() : "");
|
|
|
gkjyrVo.setFzrqstr(transFormatDate(gkjyr.getFzrq()));
|
|
|
model.addAttribute("gkjyr", gkjyrVo);
|
|
|
- //经营许可种类范围
|
|
|
+ // 经营许可种类范围
|
|
|
List<XkzjyfwEntity> jyfwlist = xkzjyfwService.findByJyrid(gkjyr.getId());
|
|
|
if (jyfwlist != null && jyfwlist.size() > 0) {
|
|
|
List<String> jyfwids = new ArrayList<String>();
|
|
@@ -492,7 +497,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
}
|
|
|
model.addAttribute("jyfwstr", jyfwstr);
|
|
|
model.addAttribute("jydystr", jydystr);
|
|
|
- //经营范围种类附件信息
|
|
|
+ // 经营范围种类附件信息
|
|
|
List<Integer> list = fjlist(jyfwids);
|
|
|
if (list.size() > 0 && list != null) {
|
|
|
List<XkzsqzscsEntity> fjList = new ArrayList<XkzsqzscsEntity>();
|
|
@@ -531,6 +536,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
|
|
|
/**
|
|
|
* 经营范围种类附件信息
|
|
|
+ *
|
|
|
* @param jyrid
|
|
|
* @return
|
|
|
*/
|
|
@@ -673,7 +679,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
}
|
|
|
model.addAttribute("opflag", opflag);
|
|
|
}
|
|
|
- //经营范围种类信息
|
|
|
+ // 经营范围种类信息
|
|
|
List<XkzjyfwEntity> jyfwlist = xkzjyfwService.findByJyrid(xkzyxentity.getJyrid());
|
|
|
List<String> jyfwids = new ArrayList<String>();
|
|
|
String jyfwstr = "";
|
|
@@ -772,7 +778,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
}
|
|
|
model.addAttribute("jyfwstr", jyfwstr);
|
|
|
model.addAttribute("jydystr", jydystr);
|
|
|
- //经营范围种类附件信息
|
|
|
+ // 经营范围种类附件信息
|
|
|
List<Integer> list = fjlist(jyfwids);
|
|
|
if (list.size() > 0 && list != null) {
|
|
|
List<XkzsqzscsEntity> fjList = new ArrayList<XkzsqzscsEntity>();
|
|
@@ -930,7 +936,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
gkjyrVo.setParentJyrIdzw(p.getGkjyr());
|
|
|
}
|
|
|
}
|
|
|
- //许可证信息
|
|
|
+ // 许可证信息
|
|
|
List<XkzxxEntity> xkzs = xkzxxService.findByJyrid(gkjyr.getId());
|
|
|
for (XkzxxEntity xkz : xkzs) {
|
|
|
if (BaseEntity.RECORD_STATE_VALID == xkz.getRecordStatus() && Constants.XKZ_SX.equals(xkz.getSfyx())) {
|
|
@@ -973,7 +979,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
qtfjvoList.add(vo);
|
|
|
}
|
|
|
model.addAttribute("qtfj", qtfjvoList);
|
|
|
- //经营范围种类信息
|
|
|
+ // 经营范围种类信息
|
|
|
List<XkzjyfwEntity> jyfwlist = xkzjyfwService.findByJyrid(xkzyxentity.getJyrid());
|
|
|
List<String> jyfwids = new ArrayList<String>();
|
|
|
String jyfwstr = "";
|
|
@@ -1523,7 +1529,8 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
}
|
|
|
}
|
|
|
// rtx提醒
|
|
|
- //rtxSend(xkzyxEntity.getSzgq().getId(), Constants.ROLE_CLSC, "你有一条许可证延续待办事务,请及时处理!");
|
|
|
+ // rtxSend(xkzyxEntity.getSzgq().getId(), Constants.ROLE_CLSC,
|
|
|
+ // "你有一条许可证延续待办事务,请及时处理!");
|
|
|
} catch (Exception e) {
|
|
|
wr.setSuccess(false);
|
|
|
wr.setMessage("操作失败!");
|
|
@@ -1569,9 +1576,10 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
if (xkzyxService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), code.getId()) != null) {
|
|
|
xkzyxService.claim(code.getId(), SecUtils.getCurrUser().getId().toString());
|
|
|
}
|
|
|
- xkzyxService.changeAudit(null, xkzyxEntity, true);
|
|
|
+ xkzyxService.changeAudit(null, xkzyxEntity, true);
|
|
|
// rtx提醒
|
|
|
- //rtxSend(xkzyxEntity.getSzgq().getId(), Constants.ROLE_CLSC, "你有一条许可证延续待办事务,请及时处理!");
|
|
|
+ // rtxSend(xkzyxEntity.getSzgq().getId(), Constants.ROLE_CLSC,
|
|
|
+ // "你有一条许可证延续待办事务,请及时处理!");
|
|
|
} catch (Exception e) {
|
|
|
wr.setSuccess(false);
|
|
|
wr.setMessage("操作失败!");
|
|
@@ -1818,9 +1826,13 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
|
|
|
/**
|
|
|
* 审核流程(同意 ,不同意)
|
|
|
- * @param shyj 审核意见
|
|
|
- * @param id 主键ID
|
|
|
- * @param flag 同意true 不同意False
|
|
|
+ *
|
|
|
+ * @param shyj
|
|
|
+ * 审核意见
|
|
|
+ * @param id
|
|
|
+ * 主键ID
|
|
|
+ * @param flag
|
|
|
+ * 同意true 不同意False
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/audit")
|
|
@@ -1829,7 +1841,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
WebJsonResult wr = success();
|
|
|
UserEntity user = securityMgr.getCurrUser();
|
|
|
XkzyxEntity entity = null;
|
|
|
- String role ="";
|
|
|
+ String role = "";
|
|
|
try {
|
|
|
entity = xkzyxService.findOne(id);
|
|
|
Date today = new Date();
|
|
@@ -1840,17 +1852,17 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
entity.setClscyj(StringUtils.isEmpty(shyj) ? "" : shyj);
|
|
|
entity.setClscjbr(user.getName());
|
|
|
entity.setClscrq(today);
|
|
|
- role =Constants.ROLE_HC;
|
|
|
+ role = Constants.ROLE_HC;
|
|
|
} else if ("核查".equals(taskinfo.getCurrName())) {
|
|
|
entity.setHcyj(StringUtils.isEmpty(shyj) ? "" : shyj);
|
|
|
entity.setHcjbr(user.getName());
|
|
|
entity.setHcjbrq(today);
|
|
|
- role =Constants.ROLE_FH;
|
|
|
+ role = Constants.ROLE_FH;
|
|
|
} else if ("复核".equals(taskinfo.getCurrName())) {
|
|
|
entity.setFhyj(StringUtils.isEmpty(shyj) ? "" : shyj);
|
|
|
entity.setFhjbr(user.getName());
|
|
|
entity.setFhrq(today);
|
|
|
- role =Constants.ROLE_SP;
|
|
|
+ role = Constants.ROLE_SP;
|
|
|
} else if ("审批".equals(taskinfo.getCurrName())) {
|
|
|
entity.setSpyj(StringUtils.isEmpty(shyj) ? "" : shyj);
|
|
|
entity.setSpjbr(user.getName());
|
|
@@ -1897,10 +1909,11 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
xkzxx.setZyhwpm(xkz.getZyhwpm());
|
|
|
xkzxx.setZyqyfw(xkz.getZyqyfw());
|
|
|
xkzxx.setSzgk(xkz.getSzgk());
|
|
|
- //xkzxx.setZmpicid(xkz.getZmpicid());
|
|
|
- if (xkz.getYxqz() != null) {
|
|
|
+ // xkzxx.setZmpicid(xkz.getZmpicid());
|
|
|
+ if (xkz.getYxqq() != null) {
|
|
|
SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- String date = dateTimeFormat.format(xkz.getYxqz());
|
|
|
+ String date = dateTimeFormat.format(getLastDate(xkz.getYxqq()));
|
|
|
+ xkzxx.setYxqq(dateTimeFormat.parse(date));
|
|
|
String t = (Integer.parseInt(date.substring(0, 4)) + 3) + date.substring(4);
|
|
|
xkzxx.setYxqz(dateTimeFormat.parse(t));
|
|
|
}
|
|
@@ -1939,9 +1952,10 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
// rtx提醒
|
|
|
- //rtxSend(entity.getSzgq().getId(), role, "你有一条许可证延续待办事务,请及时处理!");
|
|
|
+ // rtxSend(entity.getSzgq().getId(), role,
|
|
|
+ // "你有一条许可证延续待办事务,请及时处理!");
|
|
|
}
|
|
|
wr.setAttr("jflag", jflag);
|
|
|
} catch (Exception e) {
|
|
@@ -1951,7 +1965,15 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
}
|
|
|
return wr;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ // 后一天
|
|
|
+ public static Date getLastDate(Date date) {
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ cal.setTime(date);
|
|
|
+ cal.add(Calendar.DATE, 1);
|
|
|
+ return cal.getTime();
|
|
|
+ }
|
|
|
+
|
|
|
@RequestMapping(value = "/selectXzqh")
|
|
|
@ResponseBody
|
|
|
public List<CodeEntity> selectXzqh(Model model, String gk) {
|
|
@@ -1963,7 +1985,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
List<CodeEntity> list = securityMgr.codeService().findByPid(pid);
|
|
|
return list;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@RequestMapping(value = "/selectQyxz")
|
|
|
@ResponseBody
|
|
|
public List<CodeEntity> selectQyxz() {
|
|
@@ -1987,6 +2009,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
|
|
|
/**
|
|
|
* 决定书操作
|
|
|
+ *
|
|
|
* @param model
|
|
|
* @param yxid
|
|
|
* @return
|
|
@@ -2032,11 +2055,16 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
if (xkzlist.size() > 0) {
|
|
|
for (XkzxxEntity xkz : xkzlist) {
|
|
|
if (xkz != null) {
|
|
|
- jds.setYxrq(dateTimeFormat.format(xkz.getYxqz()));
|
|
|
+ SimpleDateFormat dataTime = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ String date = dataTime.format(getLastDate(xkz.getYxqq()));
|
|
|
+ //xkzxx.setYxqq(dateTimeFormat.parse(date));
|
|
|
+ String t = (Integer.parseInt(date.substring(0, 4)) + 3) + date.substring(4);
|
|
|
+ //xkzxx.setYxqz(dateTimeFormat.parse(t));
|
|
|
+ jds.setYxrq(t);
|
|
|
} else {
|
|
|
SimpleDateFormat dataTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
String date = dataTime.format(jyr.getFzrq());
|
|
|
- String t = (Integer.parseInt(date.substring(0, 4)) + 1) + date.substring(4);
|
|
|
+ String t = (Integer.parseInt(date.substring(0, 4)) + 3) + date.substring(4);
|
|
|
jds.setYxrq(t);
|
|
|
}
|
|
|
}
|
|
@@ -2070,7 +2098,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
@ResponseBody
|
|
|
public WebJsonResult saveQtFile(MultipartFile filename, Model model) {
|
|
|
WebJsonResult wr = success();
|
|
|
- if (filename != null && filename.getSize()>0) {
|
|
|
+ if (filename != null && filename.getSize() > 0) {
|
|
|
AccessoryEntity acc = accessoryService.saveFile(filename, "xkzyxqtfj");
|
|
|
wr.setAttr("acc", acc);
|
|
|
} else {
|
|
@@ -2082,6 +2110,7 @@ public class XkzyxCtl extends BaseWebCtl {
|
|
|
|
|
|
/**
|
|
|
* 删除附件
|
|
|
+ *
|
|
|
* @param id
|
|
|
* @param model
|
|
|
* @return
|