Selaa lähdekoodia

Merge remote-tracking branch 'origin/master'

lizhenhao 2 vuotta sitten
vanhempi
commit
f4ce9f2418

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/domain/WorkContractBorrowMessage.java

@@ -20,6 +20,6 @@ public class WorkContractBorrowMessage extends BaseEntity {
 
     private String borrowType;
 
-    private String retureData;
+    private String retData;
 
 }

+ 4 - 3
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/domain/WorkContractInfo.java

@@ -18,6 +18,7 @@ public class WorkContractInfo extends BaseEntity {
     /**
      * 客户名称
      */
+    @Query(tableColumn = "a.client_name")
     private String clientName;
 
     /**
@@ -34,7 +35,7 @@ public class WorkContractInfo extends BaseEntity {
     /**
      * 签订日期
      */
-    @Query(tableColumn = "a.contractDate")
+    @Query(tableColumn = "a.contract_date")
     private String contractDate;
 
     /**
@@ -60,7 +61,7 @@ public class WorkContractInfo extends BaseEntity {
     /**
      * 合同金额
      */
-    @Query(tableColumn = "a.contractAmount")
+    @Query(tableColumn = "a.contract_amount")
     private String contractAmount;
 
     /**
@@ -131,7 +132,7 @@ public class WorkContractInfo extends BaseEntity {
     /**
      * 归档状态
      */
-    @Query(tableColumn = "b.filedType")
+    @Query(tableColumn = "d.filed_type")
     private String filedType;
 
     /**

+ 3 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/mapper/xml/WorkContractBorrowMapper.xml

@@ -17,7 +17,7 @@
 	<update id="updateMessageByBorrowId">
 		UPDATE work_contract_borrow_message SET borrow_type = #{borrowType}
 		 <if test="type != null and type != ''">
-			 ,reture_data = NOW()
+			 ,ret_data = NOW()
 		 </if>
 		 WHERE del_flag = 0 AND contract_borrow_id = #{id} order by create_date desc limit 1
 	</update>
@@ -41,7 +41,8 @@
 			DATE_FORMAT(borrow_data,'%Y-%m-%d') as borrow_data,
 			DATE_FORMAT(borrow_ret_data,'%Y-%m-%d') as borrow_ret_data,
 			borrow_type,
-			DATE_FORMAT(reture_data,'%Y-%m-%d') as reture_data
+			IFNULL(DATE_FORMAT( ret_data, '%Y-%m-%d' ),'--') AS ret_data
 		 FROM work_contract_borrow_message WHERE del_flag = 0 AND contract_borrow_id = #{id}
+		 order by create_date desc
 	</select>
 </mapper>

+ 6 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/mapper/xml/WorkContractFileMapper.xml

@@ -3,7 +3,12 @@
 <mapper namespace="com.jeeplus.test.workContract.mapper.WorkContractFileMapper">
 
 	<update id="updateStatusById">
-		UPDATE work_contract_file SET filed_type = #{filedType}, filed_data = NOW() WHERE del_flag = 0 AND contract_info_id = #{id}
+		UPDATE work_contract_file SET filed_type = #{filedType}, filed_data = NOW()
+		 <if test="filedType == '4'.toString()">
+		 	,proc_ins_id = null
+		 	,process_definition_id = null
+		 </if>
+		 WHERE del_flag = 0 AND contract_info_id = #{id}
 	</update>
 
 	<select id="selectFileByContractInfoId" resultType="com.jeeplus.test.workContract.domain.WorkContractFile">

+ 8 - 5
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/service/WorkContractBorrowService.java

@@ -31,9 +31,9 @@ public class WorkContractBorrowService {
 
     public String saveInfo(WorkContractBorrowDto workContractBorrowDto) throws Exception {
         if (StringUtils.isNotEmpty(workContractBorrowDto.getId())) {
-            WorkContractBorrow info = workContractBorrowMapper.selectFileByContractInfoId(workContractBorrowDto.getId());
+            WorkContractBorrow info = workContractBorrowMapper.selectById( workContractBorrowDto.getId());
             if (info != null) {
-                return update(workContractBorrowDto, info.getId());
+                return update(workContractBorrowDto, info.getContractInfoId());
             }
         }
         return add(workContractBorrowDto);
@@ -69,12 +69,12 @@ public class WorkContractBorrowService {
         UserDTO userDTO = UserUtils.getCurrentUserDTO();
         WorkContractBorrow borrow = new WorkContractBorrow();
         BeanUtils.copyProperties(workContractBorrowDto, borrow);
-        borrow.setId(id);
+        borrow.setContractInfoId(id);
         borrow.setUpdateBy(userDTO.getId());
         borrow.setUpdateDate(new Date());
         workContractBorrowMapper.updateById(borrow);
         //借用记录信息
-        this.saveMessage(workContractBorrowDto,id);
+        this.saveMessage(workContractBorrowDto, workContractBorrowDto.getId());
         return borrow.getContractInfoId();
     }
 
@@ -130,7 +130,10 @@ public class WorkContractBorrowService {
      */
     public void updateMessageByBorrowId(WorkContractBorrowDto workContractBorrowDto, String type) {
         if ("reture".equals(type)) {
-            workContractBorrowMapper.updateMessageByBorrowId(workContractBorrowDto.getId(), workContractBorrowDto.getBorrowType(), type);
+            WorkContractBorrow borrow = workContractBorrowMapper.selectFileByContractInfoId(workContractBorrowDto.getId());
+            if (borrow != null) {
+                workContractBorrowMapper.updateMessageByBorrowId(borrow.getId(), workContractBorrowDto.getBorrowType(), type);
+            }
         } else {
             workContractBorrowMapper.updateMessageByBorrowId(workContractBorrowDto.getId(), workContractBorrowDto.getBorrowType(), null);
         }

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/service/WorkContractFileService.java

@@ -76,7 +76,7 @@ public class WorkContractFileService {
         file.setUpdateBy(userDTO.getId());
         file.setUpdateDate(new Date());
         workContractFileMapper.updateById(file);
-        return file.getContractInfoId();
+        return file.getId();
     }
 
     /**

+ 0 - 3
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/service/WorkContractService.java

@@ -58,9 +58,6 @@ public class WorkContractService {
      */
     public IPage<WorkContractInfo> list(Page<WorkContractInfo> page, QueryWrapper<WorkContractInfo> queryWrapper, String clientName, String[] contractDates, String[] contractAmounts) {
         queryWrapper.eq("a.del_flag","0");
-        if (StringUtils.isNotEmpty(clientName)) {
-            queryWrapper.like("b.name", clientName);
-        }
         if (contractDates != null) {
             queryWrapper.between("a.contract_date", contractDates[0], contractDates[1]);
         }