|
@@ -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;
|
|
|
|
|
@@ -44,6 +42,8 @@ import com.xt.jygl.gkjsgl.jsjdcbsj.entity.JsjdcbsjfjEntity;
|
|
|
import com.xt.jygl.gkjsgl.jsjdcbsj.service.JsjdcbsjService;
|
|
|
import com.xt.jygl.gkjsgl.jsjdcbsj.service.JsjdcbsjfjService;
|
|
|
import com.xt.jygl.gkjsgl.jsjdcbsj.vo.JsjdcbsjVo;
|
|
|
+import com.xt.jygl.gkjsgl.jsjdcbsj.vo.JsjdcbsjfjVo;
|
|
|
+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.gkjygl.gkjyr.jyrjbxx.entity.GkjyrEntity;
|
|
@@ -196,6 +196,8 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
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) {
|
|
@@ -254,7 +256,7 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
model.addAttribute("menuid", menuid);
|
|
|
if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
model.addAttribute("ssFlag", "1");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
model.addAttribute("ssFlag", "0");
|
|
|
}
|
|
|
// 翻页共通
|
|
@@ -723,6 +725,7 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
WebJsonResult wr = success();
|
|
|
JsjdcbsjEntity entity = jsjdcbsjService.findOne(id);
|
|
|
entity.setSftb(Constants.YES);
|
|
|
+ entity.setFlowstatus("3");
|
|
|
jsjdcbsjService.save(entity);
|
|
|
String url = "/GK_OPERATION_JSJY_JSJDCBSJ_ONE_CP?condition=ID=" + id;
|
|
|
boolean flag = getTbStatus(url);
|
|
@@ -741,7 +744,7 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
public String edit(Model model, String id, String flag) {
|
|
|
model.addAttribute("flag", flag);
|
|
|
// 附件
|
|
|
- List<AccessoryEntity> accessoryList = accessoryService.queryBySsidAndSstype(id, "1");
|
|
|
+ List<AccessoryEntity> accessoryList = accessoryService.queryBySsidAndSstype(id, "jsjd");
|
|
|
model.addAttribute("fjList", accessoryList);
|
|
|
|
|
|
JsjdcbsjEntity entity = jsjdcbsjService.findOne(id);
|
|
@@ -766,9 +769,10 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
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{
|
|
|
+ } else {
|
|
|
model.addAttribute("ssFlag", "0");
|
|
|
}
|
|
|
return "gkjsgl/jsjdcbsj/jsjdcbsjedit";
|
|
@@ -777,6 +781,7 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
@RequestMapping(value = "/view")
|
|
|
public String view(Model model, String id, String flag, String opflag) {
|
|
|
model.addAttribute("flag", flag);
|
|
|
+
|
|
|
JsjdcbsjEntity entity = jsjdcbsjService.findOne(id);
|
|
|
JsjdcbsjVo vo = new JsjdcbsjVo();
|
|
|
BeanUtils.copyProperties(entity, vo);
|
|
@@ -815,10 +820,75 @@ public class JsjdcbsjCtl 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<JsjdcbsjfjEntity> fjlist = jsjdcbsjfjService.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();
|
|
|
+
|
|
|
+ JsjdcbsjfjVo fjvo = new JsjdcbsjfjVo();
|
|
|
+ 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, JsjdcbsjEntity.PROCESS_DEFINITION_KEY);
|
|
|
if (lists != null & lists.size() > 0) {
|
|
|
String roleCode = "";
|
|
|
TaskInfoEntity taskinfo = lists.get(0);
|
|
|
+ String currName = taskinfo.getCurrName();
|
|
|
+ model.addAttribute("currName", currName);
|
|
|
if ("ldbl".equals(taskinfo.getTaskKey())) {
|
|
|
roleCode = Constants.ROLE_LD;
|
|
|
} else if ("fgldbl".equals(taskinfo.getTaskKey())) {
|
|
@@ -839,7 +909,7 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
|
|
|
} else if ("fgldsh".equals(taskinfo.getTaskKey())) {
|
|
|
roleCode = Constants.ROLE_FGLD;
|
|
|
- }else if ("ldsh".equals(taskinfo.getTaskKey())){
|
|
|
+ } else if ("ldpz".equals(taskinfo.getTaskKey())) {
|
|
|
roleCode = Constants.YES;
|
|
|
}
|
|
|
model.addAttribute("roleCode", roleCode);
|
|
@@ -883,39 +953,6 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
}
|
|
|
model.addAttribute("list", volist);
|
|
|
|
|
|
- List<JsjdcbsjfjEntity> fjlist = jsjdcbsjfjService.findBySsid(id);
|
|
|
- if (fjlist != null && fjlist.size() > 0) {
|
|
|
- if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
- for (JsjdcbsjfjEntity fj : fjlist) {
|
|
|
- AccessoryEntity acc = accessoryService.findOne(fj.getFjid());
|
|
|
- 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", fjlist);
|
|
|
- }
|
|
|
-
|
|
|
model.addAttribute("record", vo);
|
|
|
model.addAttribute("jyr", entity.getJyrid());
|
|
|
return "gkjsgl/jsjdcbsj/jsjdcbsjview";
|
|
@@ -945,7 +982,7 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
}
|
|
|
if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
model.addAttribute("ssFlag", "1");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
model.addAttribute("ssFlag", "0");
|
|
|
}
|
|
|
model.addAttribute("roleCode", Constants.ROLE_LD);
|
|
@@ -982,19 +1019,13 @@ public class JsjdcbsjCtl 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 delid34, String delid35, String delid36, String delid37, String delid38, String fjzdids) {
|
|
|
WebJsonResult wr = success();
|
|
|
JsjdcbsjEntity entity = jsjdcbsjService.findOne(id);
|
|
|
if (!StringUtils.isEmpty(accid)) {
|
|
|
// 关联附件
|
|
|
- String[] ssids = accid.split(",");
|
|
|
- for (String ssid : ssids) {
|
|
|
- JsjdcbsjfjEntity fj = jsjdcbsjfjService.findOne(ssid);
|
|
|
- if (fj != null) {
|
|
|
- fj.setSsid(entity.getId());
|
|
|
- jsjdcbsjfjService.save(fj);
|
|
|
- }
|
|
|
- }
|
|
|
+ fjgt(accid, entity);
|
|
|
+ fjzdgt(fjzdids, entity);
|
|
|
}
|
|
|
try {
|
|
|
if (jsjdcbsjService.getCandidateTaskByUserAndBusKey(SecUtils.getCurrUser().getId().toString(), id) != null) {
|
|
@@ -1031,7 +1062,7 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
fjids = acc.getId() + ",";
|
|
|
}
|
|
|
}
|
|
|
- fjids = fjids.substring(0, fjids.lastIndexOf(",") - 1);
|
|
|
+ fjids = fjids.substring(0, fjids.length() - 1);
|
|
|
}
|
|
|
String url = "/GK_OPERATION_JSJY_JSJDCBSJ_ONE_PC?condition=ID=" + entity.getId() + ";FJID_IN=" + fjids;
|
|
|
boolean tbflag = getTbStatus(url);
|
|
@@ -1059,27 +1090,54 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
return wr;
|
|
|
}
|
|
|
|
|
|
+ // 附件字段保存共通
|
|
|
+ public void fjzdgt(String fjzdids, JsjdcbsjEntity code) {
|
|
|
+ if (fjzdids != null && fjzdids != "") {
|
|
|
+ String[] fjidssz = fjzdids.split(",");
|
|
|
+ for (String fj : fjidssz) {
|
|
|
+ if (!StringUtils.isEmpty(fj)) {
|
|
|
+ // 获取前两个字符(标识位)
|
|
|
+ String s = fj.substring(0, 2);
|
|
|
+ // 去掉前两个标识位查询
|
|
|
+ JsjdcbsjfjEntity jsjdfj = jsjdcbsjfjService.findOne(fj.substring(2, fj.length()));
|
|
|
+ jsjdfj.setSsid(code.getId());
|
|
|
+ // 把附件标识设置成标识位+附件标识
|
|
|
+ jsjdfj.setFjbz(s + jsjdfj.getFjbz());
|
|
|
+ jsjdfj.setFbdw(jsjdfj.getFbdw());
|
|
|
+ jsjdfj.setFjlx("ptfj");
|
|
|
+ jsjdcbsjfjService.save(jsjdfj);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 附件保存共通
|
|
|
+ public void fjgt(String accids, JsjdcbsjEntity 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) {
|
|
|
- JsjdcbsjfjEntity fjEntity = new JsjdcbsjfjEntity();
|
|
|
- for (int i = 0; i < file.size(); i++) {
|
|
|
- MultipartFile f = file.get(i);
|
|
|
- if (f.getSize() > 0) {
|
|
|
- AccessoryEntity acc = accessoryService.saveFile(f, "jsjdcbsj");
|
|
|
- if (acc != null) {
|
|
|
- fjEntity.setFjid(acc.getId());
|
|
|
- fjEntity.setFjmc(acc.getName());
|
|
|
- fjEntity.setType(fjFlag);
|
|
|
- fjEntity = jsjdcbsjfjService.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("请上传附件!");
|
|
@@ -1087,6 +1145,24 @@ public class JsjdcbsjCtl extends BaseWebCtl {
|
|
|
return wr;
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping(value = "/savefj")
|
|
|
+ @ResponseBody
|
|
|
+ public WebJsonResult savefj(Model model, JsjdcbsjfjEntity fjzd) {
|
|
|
+ WebJsonResult wr = success();
|
|
|
+ try {
|
|
|
+ // 新增
|
|
|
+ JsjdcbsjfjEntity entity = jsjdcbsjfjService.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 accid, Model model) {
|