Преглед изворни кода

git-svn-id: https://192.168.57.71/svn/jsgkj@142 931142cf-59ea-a443-aa0e-51397b428577

ld_xuhx пре 9 година
родитељ
комит
c7eec21244

+ 2 - 0
gkjsjy/trunk/src/com/xt/jygl/gkjygl/gkjyr/jyrjbxx/ctl/GkjyrCtl.java

@@ -977,6 +977,7 @@ public class GkjyrCtl extends BaseWebCtl {
 				List<Predicate> list = new ArrayList<Predicate>();
 				list.add(cb.like(root.get("gkjyr").as(String.class), "%" + id + "%"));
 				list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+				list.add(cb.equal(root.get("sfyx").as(Integer.class), BaseEntity.RECORD_STATE_VALID));
 				return cb.and(list.toArray(new Predicate[] {}));
 			}
 		};
@@ -1717,6 +1718,7 @@ public class GkjyrCtl extends BaseWebCtl {
 				List<Predicate> list = new ArrayList<Predicate>();
 				list.add(cb.like(root.get("gkjyr").as(String.class), "%" + id + "%"));
 				list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+				list.add(cb.equal(root.get("sfyx").as(Integer.class), BaseEntity.RECORD_STATE_VALID));
 				return cb.and(list.toArray(new Predicate[] {}));
 			}
 		};

+ 1 - 0
gkjsjy/trunk/src/com/xt/jygl/gkjygl/gkjyxkgl/gkjyxkbg/ctl/XkzbgCtl.java

@@ -315,6 +315,7 @@ public class XkzbgCtl extends BaseWebCtl {
 					List<Predicate> list = new ArrayList<Predicate>();
 					list.add(cb.like(root.get("gkjyr").as(String.class), "%" + jyrid + "%"));
 					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+					list.add(cb.equal(root.get("sfyx").as(Integer.class), BaseEntity.RECORD_STATE_VALID));
 					return cb.and(list.toArray(new Predicate[] {}));
 				}
 			};

+ 1 - 0
gkjsjy/trunk/src/com/xt/jygl/gkjygl/gkjyxkgl/gkjyxksq/ctl/XkzsqCtl.java

@@ -674,6 +674,7 @@ public class XkzsqCtl extends BaseWebCtl {
 					List<Predicate> list = new ArrayList<Predicate>();
 					list.add(cb.like(root.get("gkjyr").as(String.class), "%" + jyrid + "%"));
 					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+					list.add(cb.equal(root.get("sfyx").as(Integer.class), BaseEntity.RECORD_STATE_VALID));
 					return cb.and(list.toArray(new Predicate[] {}));
 				}
 			};

+ 4 - 5
gkjsjy/trunk/src/com/xt/jygl/gkjygl/gkjyxkgl/gkjyxkyx/ctl/XkzyxCtl.java

@@ -10,7 +10,6 @@ import java.util.List;
 
 import javax.persistence.criteria.CriteriaBuilder;
 import javax.persistence.criteria.CriteriaBuilder.In;
-import javax.persistence.criteria.CommonAbstractCriteria;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
@@ -18,7 +17,6 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.activiti.engine.ActivitiException;
-import org.omg.CORBA.COMM_FAILURE;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
@@ -268,6 +266,7 @@ public class XkzyxCtl extends BaseWebCtl {
 					List<Predicate> list = new ArrayList<Predicate>();
 					list.add(cb.like(root.get("gkjyr").as(String.class), "%" + jyrid + "%"));
 					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+					list.add(cb.equal(root.get("sfyx").as(Integer.class), BaseEntity.RECORD_STATE_VALID));
 					return cb.and(list.toArray(new Predicate[] {}));
 				}
 			};
@@ -1359,7 +1358,7 @@ 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("操作失败!");
@@ -1407,7 +1406,7 @@ public class XkzyxCtl extends BaseWebCtl {
 			}
 			 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("操作失败!");
