Forráskód Böngészése

优化合同变更

java110 3 éve%!(EXTRA string=óta)
szülő
commit
51e6f2cc29

+ 18 - 0
java110-db/src/main/resources/mapper/store/ContractChangePlanServiceDaoImplMapper.xml

@@ -40,6 +40,15 @@
         <if test="contractId !=null and contractId != ''">
             and t.contract_id= #{contractId}
         </if>
+        <if test="contractName !=null and contractName != ''">
+            and ct.contract_name= #{contractName}
+        </if>
+        <if test="contractCode !=null and contractCode != ''">
+            and ct.contract_code= #{contractCode}
+        </if>
+        <if test="contractType !=null and contractType != ''">
+            and ct.contract_type= #{contractType}
+        </if>
         <if test="planId !=null and planId != ''">
             and t.plan_id= #{planId}
         </if>
@@ -117,6 +126,15 @@
         <if test="contractId !=null and contractId != ''">
             and t.contract_id= #{contractId}
         </if>
+        <if test="contractName !=null and contractName != ''">
+            and c.contract_name= #{contractName}
+        </if>
+        <if test="contractCode !=null and contractCode != ''">
+            and c.contract_code= #{contractCode}
+        </if>
+        <if test="contractType !=null and contractType != ''">
+            and c.contract_type= #{contractType}
+        </if>
         <if test="planId !=null and planId != ''">
             and t.plan_id= #{planId}
         </if>

+ 13 - 4
service-store/src/main/java/com/java110/store/api/ContractApi.java

@@ -66,7 +66,6 @@ import com.java110.store.bmo.contractTypeSpec.IUpdateContractTypeSpecBMO;
 import com.java110.store.bmo.contractTypeTemplate.*;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
-import com.java110.utils.util.DateUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
@@ -560,11 +559,17 @@ public class ContractApi {
      */
     @RequestMapping(value = "/queryContractType", method = RequestMethod.GET)
     public ResponseEntity<String> queryContractType(@RequestHeader(value = "store-id") String storeId,
+                                                    @RequestParam(value = "audit", required = false) String audit,
+                                                    @RequestParam(value = "typeName", required = false) String typeName,
+                                                    @RequestParam(value = "contractTypeId", required = false) String contractTypeId,
                                                     @RequestParam(value = "page") int page,
                                                     @RequestParam(value = "row") int row) {
         ContractTypeDto contractTypeDto = new ContractTypeDto();
         contractTypeDto.setPage(page);
         contractTypeDto.setRow(row);
+        contractTypeDto.setAudit(audit);
+        contractTypeDto.setTypeName(typeName);
+        contractTypeDto.setContractTypeId(contractTypeId);
         contractTypeDto.setStoreId(storeId);
         return getContractTypeBMOImpl.get(contractTypeDto);
     }
@@ -862,8 +867,8 @@ public class ContractApi {
                     roomInfo = rooms.getJSONObject(roomIndex);
                     contractChangePlanRoomPo = BeanConvertUtil.covertBean(roomInfo, ContractChangePlanRoomPo.class);
                     contractChangePlanRoomPo.setRoomName(roomInfo.getString("floorNum")
-                            +"-"+roomInfo.getString("unitNum")
-                            +"-"+roomInfo.getString("roomNum"));
+                            + "-" + roomInfo.getString("unitNum")
+                            + "-" + roomInfo.getString("roomNum"));
                     contractChangePlanRoomPos.add(contractChangePlanRoomPo);
                 }
             }
@@ -871,7 +876,7 @@ public class ContractApi {
 
         ContractChangePlanDetailPo contractChangePlanDetailPo = BeanConvertUtil.covertBean(reqJson, ContractChangePlanDetailPo.class);
         contractChangePlanDetailPo.setStoreId(storeId);
-        return saveContractChangePlanBMOImpl.save(contractChangePlanPo, contractChangePlanDetailPo,contractChangePlanRoomPos,reqJson);
+        return saveContractChangePlanBMOImpl.save(contractChangePlanPo, contractChangePlanDetailPo, contractChangePlanRoomPos, reqJson);
     }
 
     /**
@@ -929,6 +934,8 @@ public class ContractApi {
                                                           @RequestParam(value = "row") int row,
                                                           @RequestParam(value = "contractId", required = false) String contractId,
                                                           @RequestParam(value = "contractName", required = false) String contractName,
+                                                          @RequestParam(value = "contractCode", required = false) String contractCode,
+                                                          @RequestParam(value = "contractType", required = false) String contractType,
                                                           @RequestParam(value = "planId", required = false) String planId
     ) {
         ContractChangePlanDto contractChangePlanDto = new ContractChangePlanDto();
@@ -938,6 +945,8 @@ public class ContractApi {
         contractChangePlanDto.setContractId(contractId);
         contractChangePlanDto.setContractName(contractName);
         contractChangePlanDto.setPlanId(planId);
+        contractChangePlanDto.setContractCode(contractCode);
+        contractChangePlanDto.setContractType(contractType);
         return getContractChangePlanBMOImpl.get(contractChangePlanDto);
     }
 

+ 6 - 0
service-store/src/main/java/com/java110/store/api/ContractPartyaApi.java

@@ -105,12 +105,18 @@ public class ContractPartyaApi {
      */
     @RequestMapping(value = "/queryContractPartya", method = RequestMethod.GET)
     public ResponseEntity<String> queryContractPartya(@RequestHeader(value = "store-id") String storeId,
+                                                      @RequestParam(value = "partyA", required = false) String partyA,
+                                                      @RequestParam(value = "aContacts", required = false) String aContacts,
+                                                      @RequestParam(value = "aLink", required = false) String aLink,
                                                       @RequestParam(value = "page") int page,
                                                       @RequestParam(value = "row") int row) {
         ContractPartyaDto contractPartyaDto = new ContractPartyaDto();
         contractPartyaDto.setPage(page);
         contractPartyaDto.setRow(row);
         contractPartyaDto.setStoreId(storeId);
+        contractPartyaDto.setPartyA(partyA);
+        contractPartyaDto.setaContacts(aContacts);
+        contractPartyaDto.setaLink(aLink);
         return getContractPartyaBMOImpl.get(contractPartyaDto);
     }
 }