소스 검색

代码提交

user5 1 년 전
부모
커밋
f6da07291a

+ 5 - 0
src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/dao/ProjectReportSignatureWorkDao.java

@@ -140,4 +140,9 @@ public interface ProjectReportSignatureWorkDao extends CrudDao<ProjectReportSign
     ReportSignature getApproval(String id);
 
     Integer checkProject(String id);
+
+    //修改报告签章信息(签章参数)
+    void updateReportSignatureSignature(ReportSignature signature);
+    //修改审定单签章信息(签章参数)
+    void updateApprovalSignatureSignature(ReportSignature signature);
 }

+ 26 - 0
src/main/java/com/jeeplus/modules/signature/projectReportSignatureWork/service/ProjectReportSignatureWorkService.java

@@ -979,6 +979,7 @@ public class ProjectReportSignatureWorkService extends CrudService<ProjectReport
      * @param dailyOfficeWorkId
      * @return
      */
+    @Transactional(readOnly = false)
     public HashMap<String, Object> getManualSignatureUrl( String dailyOfficeWorkId, ReportSignature signature) {
         HashMap<String, Object> map = Maps.newHashMap();
         map.put("contractUrl","");
@@ -1326,6 +1327,7 @@ public class ProjectReportSignatureWorkService extends CrudService<ProjectReport
             reportSignature.setStatus(3);
             reportSignature.preUpdate();
             dao.updateReportSignature(reportSignature);
+            dao.updateReportSignatureSignature(reportSignature);
 
         }catch (ActivitiObjectNotFoundException e){
             System.err.println("签章申请撤销异常,因为这个流程已不存在!");
@@ -1389,6 +1391,7 @@ public class ProjectReportSignatureWorkService extends CrudService<ProjectReport
             reportSignature.setStatus(3);
             reportSignature.preUpdate();
             dao.updateApprovalSignature(reportSignature);
+            dao.updateApprovalSignatureSignature(reportSignature);
 
         }catch (ActivitiObjectNotFoundException e){
             System.err.println("签章申请撤销异常,因为这个流程已不存在!");
@@ -1939,6 +1942,11 @@ public class ProjectReportSignatureWorkService extends CrudService<ProjectReport
                         vars.put("passs", false);
                         user = createUser;
                         workActivityProcess.setIsApproval("2");
+                        //修改签章数据信息
+                        dao.updateReportSignatureSignature(projectReportSignature);
+
+
+
                     }
                     break;
                 }
@@ -1970,6 +1978,24 @@ public class ProjectReportSignatureWorkService extends CrudService<ProjectReport
                         workActivityProcess.setIsApproval("1");
                         vars.put("pass",true);
                         vars.put("passs",true);
+                        approval.setSignatureType("2");
+                        //发起签章申请
+                        HashMap<String, Object> map = this.getManualSignatureUrl(projectReportSignature.getSignatureId() ,approval);
+                        Boolean success = (Boolean) map.get("success");
+                        //如果数据报错,则数据撤回到暂存环节
+                        if(!success){
+                            //如果发起签章不正确,则需要将已发起的流程撤回 并调整为暂存状态
+                            if (projectReportSignature.getSignatureType().equals("1")){
+                                //报告撤回
+                                this.cancelInvalidate(projectReportSignature);
+                            }else {
+                                //审定单撤回
+                                this.cancelInvalidateApproval(projectReportSignature);
+                            }
+                            String message = (String) map.get("str");
+                            return message;
+                        }
+
                     }else{
                         workActivityProcess.setIsApproval("2");
                         projectReportSignature.setStatus(ProjectStatusEnum.RECALL.getValue());

+ 34 - 1
src/main/resources/mappings/modules/signature/projectReport/ProjectReportSignatureDao.xml

@@ -712,7 +712,40 @@
 		<if test="null != dutyPerson and '' != dutyPerson">
 			,duty_person = #{dutyPerson}
 		</if>
-		,update_date = now()
+		,signature_contract_id = ''
+		,signature_document_id = ''
+		,signature_url = ''
+		,signature_url_flag = 0
+		,signature_file_name = ''
+		,signature_upload_date = null
+		,signature_upload_file_user = ''
+		,signature_flag = 0
+		WHERE id = #{id}
+	</update>
+
+	<update id="updateApprovalSignatureSignature">
+		UPDATE report_signature_approval SET
+		signature_contract_id = ''
+		,signature_document_id = ''
+		,signature_url = ''
+		,signature_url_flag = 0
+		,signature_file_name = ''
+		,signature_upload_date = null
+		,signature_upload_file_user = ''
+		,signature_flag = 0
+		WHERE id = #{id}
+	</update>
+
+	<update id="updateReportSignatureSignature">
+		UPDATE report_signature_report SET
+		signature_contract_id = ''
+		,signature_document_id = ''
+		,signature_url = ''
+		,signature_url_flag = 0
+		,signature_file_name = ''
+		,signature_upload_date = null
+		,signature_upload_file_user = ''
+		,signature_flag = 0
 		WHERE id = #{id}
 	</update>
 

+ 2 - 2
src/main/webapp/webpage/modules/signature/projectRerpotSignatureWork/ProjectRerpotSignatureWorkModifyApproval.jsp

@@ -513,7 +513,6 @@
                         </c:if>
                     </div>
                 </div>
-            </div>
 
 <%--                <div class="layui-item layui-col-sm6 lw7">--%>
 <%--                    <label class="layui-form-label">签章编号:</label>--%>
@@ -531,7 +530,7 @@
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label"><span class="require-item">*</span>签章责任人:</label>
                     <div class="layui-input-block readOnlyFFF">
-                        <select class="form-control judgment layui-input" id="dutyPerson" name="dutyPerson">
+                        <select class="form-control judgment layui-input" disabled id="dutyPerson" name="dutyPerson">
                             <option value=""/>
                             <c:forEach items="${dutyPersonList}" var="user">
                                 <option value="${user.id}" <c:if test="${projectReportSignature.dutyPerson eq user.id }">selected</c:if>>${user.name}</option>
@@ -767,6 +766,7 @@
                     </table>
                 </div>
             </div>
+</div>
 
             <div class="form-group layui-row page-end"></div>
         </form:form>