|
@@ -13,7 +13,6 @@ import javax.persistence.criteria.Predicate;
|
|
|
import javax.persistence.criteria.Root;
|
|
|
import javax.persistence.criteria.Subquery;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -22,7 +21,6 @@ import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.Model;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
@@ -34,6 +32,8 @@ import com.xt.jygl.accessory.service.AccessoryService;
|
|
|
import com.xt.jygl.common.BaseWebCtl;
|
|
|
import com.xt.jygl.common.Constants;
|
|
|
import com.xt.jygl.common.GlobalData;
|
|
|
+import com.xt.jygl.ftp.Ftp;
|
|
|
+import com.xt.jygl.ftp.FtpUtil;
|
|
|
import com.xt.jygl.gkjcxx.gk.entity.GkEntity;
|
|
|
import com.xt.jygl.gkjcxx.gk.service.GkService;
|
|
|
import com.xt.jygl.gkjcxx.gq.entity.GqEntity;
|
|
@@ -42,7 +42,8 @@ import com.xt.jygl.gkjsgl.jgsq.entity.JgsqfjEntity;
|
|
|
import com.xt.jygl.gkjsgl.jgsq.service.JgsqService;
|
|
|
import com.xt.jygl.gkjsgl.jgsq.service.JgsqfjService;
|
|
|
import com.xt.jygl.gkjsgl.jgsq.vo.JgsqVo;
|
|
|
-import com.xt.jygl.gkjsgl.jsjdcbsj.entity.JsjdcbsjEntity;
|
|
|
+import com.xt.jygl.gkjsgl.jgsq.vo.JgsqfjVo;
|
|
|
+import com.xt.jygl.gkjsgl.jsjdgl.vo.JsjdfjVo;
|
|
|
import com.xt.jygl.gkjsgl.tzjhgl.entity.TzjhglEntity;
|
|
|
import com.xt.jygl.gkjsgl.tzjhgl.service.TzjhglService;
|
|
|
import com.xt.jygl.gkjsgl.xmxxgl.vo.XmxxglVo;
|
|
@@ -192,10 +193,13 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
+
|
|
|
if ("1".equals(entity.getFlowstatus())) {
|
|
|
vo.setCurrentname("退回地市");
|
|
|
} else if ("2".equals(entity.getFlowstatus())) {
|
|
|
vo.setCurrentname("完成");
|
|
|
+ } else if ("3".equals(entity.getFlowstatus())) {
|
|
|
+ vo.setCurrentname("已同步");
|
|
|
}
|
|
|
}
|
|
|
} else if (entity.getRecordStatus() == BaseEntity.RECORD_STATE_COMPLETED) {
|
|
@@ -225,26 +229,13 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
} else {
|
|
|
vo.setShowjsjd("N");
|
|
|
}
|
|
|
- /*
|
|
|
- * List<TzjhglEntity> tzjh =
|
|
|
- * tzjhglService.findByXmid(entity.getId() != null ?
|
|
|
- * entity.getId() : ""); if (tzjh.size() != 0) { String
|
|
|
- * flagForYear = "1"; vo.setFlagForYear(flagForYear); }
|
|
|
- */
|
|
|
+
|
|
|
List<TaskInfoEntity> listtask = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(entity.getId().toString(), JgsqEntity.PROCESS_DEFINITION_KEY);
|
|
|
String flag = "";
|
|
|
if (listtask.size() != 0 || entity.getRecordStatus() == BaseEntity.RECORD_STATE_COMPLETED) {
|
|
|
flag = "1";
|
|
|
vo.setFlag(flag);
|
|
|
}
|
|
|
- /*
|
|
|
- * boolean judge = false; for (TzjhglEntity tz : tzjh) { if
|
|
|
- * (("是").equals(tz.getSfyzjbz().getText())) { judge = true; }
|
|
|
- *
|
|
|
- * } if (judge) { vo.setSfyzjbz("是"); } else {
|
|
|
- * vo.setSfyzjbz("否"); }
|
|
|
- */
|
|
|
-
|
|
|
voList.add(vo);
|
|
|
}
|
|
|
}
|
|
@@ -264,7 +255,11 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
model.addAttribute("xmhzjbid", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "xmhzjbid"));
|
|
|
model.addAttribute("sfyzjbz", CacheSearchCondition.cacheSCmapVal(cacheSCmap, "sfyzjbzid"));
|
|
|
model.addAttribute("menuid", menuid);
|
|
|
-
|
|
|
+ if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
+ model.addAttribute("ssFlag", "1");
|
|
|
+ } else {
|
|
|
+ model.addAttribute("ssFlag", "0");
|
|
|
+ }
|
|
|
// 翻页共通
|
|
|
putPageInfo(model, page, list);
|
|
|
return "gkjsgl/jgsq/jgsqmain";
|
|
@@ -288,7 +283,7 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
|
|
|
@RequestMapping(value = "/submit")
|
|
|
@ResponseBody
|
|
|
- public WebJsonResult submit(Model model, JgsqEntity code, String sylxid, String ssjyrid, String fjids, String accid, String xmlxid, String tzlxid, String xmhzjbid, String axspjbid, String szdid, String szgkid, String szgqid, String zyhbwflid) {
|
|
|
+ public WebJsonResult submit(Model model, JgsqEntity code, String userids, String sylxid, String ssjyrid, String fjids, String accid, String xmlxid, String tzlxid, String xmhzjbid, String axspjbid, String szdid, String szgkid, String szgqid, String zyhbwflid) {
|
|
|
WebJsonResult wr = success();
|
|
|
if (StringUtils.isEmpty(code.getXmmc())) {
|
|
|
wr.setSuccess(false);
|
|
@@ -398,7 +393,7 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
} else {
|
|
|
jgsq.setAxspjb(null);
|
|
|
}
|
|
|
- jgsqService.submit(jgsq);
|
|
|
+ jgsqService.submit(jgsq, userids);
|
|
|
} else {
|
|
|
if (!StringUtils.isEmpty(ssjyrid)) {
|
|
|
GkjyrEntity jyr = new GkjyrEntity();
|
|
@@ -446,11 +441,11 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
axspjbdx.setId(axspjbid);
|
|
|
code.setAxspjb(axspjbdx);
|
|
|
}
|
|
|
- jgsqService.submit(code);
|
|
|
+ jgsqService.submit(code, userids);
|
|
|
|
|
|
}
|
|
|
// rtx提醒
|
|
|
- rtxSend("", Constants.ROLE_LD, "你有一条建设进度竣工验收申请待办事务,请及时处理!");
|
|
|
+ rtxSend(userids, "", "你有一条建设进度竣工验收申请待办事务,请及时处理!");
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
wr.setSuccess(false);
|
|
@@ -462,7 +457,7 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
|
|
|
@RequestMapping(value = "/submitAudit")
|
|
|
@ResponseBody
|
|
|
- public WebJsonResult submitAudit(JgsqEntity code, String sylxid, String ssjyrid, String fjids, String accid, String xmlxid, String tzlxid, String xmhzjbid, String axspjbid, String szdid, String szgkid, String szgqid, String zyhbwflid) {
|
|
|
+ public WebJsonResult submitAudit(JgsqEntity code, String userids, String sylxid, String ssjyrid, String fjids, String accid, String xmlxid, String tzlxid, String xmhzjbid, String axspjbid, String szdid, String szgkid, String szgqid, String zyhbwflid) {
|
|
|
WebJsonResult wr = success();
|
|
|
JgsqEntity jgsq = new JgsqEntity();
|
|
|
try {
|
|
@@ -535,8 +530,6 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
}
|
|
|
jgsq = jgsqService.save(jgsq);
|
|
|
}
|
|
|
- // rtx提醒
|
|
|
- rtxSend("", Constants.ROLE_LD, "你有一条建设进度竣工验收申请待办事务,请及时处理!");
|
|
|
} catch (Exception e) {
|
|
|
wr.setSuccess(false);
|
|
|
wr.setMessage("操作失败!");
|
|
@@ -546,7 +539,10 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
if (jgsqService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), jgsq.getId()) != null) {
|
|
|
jgsqService.claim(jgsq.getId(), SecUtils.getCurrUser().getId().toString());
|
|
|
}
|
|
|
- jgsqService.changeAudit(null, jgsq, true, null);
|
|
|
+ jgsqService.changeAudit(null, jgsq, true, userids);
|
|
|
+ // rtx提醒
|
|
|
+ rtxSend(userids, "", "你有一条建设进度竣工验收申请待办事务,请及时处理!");
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
wr.setSuccess(false);
|
|
|
wr.setMessage("操作失败!");
|
|
@@ -731,10 +727,6 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
@RequiresPermissions("jgsq:edit")
|
|
|
public String edit(Model model, String id, String flag) {
|
|
|
model.addAttribute("flag", flag);
|
|
|
- // 附件
|
|
|
- List<AccessoryEntity> accessoryList = accessoryService.queryBySsidAndSstype(id, "1");
|
|
|
- model.addAttribute("fjList", accessoryList);
|
|
|
-
|
|
|
JgsqEntity entity = jgsqService.findOne(id);
|
|
|
XmxxglVo vo = new XmxxglVo();
|
|
|
BeanUtils.copyProperties(entity, vo);
|
|
@@ -754,8 +746,79 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
vo.setSzgk(entity.getSzgk() != null ? entity.getSzgk().getId() : "");
|
|
|
vo.setSzgq(entity.getSzgq() != null ? entity.getSzgq().getId() : "");
|
|
|
vo.setZyhbwfl(entity.getZyhbwfl() != null ? entity.getZyhbwfl().getId() : "");
|
|
|
+
|
|
|
+ // 附件
|
|
|
+ List<AccessoryEntity> accessoryList = accessoryService.queryBySsidAndSstype(id, "jsjd");
|
|
|
+ for (int i = 0; i < accessoryList.size(); i++) {
|
|
|
+ if (StringUtils.isNotEmpty(accessoryList.get(i).getRemark())) {
|
|
|
+ AccessoryEntity acc = accessoryList.get(i);
|
|
|
+ String s = accessoryList.get(i).getRemark().substring(0, 2);
|
|
|
+ String accid = accessoryList.get(i).getId();
|
|
|
+ JgsqfjVo fjnamevo = new JgsqfjVo();
|
|
|
+ fjnamevo.setXhbz(accessoryList.get(i).getRemark().substring(2, accessoryList.get(i).getRemark().length()));
|
|
|
+ fjnamevo.setFjid(accid);
|
|
|
+ fjnamevo.setFjmc(accessoryList.get(i).getName());
|
|
|
+ if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
+ try {
|
|
|
+ Ftp f = getftp();
|
|
|
+ // 本地目录
|
|
|
+ String localBaseDir = GlobalData.UPLOAD_FILE_PATH + acc.getFilepath();
|
|
|
+ File newfile = new File(localBaseDir);
|
|
|
+ // 如果文件夹不存在则创建
|
|
|
+ if (!newfile.exists() && !newfile.isDirectory()) {
|
|
|
+ newfile.mkdirs();
|
|
|
+ }
|
|
|
+ // 远程目录
|
|
|
+ String remoteBaseDir = acc.getFilepath();
|
|
|
+ // 下载ftp文件
|
|
|
+ boolean downflag = FtpUtil.startDown(f, localBaseDir, remoteBaseDir, acc.getFilename());
|
|
|
+ if (downflag) {
|
|
|
+ System.out.println("ok");
|
|
|
+ acc.setFjbz("1");
|
|
|
+ accessoryService.save(acc);
|
|
|
+ }
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ model.addAttribute("fjList" + s, fjnamevo);
|
|
|
+ model.addAttribute("xiazaibz", s);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 附件字段
|
|
|
+ List<JgsqfjEntity> fjlist = jgsqfjService.findBySsidandfjlx(id, "ptfj");
|
|
|
+ SimpleDateFormat dateFormater = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+
|
|
|
+ for (int i = 0; i < fjlist.size(); i++) {
|
|
|
+ // 从发布单位中获取标识位
|
|
|
+ if (StringUtils.isNotEmpty(fjlist.get(i).getFjbz())) {
|
|
|
+ String s = fjlist.get(i).getFjbz().substring(0, 2);
|
|
|
+ Date date = fjlist.get(i).getFbsj();
|
|
|
+
|
|
|
+ JgsqfjVo fjvo = new JgsqfjVo();
|
|
|
+ fjvo.setFjbz(fjlist.get(i).getFjbz().substring(2, fjlist.get(i).getFjbz().length()));
|
|
|
+ if (date != null) {
|
|
|
+ String date2 = dateFormater.format(date);
|
|
|
+ fjvo.setFbsj(date2);
|
|
|
+ }
|
|
|
+ fjvo.setFbdw(fjlist.get(i).getFbdw());
|
|
|
+ fjvo.setWjh(fjlist.get(i).getWjh());
|
|
|
+ fjvo.setId(fjlist.get(i).getId());
|
|
|
+ model.addAttribute("recordfj" + s, fjvo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
model.addAttribute("record", vo);
|
|
|
model.addAttribute("jyr", entity.getJyrid());
|
|
|
+ model.addAttribute("roleCode", Constants.ROLE_LD);
|
|
|
+ model.addAttribute("currName", "领导办理");
|
|
|
+ if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
+ model.addAttribute("ssFlag", "1");
|
|
|
+ } else {
|
|
|
+ model.addAttribute("ssFlag", "0");
|
|
|
+ }
|
|
|
return "gkjsgl/jgsq/jgsqedit";
|
|
|
}
|
|
|
|
|
@@ -800,14 +863,99 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
vo.setSzgq(entity.getSzgq() != null ? entity.getSzgq().getId() : "");
|
|
|
vo.setZyhbwfl(entity.getZyhbwfl() != null ? entity.getZyhbwfl().getId() : "");
|
|
|
|
|
|
+ // 附件
|
|
|
+ List<AccessoryEntity> accessoryList = accessoryService.queryBySsidAndSstype(id, "jsjd");
|
|
|
+ for (int i = 0; i < accessoryList.size(); i++) {
|
|
|
+ if (StringUtils.isNotEmpty(accessoryList.get(i).getRemark())) {
|
|
|
+ AccessoryEntity acc = accessoryList.get(i);
|
|
|
+ String s = accessoryList.get(i).getRemark().substring(0, 2);
|
|
|
+ String accid = accessoryList.get(i).getId();
|
|
|
+ JsjdfjVo fjnamevo = new JsjdfjVo();
|
|
|
+ fjnamevo.setXhbz(accessoryList.get(i).getRemark().substring(2, accessoryList.get(i).getRemark().length()));
|
|
|
+ fjnamevo.setFjid(accid);
|
|
|
+ fjnamevo.setFjmc(accessoryList.get(i).getName());
|
|
|
+ if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
+ try {
|
|
|
+ Ftp f = getftp();
|
|
|
+ // 本地目录
|
|
|
+ String localBaseDir = GlobalData.UPLOAD_FILE_PATH + acc.getFilepath();
|
|
|
+ File newfile = new File(localBaseDir);
|
|
|
+ // 如果文件夹不存在则创建
|
|
|
+ if (!newfile.exists() && !newfile.isDirectory()) {
|
|
|
+ newfile.mkdirs();
|
|
|
+ }
|
|
|
+ // 远程目录
|
|
|
+ String remoteBaseDir = acc.getFilepath();
|
|
|
+ // 下载ftp文件
|
|
|
+ boolean downflag = FtpUtil.startDown(f, localBaseDir, remoteBaseDir, acc.getFilename());
|
|
|
+ if (downflag) {
|
|
|
+ System.out.println("ok");
|
|
|
+ acc.setFjbz("1");
|
|
|
+ accessoryService.save(acc);
|
|
|
+ }
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ model.addAttribute("fjList" + s, fjnamevo);
|
|
|
+ model.addAttribute("xiazaibz", s);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 附件字段
|
|
|
+ List<JgsqfjEntity> fjlist = jgsqfjService.findBySsidandfjlx(id, "ptfj");
|
|
|
+ SimpleDateFormat dateFormater = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+
|
|
|
+ for (int i = 0; i < fjlist.size(); i++) {
|
|
|
+ // 从发布单位中获取标识位
|
|
|
+ if (StringUtils.isNotEmpty(fjlist.get(i).getFjbz())) {
|
|
|
+ String s = fjlist.get(i).getFjbz().substring(0, 2);
|
|
|
+ Date date = fjlist.get(i).getFbsj();
|
|
|
+
|
|
|
+ JgsqfjVo fjvo = new JgsqfjVo();
|
|
|
+ fjvo.setFjbz(fjlist.get(i).getFjbz().substring(2, fjlist.get(i).getFjbz().length()));
|
|
|
+ if (date != null) {
|
|
|
+ String date2 = dateFormater.format(date);
|
|
|
+ fjvo.setFbsj(date2);
|
|
|
+ }
|
|
|
+ fjvo.setFbdw(fjlist.get(i).getFbdw());
|
|
|
+ fjvo.setWjh(fjlist.get(i).getWjh());
|
|
|
+ fjvo.setId(fjlist.get(i).getId());
|
|
|
+ model.addAttribute("recordfj" + s, fjvo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
List<TaskInfoEntity> lists = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id, JgsqEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
+ String roleCode = "";
|
|
|
TaskInfoEntity taskinfo = lists.get(0);
|
|
|
- if ("jbrbl".equals(taskinfo.getTaskKey())) {
|
|
|
- opflag = "5";
|
|
|
+ String currName = taskinfo.getCurrName();
|
|
|
+ model.addAttribute("currName", currName);
|
|
|
+ if ("ldbl".equals(taskinfo.getTaskKey())) {
|
|
|
+ roleCode = Constants.ROLE_LD;
|
|
|
+ } else if ("fgldbl".equals(taskinfo.getTaskKey())) {
|
|
|
+ roleCode = Constants.ROLE_FGLD;
|
|
|
+ } else if ("ksbl".equals(taskinfo.getTaskKey())) {
|
|
|
+ roleCode = Constants.ROLE_KS;
|
|
|
+ } else if ("jbrbl".equals(taskinfo.getTaskKey())) {
|
|
|
+ roleCode = Constants.ROLE_JBR;
|
|
|
+ } else if ("kscs".equals(taskinfo.getTaskKey())) {
|
|
|
+
|
|
|
+ } else if ("fgldcs".equals(taskinfo.getTaskKey())) {
|
|
|
+ roleCode = Constants.ROLE_FGLD;
|
|
|
+ } else if ("ldcs".equals(taskinfo.getTaskKey())) {
|
|
|
+ roleCode = Constants.ROLE_LD;
|
|
|
} else if ("zjps".equals(taskinfo.getTaskKey())) {
|
|
|
- opflag = "9";
|
|
|
+ roleCode = Constants.ROLE_ZJPS;
|
|
|
+ } else if ("cnxk".equals(taskinfo.getTaskKey())) {
|
|
|
+
|
|
|
+ } else if ("fgldsh".equals(taskinfo.getTaskKey())) {
|
|
|
+ roleCode = Constants.ROLE_FGLD;
|
|
|
+ } else if ("ldpz".equals(taskinfo.getTaskKey())) {
|
|
|
+ roleCode = Constants.YES;
|
|
|
}
|
|
|
+ model.addAttribute("roleCode", roleCode);
|
|
|
model.addAttribute("taskKey", taskinfo.getTaskKey());
|
|
|
model.addAttribute("opflag", opflag);
|
|
|
}
|
|
@@ -848,11 +996,6 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
}
|
|
|
model.addAttribute("list", volist);
|
|
|
|
|
|
- List<JgsqfjEntity> fjlist = jgsqfjService.findBySsid(id);
|
|
|
- if (fjlist != null && fjlist.size() > 0) {
|
|
|
- model.addAttribute("fjlist", fjlist);
|
|
|
- }
|
|
|
-
|
|
|
model.addAttribute("record", vo);
|
|
|
model.addAttribute("jyr", entity.getJyrid());
|
|
|
return "gkjsgl/jgsq/jgsqview";
|
|
@@ -880,6 +1023,12 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
model.addAttribute("gk", gklist.size() == 1 ? gklist.get(0).getId() : "");
|
|
|
}
|
|
|
}
|
|
|
+ if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
+ model.addAttribute("ssFlag", "1");
|
|
|
+ } else {
|
|
|
+ model.addAttribute("ssFlag", "0");
|
|
|
+ }
|
|
|
+ model.addAttribute("roleCode", Constants.ROLE_LD);
|
|
|
return "gkjsgl/jgsq/jgsqadd";
|
|
|
}
|
|
|
|
|
@@ -913,58 +1062,30 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
|
|
|
@RequestMapping(value = "/audit")
|
|
|
@ResponseBody
|
|
|
- public WebJsonResult audit(String shyj, String id, boolean flag, String accid, String userids) {
|
|
|
+ public WebJsonResult audit(String shyj, String id, boolean flag, String accid, String userids, String delid33, String delid34, String delid35, String fjzdids) {
|
|
|
WebJsonResult wr = success();
|
|
|
JgsqEntity entity = jgsqService.findOne(id);
|
|
|
- String role = "";
|
|
|
- try {
|
|
|
- List<TaskInfoEntity> list = taskInfoService.findByBusIdAndBusKeyAndRecordStatus(id, JsjdcbsjEntity.PROCESS_DEFINITION_KEY);
|
|
|
- if (list != null & list.size() > 0) {
|
|
|
- TaskInfoEntity taskinfo = list.get(0);
|
|
|
- if ("ldbl".equals(taskinfo.getTaskKey())) {
|
|
|
- role = Constants.ROLE_FGLD;
|
|
|
- } else if ("fgldbl".equals(taskinfo.getTaskKey())) {
|
|
|
- role = Constants.ROLE_KS;
|
|
|
- } else if ("ksbl".equals(taskinfo.getTaskKey())) {
|
|
|
- role = Constants.ROLE_JBR;
|
|
|
- } else if ("jbrbl".equals(taskinfo.getTaskKey())) {
|
|
|
-
|
|
|
- } else if ("kscs".equals(taskinfo.getTaskKey())) {
|
|
|
- role = Constants.ROLE_FGLD;
|
|
|
- } else if ("fgldcs".equals(taskinfo.getTaskKey())) {
|
|
|
- role = Constants.ROLE_LD;
|
|
|
- } else if ("ldcs".equals(taskinfo.getTaskKey())) {
|
|
|
- role = Constants.ROLE_ZJPS;
|
|
|
- } else if ("zjps".equals(taskinfo.getTaskKey())) {
|
|
|
-
|
|
|
- } else if ("cnxk".equals(taskinfo.getTaskKey())) {
|
|
|
- role = Constants.ROLE_FGLD;
|
|
|
- } else if ("fgldsh".equals(taskinfo.getTaskKey())) {
|
|
|
- role = Constants.ROLE_LD;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- } catch (Exception e) {
|
|
|
- wr.setSuccess(false);
|
|
|
- wr.setMessage("操作失败!");
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
if (!StringUtils.isEmpty(accid)) {
|
|
|
// 关联附件
|
|
|
- String[] ssids = accid.split(",");
|
|
|
- for (String ssid : ssids) {
|
|
|
- JgsqfjEntity fj = jgsqfjService.findOne(ssid);
|
|
|
- if (fj != null) {
|
|
|
- fj.setSsid(entity.getId());
|
|
|
- jgsqfjService.save(fj);
|
|
|
- }
|
|
|
- }
|
|
|
+ fjgt(accid, entity);
|
|
|
+ fjzdgt(fjzdids, entity);
|
|
|
}
|
|
|
+
|
|
|
try {
|
|
|
if (jgsqService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id) != null) {
|
|
|
jgsqService.claim(id, SecUtils.getCurrUser().getId().toString());
|
|
|
}
|
|
|
|
|
|
+ if (!flag) {
|
|
|
+ List<TaskInfoEntity> slist = taskInfoService.findByBusIdAndBusKeyOrderByIdAsc(id, JgsqEntity.PROCESS_DEFINITION_KEY);
|
|
|
+ for (int i = 0; i < slist.size(); i++) {
|
|
|
+ TaskInfoEntity taskentity = slist.get(i);
|
|
|
+ if ("zjps".equals(taskentity.getTaskKey())) {
|
|
|
+ userids = taskentity.getAuditUser() + ",";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
boolean flowflag = jgsqService.changeAudit(shyj, entity, flag, userids);
|
|
|
if (flowflag) {
|
|
|
if (flag) {
|
|
@@ -972,13 +1093,25 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
} else {
|
|
|
entity.setFlowstatus("1");
|
|
|
}
|
|
|
- jgsqService.save(entity);
|
|
|
+ entity.setSftb(Constants.YES);
|
|
|
+ entity = jgsqService.save(entity);
|
|
|
+ // 如果是省级审核通过或不通过后同步到市级
|
|
|
+ try {
|
|
|
+ String url = "/GK_OPERATION_JSJY_JSJDCBSJ_ONE_PC?condition=ID=" + entity.getId();
|
|
|
+ boolean tbflag = getTbStatus(url);
|
|
|
+ if (tbflag) {
|
|
|
+ entity.setTbzt("Y");
|
|
|
+ jgsqService.save(entity);
|
|
|
+ }
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
// rtx提醒
|
|
|
if (!StringUtils.isEmpty(userids)) {
|
|
|
rtxSend(userids, "", "你有一条建设进度竣工验收申请待办事务,请及时处理!");
|
|
|
- } else {
|
|
|
- rtxSend("", role, "你有一条建设进度竣工验收申请待办事务,请及时处理!");
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
@@ -989,27 +1122,54 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
return wr;
|
|
|
}
|
|
|
|
|
|
+ // 附件字段保存共通
|
|
|
+ public void fjzdgt(String fjzdids, JgsqEntity code) {
|
|
|
+ if (fjzdids != null && fjzdids != "") {
|
|
|
+ String[] fjidssz = fjzdids.split(",");
|
|
|
+ for (String fj : fjidssz) {
|
|
|
+ if (!StringUtils.isEmpty(fj)) {
|
|
|
+ // 获取前两个字符(标识位)
|
|
|
+ String s = fj.substring(0, 2);
|
|
|
+ // 去掉前两个标识位查询
|
|
|
+ JgsqfjEntity jsjdfj = jgsqfjService.findOne(fj.substring(2, fj.length()));
|
|
|
+ jsjdfj.setSsid(code.getId());
|
|
|
+ // 把附件标识设置成标识位+附件标识
|
|
|
+ jsjdfj.setFjbz(s + jsjdfj.getFjbz());
|
|
|
+ jsjdfj.setFbdw(jsjdfj.getFbdw());
|
|
|
+ jsjdfj.setFjlx("ptfj");
|
|
|
+ jgsqfjService.save(jsjdfj);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 附件保存共通
|
|
|
+ public void fjgt(String accids, JgsqEntity xmxxgl) {
|
|
|
+ if (null != accids && "" != accids) {
|
|
|
+ String[] ssids = accids.split(",");
|
|
|
+ for (String ssid : ssids) {
|
|
|
+ // 获取前两个字符(标识位)
|
|
|
+ if (!StringUtils.isEmpty(ssid)) {
|
|
|
+ String s = ssid.substring(0, 2);
|
|
|
+ // 去掉标志位查询
|
|
|
+ AccessoryEntity acc = accessoryService.findOne(ssid.substring(2, ssid.length()));
|
|
|
+ acc.setSsid(xmxxgl.getId());
|
|
|
+ // 把备注设置成标识位+备注
|
|
|
+ acc.setRemark(s + acc.getRemark());
|
|
|
+ accessoryService.save(acc);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 保存附件
|
|
|
@RequestMapping(value = "/saveFile")
|
|
|
@ResponseBody
|
|
|
- public WebJsonResult saveFile(@RequestParam("file") List<MultipartFile> file, String fjFlag, Model model, HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ public WebJsonResult saveFile(MultipartFile filename, Model model) {
|
|
|
WebJsonResult wr = success();
|
|
|
- if (file != null && file.size() > 0) {
|
|
|
- JgsqfjEntity fjEntity = new JgsqfjEntity();
|
|
|
- for (int i = 0; i < file.size(); i++) {
|
|
|
- MultipartFile f = file.get(i);
|
|
|
- if (f.getSize() > 0) {
|
|
|
- AccessoryEntity acc = accessoryService.saveFile(f, "jgsq");
|
|
|
- if (acc != null) {
|
|
|
- fjEntity.setFjid(acc.getId());
|
|
|
- fjEntity.setFjmc(acc.getName());
|
|
|
- fjEntity.setType(fjFlag);
|
|
|
- fjEntity = jgsqfjService.save(fjEntity);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- wr.setAttr("acc", fjEntity);
|
|
|
+ if (filename != null) {
|
|
|
+ AccessoryEntity acc = accessoryService.saveFile(filename, "jsjd");
|
|
|
+ wr.setAttr("acc", acc);
|
|
|
} else {
|
|
|
wr.setSuccess(false);
|
|
|
wr.setMessage("请上传附件!");
|
|
@@ -1017,29 +1177,39 @@ public class JgsqCtl extends BaseWebCtl {
|
|
|
return wr;
|
|
|
}
|
|
|
|
|
|
- @RequestMapping(value = "/delFile")
|
|
|
+ @RequestMapping(value = "/savefj")
|
|
|
@ResponseBody
|
|
|
- public WebJsonResult delFile(String accid, Model model) {
|
|
|
+ public WebJsonResult savefj(Model model, JgsqfjEntity fjzd) {
|
|
|
WebJsonResult wr = success();
|
|
|
try {
|
|
|
- JgsqfjEntity entity = jgsqfjService.findOne(accid);
|
|
|
- if (entity != null) {
|
|
|
- AccessoryEntity acc = accessoryService.findOne(entity.getFjid());
|
|
|
- if (acc != null) {
|
|
|
- accessoryService.delete(acc);
|
|
|
- if (entity != null) {
|
|
|
- String path = acc.getFilepath() + acc.getFilename();
|
|
|
- File file = new File(path);
|
|
|
- if (file.isFile() && file.exists()) {
|
|
|
- file.delete();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- jgsqfjService.delete(entity);
|
|
|
- }
|
|
|
+ // 新增
|
|
|
+ JgsqfjEntity entity = jgsqfjService.save(fjzd);
|
|
|
+ String fjid = entity.getId();
|
|
|
+ wr.setMessage(fjid);
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
wr.setSuccess(false);
|
|
|
+ wr.setMessage("操作失败!");
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
return wr;
|
|
|
}
|
|
|
+
|
|
|
+ @RequestMapping(value = "/delFile")
|
|
|
+ @ResponseBody
|
|
|
+ public WebJsonResult delFile(String id, Model model) {
|
|
|
+ AccessoryEntity acc = accessoryService.findOne(id);
|
|
|
+ accessoryService.delete(acc);
|
|
|
+ WebJsonResult wr = success();
|
|
|
+
|
|
|
+ return wr;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/delFjzd")
|
|
|
+ @ResponseBody
|
|
|
+ public WebJsonResult delFjzd(String id, Model model) {
|
|
|
+ jgsqfjService.logicDelete(id);
|
|
|
+ WebJsonResult wr = success();
|
|
|
+ return wr;
|
|
|
+ }
|
|
|
}
|