@@ -1762,7 +1761,7 @@ public class XkzyxCtl extends BaseWebCtl {
 				}
 			}else{
 				// rtx提醒
-				//rtxSend(entity.getSzgq().getId(), role, "你有一条许可证延续待办事务,请及时处理!");
+				rtxSend(entity.getSzgq().getId(), role, "你有一条许可证延续待办事务,请及时处理!");
 			}
 			wr.setAttr("jflag", jflag);
 		} catch (Exception e) {

+ 15 - 2
gkjsjy/trunk/src/com/xt/jygl/gkjygl/gkjyxkgl/gkjyxkzx/ctl/XkzzxCtl.java

@@ -321,6 +321,7 @@ public class XkzzxCtl extends BaseWebCtl {
 					List<Predicate> list = new ArrayList<Predicate>();
 					list.add(cb.like(root.get("gkjyr").as(String.class), "%" + jyrid + "%"));
 					list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
+					list.add(cb.equal(root.get("sfyx").as(Integer.class), BaseEntity.RECORD_STATE_VALID));
 					return cb.and(list.toArray(new Predicate[] {}));
 				}
 			};
@@ -873,7 +874,7 @@ public class XkzzxCtl extends BaseWebCtl {
 
 	// 查看
 	@RequestMapping(value = "/viewmain")
-	public String viewmain(Model model, String id, String flag, String opflag, String path, String path2,String type) {
+	public String viewmain(Model model, String id, String flag, String opflag, String path, String path2, String type) {
 		model.addAttribute("path", path);
 		model.addAttribute("type", type);
 		model.addAttribute("path2", path2);
@@ -1086,7 +1087,7 @@ public class XkzzxCtl extends BaseWebCtl {
 	// 编辑
 	@RequestMapping(value = "/editmain")
 	@RequiresPermissions("gkjyxkzx:edit")
-	public String editmain(Model model, String id, String flag, String path,String type) {
+	public String editmain(Model model, String id, String flag, String path, String type) {
 		model.addAttribute("flag", flag);
 		model.addAttribute("path", path);
 		model.addAttribute("type", type);
@@ -1653,6 +1654,8 @@ public class XkzzxCtl extends BaseWebCtl {
 					}
 				}
 			}
+			// rtx提醒
+			rtxSend(xkzzxEntity.getSzgq().getId(), Constants.ROLE_CLSC, "你有一条许可证注销待办事务,请及时处理!");
 		} catch (Exception e) {
 			wr.setSuccess(false);
 			wr.setMessage("操作失败!");
@@ -1700,6 +1703,8 @@ public class XkzzxCtl extends BaseWebCtl {
 				xkzzxService.claim(code.getId(), SecUtils.getCurrUser().getId().toString());
 			}
 			xkzzxService.changeAudit(null, xkzzxEntity, true);
+			// rtx提醒
+			rtxSend(xkzzxEntity.getSzgq().getId(), Constants.ROLE_CLSC, "你有一条许可证注销待办事务,请及时处理!");
 		} catch (Exception e) {
 			wr.setSuccess(false);
 			wr.setMessage("操作失败!");
@@ -1922,6 +1927,7 @@ public class XkzzxCtl extends BaseWebCtl {
 		WebJsonResult wr = success();
 		UserEntity user = securityMgr.getCurrUser();
 		XkzzxEntity entity = null;
+		String role = "";
 		try {
 			entity = xkzzxService.findOne(id);
 			Date today = new Date();
@@ -1932,14 +1938,17 @@ public class XkzzxCtl extends BaseWebCtl {
 					entity.setClscyj(StringUtils.isEmpty(shyj) ? "" : shyj);
 					entity.setClscjbr(user.getName());
 					entity.setClscrq(today);
+					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;
 				} else if ("复核".equals(taskinfo.getCurrName())) {
 					entity.setFhyj(StringUtils.isEmpty(shyj) ? "" : shyj);
 					entity.setFhjbr(user.getName());
 					entity.setFhrq(today);
+					role = Constants.ROLE_SP;
 				} else if ("审批".equals(taskinfo.getCurrName())) {
 					entity.setSpyj(StringUtils.isEmpty(shyj) ? "" : shyj);
 					entity.setSpjbr(user.getName());
@@ -1957,6 +1966,10 @@ public class XkzzxCtl extends BaseWebCtl {
 				xkzzxService.claim(id, SecUtils.getCurrUser().getId().toString());
 			}
 			boolean jflag = xkzzxService.changeAudit(shyj, entity, flag);
+			if (!jflag) {
+				// rtx提醒
+				rtxSend(entity.getSzgq().getId(), role, "你有一条许可证注销待办事务,请及时处理!");
+			}
 			wr.setAttr("jflag", jflag);
 		} catch (Exception e) {
 			wr.setSuccess(false);