Browse Source

核销单审核后更新审核人审核时间

rainco 7 years ago
parent
commit
f2c28ef186

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/VerificationMapper.java

@@ -40,4 +40,6 @@ public interface VerificationMapper extends CommonBaseMapper<Verification> {
     String validateResAudit(@Param("id") Long id);
 
     int validateSetAcount(@Param("detno") int detno,@Param("companyid")Long companyid);
+
+    void updateAuditMsg (@Param("id") Long id,@Param("userName")String userName);
 }

+ 2 - 3
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java

@@ -543,8 +543,6 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         formData.getMain().setVc_auditdate(new Date());
         baseDTO = this.saveFormData(formData);
         Long id = baseDTO.getId();
-
-
             VerificationDTO verificationDTO = formData.getMain();
             Subledger subledger = changSubledgerUntil(verificationDTO);
             subledgerMapper.insertSelective(subledger);
@@ -573,7 +571,8 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
 
         //更新出入库状态
         this.updateProdInoutStatus(id);
-
+        //更新审核人和审核日期
+        verificationMapper.updateAuditMsg(id,BaseContextHolder.getUserName());
         baseDTO.setId(id);
         baseDTO.setName(BillCodeSeq.VERIFICATION.getCaller());
         baseDTO.setCode(formData.getMain().getVc_code());

+ 3 - 3
applications/money/money-server/src/main/resources/mapper/VerificationMapper.xml

@@ -619,7 +619,7 @@
     select count(1) from periodsdetail where pd_detno = #{detno} and IFNULL(pd_status,0)=99
     and companyid= #{companyid}
   </select>
-  <select id="checkStatus" resultType="int">
-    select count(1) from Verification where ifnull(vc_statuscode,'')='AUDITED' and vc_id= #{id,jdbcType=INTEGER}
-  </select>
+  <update id="updateAuditMsg">
+    update verification set vc_auditman  = #{userName},vc_auditdate = NOW() where vc_id = #{id}
+  </update>
 </mapper>