Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/com/jeeplus/modules/act/web/ActTaskController.java
yue 5 tahun lalu
induk
melakukan
d85b556ef6

+ 79 - 3
src/main/java/com/jeeplus/modules/act/service/ActTaskService.java

@@ -1116,7 +1116,7 @@ public class ActTaskService extends BaseService {
 	 * @param act
 	 */
 	@Transactional(readOnly = false)
-	public void auditSave3(Act act) {
+	public void auditSave3(Act act,Disclose disclose,Boolean flagDesign,Boolean flagItemCLose,Boolean flagDeal) {
 		// 设置意见
 		act.setComment(("yes".equals(act.getFlag())?"[没有问题] ":"[存在问题] ")+act.getComment());
 		act.preUpdate();
@@ -1124,7 +1124,31 @@ public class ActTaskService extends BaseService {
 		String taskDefKey = act.getTaskDefKey();
 		// 提交流程任务
 		Map<String, Object> vars = Maps.newHashMap();
-		vars.put("pass", "yes".equals(act.getFlag())? true : false);
+		vars.put("pass", false);
+		vars.put("pass1", false);
+		vars.put("pass2", false);
+		vars.put("pass3", false);
+		vars.put("pass4", false);
+		if (null!=disclose){
+			if (null!=disclose.getPrecondition()&&!"".equals(disclose.getPrecondition())){
+				if (flagDesign){
+					vars.put("pass1", flagDesign);
+				}
+				if (flagItemCLose){
+					vars.put("pass2",flagItemCLose);
+				}
+				if (flagDeal){
+					vars.put("pass3",flagDeal);
+				}
+				if (!flagDesign&&!flagItemCLose&&!flagDeal){
+					vars.put("pass",true);
+				}
+			}else {
+				vars.put("pass4", true);
+			}
+		}else {
+			vars.put("pass",true);
+		}
 		complete(act.getTaskId(), act.getProcInsId(), act.getComment(), vars);
 	}
 
@@ -1391,5 +1415,57 @@ public class ActTaskService extends BaseService {
 		return (Boolean) e.getValue(context);
 	}
 
-
+	public Boolean isJudgeItemClose(Disclose disclose){
+		Boolean flag = false;
+		if (null!=disclose.getChannel()&&disclose.getChannel().equals("无")){//施工通道
+			flag =true;
+		}
+		if (null!=disclose.getHiddenDanger()&&disclose.getHiddenDanger().equals("有")){
+			flag =true;
+		}
+		if (null!=disclose.getInfluenceConstruction()&&disclose.getInfluenceConstruction().equals("有")){
+			flag =true;
+		}
+		if (null!=disclose.getProjectRepetition()&&disclose.getProjectRepetition().equals("是")){
+			flag =true;
+		}
+		if (null!=disclose.getImplemented()&&disclose.getImplemented().equals("是")){
+			flag =true;
+		}
+		if (null!=disclose.getTransformer()&&disclose.getTransformer().equals("有")){
+			flag =true;
+		}
+		//必要性说明
+//		if (null!=disclose.getTransformer()&&disclose.getTransformer().equals("有")){
+//			flag =true;
+//		}
+		return flag;
+	}
+	public Boolean isJudgeDesign(Disclose disclose){
+		Boolean flag = false;
+		if (null!=disclose.getLineName()&&disclose.getLineName().equals("否")){
+			flag = true;
+		}
+		if (null!=disclose.getQuantities()&&disclose.getQuantities().equals("否")){
+			flag = true;
+		}
+		if (null!=disclose.getRodNumber()&&disclose.getRodNumber().equals("否")){
+			flag = true;
+		}
+		return flag;
+	}
+	public Boolean isJudgeDeal(Disclose disclose){
+		Boolean flag = false;
+		if (null!=disclose.getAdministrationType()){
+			if (disclose.getAdministrationType().contains("民事政处")||
+					disclose.getAdministrationType().contains("行政政处")||
+					disclose.getAdministrationType().contains("农村政处")){
+				if (null!=disclose.getPoliticalProblem()&&disclose.getPoliticalProblem().equals("是")){
+					flag=true;
+				}
+			}
+		}
+//		if (null!)
+		return flag;
+	}
 }

+ 36 - 6
src/main/java/com/jeeplus/modules/act/web/ActTaskController.java

@@ -17,7 +17,6 @@ import javax.servlet.http.HttpServletResponse;
 import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.modules.sg.managementcenter.activiti.entity.Construction;
 import com.jeeplus.modules.sg.managementcenter.activiti.entity.Disclose;
-import com.jeeplus.modules.sg.managementcenter.activiti.service.ConstructionService;
 import org.activiti.engine.HistoryService;
 import org.activiti.engine.RepositoryService;
 import org.activiti.engine.RuntimeService;
@@ -79,6 +78,9 @@ public class ActTaskController extends BaseController {
 
 	@Autowired
 	private ConstructionService constructionService;
+
+	@Autowired
+	private DiscloseService discloseService;
 	/**
 	 * 获取待办列表
 	 * @return
@@ -384,15 +386,11 @@ public class ActTaskController extends BaseController {
 	 */
 	@ResponseBody
 	@RequestMapping(value = "audit2")
-	public AjaxJson auditTask2(Act act,String cId) {
+	public AjaxJson auditTask2(Act act) {
 		AjaxJson j = new AjaxJson();
 		try {
 			String comment = URLDecoder.decode(act.getComment(), "UTF-8");
 			act.setComment(comment);
-			Construction construction = new Construction();
-			construction.setId(cId);
-			construction.setExamineDate(comment);
-			constructionService.updateExamine(construction);
 			actTaskService.auditSave2(act);
 		} catch (UnsupportedEncodingException e) {
 			e.printStackTrace();
@@ -408,7 +406,39 @@ public class ActTaskController extends BaseController {
 	@ResponseBody
 	@RequestMapping(value = "audit3")
 	public AjaxJson auditTask3(Act act) {
+		System.out.println("项目定义号="+act.getProcInsId());
 		AjaxJson j = new AjaxJson();
+		String s = "";
+		boolean flag = false;
+		Disclose dc = new Disclose();
+		dc.setProcInsId(act.getProcInsId());
+		Disclose disclose = discloseService.get(dc);
+		Boolean flagDesign = actTaskService.isJudgeDesign(disclose);
+		Boolean flagItemCLose =actTaskService.isJudgeItemClose(disclose);
+		Boolean flagDeal =actTaskService.isJudgeDeal(disclose);
+		if (flagItemCLose){
+			if (null==disclose.getExplanationOfNecessity()||disclose.getExplanationOfNecessity().equals("")){
+				s="必要性问题说明不能为空!";
+				flag = true;
+			}
+		}
+		if (flagDesign){
+			if (null==disclose.getInconsistentDescription()||disclose.getExplanationOfNecessity().equals("")){
+				s+=" 图纸现场不一致说明不能为空!";
+				flag = true;
+			}
+		}
+		if (flagDeal){
+			if (null==disclose.getPolicyHandlingInstructions()||disclose.getPolicyHandlingInstructions().equals("")){
+				s+=" 政策处理说明不能为空!";
+				flag=true;
+			}
+		}
+		if (flag){
+			j.setSuccess(false);
+			j.setMsg(s);
+			return j;
+		}
 		try {
 			String comment = URLDecoder.decode(act.getComment(), "UTF-8");
 			act.setComment(comment);

+ 58 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/entity/Disclose.java

@@ -26,6 +26,34 @@ public class Disclose  extends ActEntity<Disclose> {
     private String needReplace;
     private String overallTransformation;
 
+    private String explanationOfNecessity;//必要性问题说明
+    private String inconsistentDescription;//图纸现场不一致说明
+    private String policyHandlingInstructions;//政策处理说明
+
+    public String getExplanationOfNecessity() {
+        return explanationOfNecessity;
+    }
+
+    public void setExplanationOfNecessity(String explanationOfNecessity) {
+        this.explanationOfNecessity = explanationOfNecessity;
+    }
+
+    public String getInconsistentDescription() {
+        return inconsistentDescription;
+    }
+
+    public void setInconsistentDescription(String inconsistentDescription) {
+        this.inconsistentDescription = inconsistentDescription;
+    }
+
+    public String getPolicyHandlingInstructions() {
+        return policyHandlingInstructions;
+    }
+
+    public void setPolicyHandlingInstructions(String policyHandlingInstructions) {
+        this.policyHandlingInstructions = policyHandlingInstructions;
+    }
+
     public String getConId() {
         return conId;
     }
@@ -193,4 +221,34 @@ public class Disclose  extends ActEntity<Disclose> {
     public void setOverallTransformation(String overallTransformation) {
         this.overallTransformation = overallTransformation;
     }
+
+    @Override
+    public String toString() {
+        return "Disclose{" +
+                "conId='" + conId + '\'' +
+                ", channel='" + channel + '\'' +
+                ", capacity='" + capacity + '\'' +
+                ", sceneSize='" + sceneSize + '\'' +
+                ", capacitySize='" + capacitySize + '\'' +
+                ", hiddenDanger='" + hiddenDanger + '\'' +
+                ", influenceConstruction='" + influenceConstruction + '\'' +
+                ", projectRepetition='" + projectRepetition + '\'' +
+                ", implemented='" + implemented + '\'' +
+                ", transformer='" + transformer + '\'' +
+                ", lineName='" + lineName + '\'' +
+                ", quantities='" + quantities + '\'' +
+                ", rodNumber='" + rodNumber + '\'' +
+                ", administrationType='" + administrationType + '\'' +
+                ", politicalProblem='" + politicalProblem + '\'' +
+                ", precondition='" + precondition + '\'' +
+                ", placementMode='" + placementMode + '\'' +
+                ", productionDate='" + productionDate + '\'' +
+                ", IntegrateModule='" + IntegrateModule + '\'' +
+                ", needReplace='" + needReplace + '\'' +
+                ", overallTransformation='" + overallTransformation + '\'' +
+                ", explanationOfNecessity='" + explanationOfNecessity + '\'' +
+                ", inconsistentDescription='" + inconsistentDescription + '\'' +
+                ", policyHandlingInstructions='" + policyHandlingInstructions + '\'' +
+                '}';
+    }
 }

+ 14 - 2
src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/mapper/xml/DiscloseMapper.xml

@@ -26,12 +26,15 @@
 		IntegrateModule,
 		needReplace,
 		overallTransformation,
+		explanationOfNecessity AS "explanationOfNecessity",
+		inconsistentDescription AS "inconsistentDescription",
+		policyHandlingInstructions AS "policyHandlingInstructions",
 		a.create_by AS "createBy.id",
 		a.create_date AS "createDate",
 		a.update_by AS "updateBy.id",
 		a.update_date AS "updateDate",
 		a.remarks AS "remarks",
-		a.del_flag AS "delFlag",
+		a.del_flag AS "delFlag"
 
 	</sql>
 	
@@ -48,7 +51,7 @@
 			<include refid="constructionColumns"/>
 		FROM xm_disclose_conclusion a
 		<include refid="constructionJoins"/>
-		WHERE a.id = #{id}
+		WHERE a.proc_ins_id = #{procInsId}
 	</select>
 	
 	<select id="findList" resultMap="ConstructionResult" >
@@ -114,6 +117,9 @@
 			IntegrateModule,
 			needReplace,
 			overallTransformation,
+			explanationOfNecessity,
+			inconsistentDescription,
+			policyHandlingInstructions,
 			create_by,
 			create_date,
 			update_by,
@@ -144,6 +150,9 @@
 			#{IntegrateModule},
 			#{needReplace},
 			#{overallTransformation},
+			#{explanationOfNecessity},
+			#{inconsistentDescription},
+			#{policyHandlingInstructions},
 			#{createBy.id},
 			#{createDate},
 			#{updateBy.id},
@@ -177,6 +186,9 @@
 			IntegrateModule = #{IntegrateModule},
 			needReplace = #{needReplace},
 			overallTransformation = #{overallTransformation},
+			explanationOfNecessity = #{explanationOfNecessity},
+			inconsistentDescription = #{inconsistentDescription},
+			policyHandlingInstructions = #{policyHandlingInstructions},
 			update_by = #{updateBy.id},
 			update_date = #{updateDate},
 			remarks = #{remarks}

+ 2 - 0
src/main/webapp/webpage/modules/sg/managementcenter/activiti/divideForm.js

@@ -73,6 +73,8 @@
                         if (data.success) {
                             jp.success(data.msg);
                             jp.go("${ctx}/act/task/todo")
+                        }else {
+                            jp.error(data.msg);
                         }
                     })
             })

+ 2 - 2
src/main/webapp/webpage/modules/sg/managementcenter/activiti/divideForm.jsp

@@ -272,7 +272,7 @@
 
 
 
-					<c:if test="${construction.act.taskDefKey != '' && !construction.act.finishTask && construction.act.isNextGatewaty}">
+					<%--<c:if test="${construction.act.taskDefKey != '' && !construction.act.finishTask && construction.act.isNextGatewaty}">--%>
 						<div class="row">
 							<div class="col-sm-3"></div>
 							<div class="col-sm-6">
@@ -282,7 +282,7 @@
 								</div>
 							</div>
 						</div>
-					</c:if>
+					<%--</c:if>--%>
 
 					<c:if test="${not empty construction.id}">
 						<act:flowChart procInsId="${construction.act.procInsId}"/>