Просмотр исходного кода

Merge branch 'dev' of depot-qinghai/depot-business-qinghai into master

gdd 1 год назад
Родитель
Сommit
bb930bf4ea
51 измененных файлов с 6606 добавлено и 2922 удалено
  1. 4 2
      src/main/java/com/chinaitop/depot/DatePermissionInterceptor.java
  2. 0 1
      src/main/java/com/chinaitop/depot/act/controller/ActDynamicFormController.java
  3. 28 11
      src/main/java/com/chinaitop/depot/business/controller/BusinessContractController.java
  4. 2 2
      src/main/java/com/chinaitop/depot/business/controller/BusinessDeliveryStorageNoticeController.java
  5. 13 0
      src/main/java/com/chinaitop/depot/business/controller/audit/BusinessContractAuditController.java
  6. 372 237
      src/main/java/com/chinaitop/depot/business/mapper/BusinessContractMapper.xml
  7. 475 1157
      src/main/java/com/chinaitop/depot/business/model/BusinessContract.java
  8. 1834 1450
      src/main/java/com/chinaitop/depot/business/model/BusinessContractExample.java
  9. 2 2
      src/main/java/com/chinaitop/depot/business/service/BusinessContractService.java
  10. 16 11
      src/main/java/com/chinaitop/depot/business/service/impl/BusinessContractServiceImpl.java
  11. 3 6
      src/main/java/com/chinaitop/depot/business/service/impl/GrainContractServiceImpl.java
  12. 4 0
      src/main/java/com/chinaitop/depot/grainReserves/common/PageParam.java
  13. 1 1
      src/main/java/com/chinaitop/depot/grainReserves/mapper/BizGopsPlanMapper.java
  14. 3 2
      src/main/java/com/chinaitop/depot/grainReserves/mapper/BizGopsPlanMapper.xml
  15. 1 1
      src/main/java/com/chinaitop/depot/grainReserves/model/BizGopsPlan.java
  16. 2 2
      src/main/java/com/chinaitop/depot/grainReserves/model/BizGopsPlanPage.java
  17. 4 4
      src/main/java/com/chinaitop/depot/grainReserves/model/GopsPlanObject.java
  18. 1 1
      src/main/java/com/chinaitop/depot/grainReserves/service/BizGopsPlanService.java
  19. 152 0
      src/main/java/com/chinaitop/depot/pg/controller/BusinessPgGopsPlanController.java
  20. 36 0
      src/main/java/com/chinaitop/depot/pg/mapper/BusinessPgGopsPlanDetailMapper.java
  21. 350 0
      src/main/java/com/chinaitop/depot/pg/mapper/BusinessPgGopsPlanDetailMapper.xml
  22. 41 0
      src/main/java/com/chinaitop/depot/pg/mapper/BusinessPgGopsPlanMapper.java
  23. 467 0
      src/main/java/com/chinaitop/depot/pg/mapper/BusinessPgGopsPlanMapper.xml
  24. 97 0
      src/main/java/com/chinaitop/depot/pg/model/BusinessPgGopsPlan.java
  25. 70 0
      src/main/java/com/chinaitop/depot/pg/model/BusinessPgGopsPlanDetail.java
  26. 910 0
      src/main/java/com/chinaitop/depot/pg/model/BusinessPgGopsPlanDetailExample.java
  27. 1220 0
      src/main/java/com/chinaitop/depot/pg/model/BusinessPgGopsPlanExample.java
  28. 59 0
      src/main/java/com/chinaitop/depot/pg/model/vo/BusinessPgGopsPlanDetailVO.java
  29. 29 0
      src/main/java/com/chinaitop/depot/pg/model/vo/BusinessPgGopsPlanVO.java
  30. 68 0
      src/main/java/com/chinaitop/depot/pg/model/vo/DataCrkywCplspDefaultVO.java
  31. 32 0
      src/main/java/com/chinaitop/depot/pg/param/BusinessPgGopsPlanPageParam.java
  32. 16 0
      src/main/java/com/chinaitop/depot/pg/service/BusinessPgGopsPlanDetailService.java
  33. 55 0
      src/main/java/com/chinaitop/depot/pg/service/BusinessPgGopsPlanService.java
  34. 17 0
      src/main/java/com/chinaitop/depot/pg/service/impl/BusinessPgGopsPlanDetailServiceImpl.java
  35. 142 0
      src/main/java/com/chinaitop/depot/pg/service/impl/BusinessPgGopsPlanServiceImpl.java
  36. 16 0
      src/main/java/com/chinaitop/depot/rp/controller/BusinessRpReportController.java
  37. 0 1
      src/main/java/com/chinaitop/depot/rp/mapper/BusinessQcQualityInspectionMapper.java
  38. 1 1
      src/main/java/com/chinaitop/depot/rp/mapper/BusinessQcQualityInspectionMapper.xml
  39. 3 0
      src/main/java/com/chinaitop/depot/rp/mapper/BusinessRpBiweeklyReportMapper.xml
  40. 1 0
      src/main/java/com/chinaitop/depot/rp/mapper/BusinessRpInboundMapper.xml
  41. 5 1
      src/main/java/com/chinaitop/depot/rp/mapper/BusinessRpOutboundMapper.xml
  42. 6 2
      src/main/java/com/chinaitop/depot/rp/mapper/BusinessRpReportMapper.xml
  43. 3 12
      src/main/java/com/chinaitop/depot/rp/model/BusinessQcQualityInspection.java
  44. 2 0
      src/main/java/com/chinaitop/depot/rp/model/BusinessRpInbound.java
  45. 3 0
      src/main/java/com/chinaitop/depot/rp/model/BusinessRpOutbound.java
  46. 4 0
      src/main/java/com/chinaitop/depot/rp/param/BusinessRpBiweeklyReportPageParam.java
  47. 0 7
      src/main/java/com/chinaitop/depot/rp/param/BusinessRpReportPageParam.java
  48. 2 0
      src/main/java/com/chinaitop/depot/rp/service/BusinessRpReportService.java
  49. 30 8
      src/main/java/com/chinaitop/depot/rp/service/impl/BusinessRpReportServiceImpl.java
  50. 2 0
      src/main/resources/bootstrap-dev.yml
  51. 2 0
      src/main/resources/bootstrap-prod.yml

+ 4 - 2
src/main/java/com/chinaitop/depot/DatePermissionInterceptor.java

@@ -79,8 +79,10 @@ public class DatePermissionInterceptor implements Interceptor {
79 79
 						!"com.chinaitop.depot.business.mapper.BusinessDeliveryStorageNoticeMapper.selectByExample_COUNT".equals(mappedStatement.getId()) &&
80 80
 						!"com.chinaitop.depot.business.mapper.BusinessDeliveryStorageNoticeMapper.selectByExample".equals(mappedStatement.getId()) &&
81 81
 						!"com.chinaitop.depot.business.mapper.BusinessNoticeReceiveMapper.getUserRole_COUNT".equals(mappedStatement.getId()) &&
82
-						!"com.chinaitop.depot.business.mapper.BusinessMovelibraryMapper.selectList".equals(mappedStatement.getId())&&
83
-						!"com.chinaitop.depot.system.mapper.SysCodeMapper.selectByPrimaryKey".equals(mappedStatement.getId())
82
+						!"com.chinaitop.depot.business.mapper.BusinessMovelibraryMapper.selectList".equals(mappedStatement.getId()) &&
83
+						!"com.chinaitop.depot.system.mapper.SysCodeMapper.selectByPrimaryKey".equals(mappedStatement.getId()) &&
84
+						!"com.chinaitop.depot.rp.mapper.BusinessRpReportMapper.selectRecListByPageParam".equals(mappedStatement.getId()) &&
85
+						!"com.chinaitop.depot.rp.mapper.BusinessRpReportMapper.selectByPageParam".equals(mappedStatement.getId())
84 86
 						){
85 87
 					//解析sql中的表名
86 88
 					Statement statement = CCJSqlParserUtil.parse(bouString);

+ 0 - 1
src/main/java/com/chinaitop/depot/act/controller/ActDynamicFormController.java

@@ -7,7 +7,6 @@ import java.util.HashMap;
7 7
 import java.util.List;
8 8
 import java.util.Map;
9 9
 import java.util.Map.Entry;
10
-import javax.annotation.Resource;
11 10
 import javax.servlet.http.HttpServletRequest;
12 11
 import org.activiti.engine.FormService;
13 12
 import org.activiti.engine.HistoryService;

+ 28 - 11
src/main/java/com/chinaitop/depot/business/controller/BusinessContractController.java

@@ -2,22 +2,26 @@ package com.chinaitop.depot.business.controller;
2 2
 
3 3
 
4 4
 import java.io.IOException;
5
-import java.text.SimpleDateFormat;
6 5
 import java.util.HashMap;
7 6
 import java.util.List;
8 7
 import java.util.Map;
8
+import java.lang.reflect.InvocationTargetException;
9
+import java.lang.reflect.Method;
10
+
9 11
 
10 12
 import javax.annotation.Resource;
11 13
 import javax.servlet.http.HttpServletRequest;
12 14
 
13
-import org.apache.commons.lang.ObjectUtils;
14 15
 import org.apache.commons.lang3.StringUtils;
15 16
 import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.beans.factory.annotation.Value;
16 18
 import org.springframework.http.MediaType;
17 19
 import org.springframework.web.bind.annotation.RequestMapping;
18 20
 import org.springframework.web.bind.annotation.RequestMethod;
19 21
 import org.springframework.web.bind.annotation.RestController;
22
+import org.springframework.web.client.RestTemplate;
20 23
 
24
+import com.alibaba.fastjson.JSON;
21 25
 import com.chinaitop.depot.act.service.ActTaskService;
22 26
 import com.chinaitop.depot.business.model.BusinessContract;
23 27
 import com.chinaitop.depot.business.model.BusinessContractExample;
@@ -64,6 +68,12 @@ public class BusinessContractController {
64 68
     @Autowired
65 69
     private BusinessDeliveryStorageNoticeService businessNoticeService;
66 70
     
71
+    @Autowired
72
+    private RestTemplate restTemplate;
73
+    
74
+    @Value("${customerUrl}")
75
+    private String customerUrl;
76
+    
67 77
     /**
68 78
      * 合同申请列表.
69 79
      * @param pageNum 页码
@@ -242,14 +252,21 @@ public class BusinessContractController {
242 252
 		@ApiImplicitParam(name = "id", value = "合同id", paramType = "query")
243 253
 	})
244 254
     public Map<String, Object> edit(Integer id) {
245
-        Map<String, Object> modelMap = new HashMap<String, Object>();
255
+        Map<String, Object> returnMap = new HashMap<String, Object>();
256
+        
246 257
         if (id != null) {
258
+        	
247 259
             BusinessContract contract = contractService.findById(id);
248
-            modelMap.put("contract", contract);
249
-            List<BusinessFile> fileList= businessFileService.getByBid(id, "contract", null, null);
250
-            modelMap.put("fileList", fileList);
260
+            returnMap.put("contract", contract);
261
+            
262
+            Map<String,Integer> paramMap = new HashMap<String, Integer>();
263
+            paramMap.put("id", contract.getCustomerBid());
264
+            
265
+            Object forObject =  restTemplate.getForEntity(customerUrl+""+contract.getCustomerBid(), Object.class);
266
+            returnMap.put("customer",forObject);
267
+            
251 268
         }
252
-        return modelMap;
269
+        return returnMap;
253 270
     }
254 271
     
255 272
     /**
@@ -520,7 +537,7 @@ public class BusinessContractController {
520 537
     	@ApiImplicitParam(name="depotInfoOrgId", value="当前登录人的组织id", paramType="form")
521 538
     })
522 539
     public Map<String, Object> save(String contractJson, String businessStoreWareDetailJson,
523
-            HttpServletRequest request,Integer userId,String realName,Integer depotInfoOrgId,String fileIds, String deleteFileIds) 
540
+            HttpServletRequest request,Integer userId,String realName,Integer depotInfoOrgId) 
524 541
             throws JsonParseException, JsonMappingException, IOException {
525 542
         Map<String, Object> modelMap = new HashMap<String, Object>();
526 543
     	/*UserInfo userInfo= (UserInfo) request.getSession().getAttribute("userInfo");
@@ -541,7 +558,7 @@ public class BusinessContractController {
541 558
                 storeWareDetailList = (List<BusinessStoreWareDetail>)mapper.readValue(businessStoreWareDetailJson, new TypeReference<List<BusinessStoreWareDetail>>(){});
542 559
             }
543 560
             if (contract.getId() == null) {
544
-                Map<String, Object> returnMap = contractService.add(contract, storeWareDetailList,  userId, realName, depotInfoOrgId,fileIds);
561
+                Map<String, Object> returnMap = contractService.add(contract, storeWareDetailList,  userId, realName, depotInfoOrgId);
545 562
                 if (returnMap != null && returnMap.get("error") != null) {
546 563
                     modelMap.put("status", "error");
547 564
                     modelMap.put("msg", returnMap.get("error"));
@@ -549,7 +566,7 @@ public class BusinessContractController {
549 566
                 }
550 567
                 modelMap.put("id", returnMap.get("id"));
551 568
             } else {
552
-                contractService.update(contract, storeWareDetailList,fileIds,deleteFileIds);
569
+                contractService.update(contract, storeWareDetailList);
553 570
             }
554 571
             modelMap.put("status", "success");
555 572
         } catch (Exception e) {
@@ -670,7 +687,7 @@ public class BusinessContractController {
670 687
             if (contract.getId() == null) {
671 688
                 throw new RuntimeException("合同id为空,保存失败!");
672 689
             } else {
673
-                contractService.update(contract, storeWareDetailList,fileIds,deleteFileIds);
690
+                contractService.update(contract, storeWareDetailList);
674 691
             }
675 692
             modelMap.put("status", "success");
676 693
         } catch (Exception e) {

+ 2 - 2
src/main/java/com/chinaitop/depot/business/controller/BusinessDeliveryStorageNoticeController.java

@@ -315,12 +315,12 @@ public class BusinessDeliveryStorageNoticeController {
315 315
             if (businessStoreWareDetailJson != null) {
316 316
                 storeWareDetailList = (List<BusinessStoreWareDetail>)mapper.readValue(businessStoreWareDetailJson, new TypeReference<List<BusinessStoreWareDetail>>(){});
317 317
                 
318
-                 //通知单的明细 库点名称都是一样的,所以取第一个
318
+                 /*//通知单的明细 库点名称都是一样的,所以取第一个
319 319
 					if(storeWareDetailList.get(0).getState() != storeWareDetailList.get(0).getOrgId()){ //代储库的
320 320
 						businessDeliveryStorageNotice.setHouseId(storeWareDetailList.get(0).getState());
321 321
 					}else{
322 322
 						businessDeliveryStorageNotice.setHouseId(storeWareDetailList.get(0).getOrgId());
323
-					}
323
+					}*/
324 324
             
325 325
             }
326 326
             

+ 13 - 0
src/main/java/com/chinaitop/depot/business/controller/audit/BusinessContractAuditController.java

@@ -9,10 +9,12 @@ import javax.annotation.Resource;
9 9
 import javax.servlet.http.HttpServletRequest;
10 10
 
11 11
 import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.beans.factory.annotation.Value;
12 13
 import org.springframework.http.MediaType;
13 14
 import org.springframework.web.bind.annotation.RequestMapping;
14 15
 import org.springframework.web.bind.annotation.RequestMethod;
15 16
 import org.springframework.web.bind.annotation.RestController;
17
+import org.springframework.web.client.RestTemplate;
16 18
 
17 19
 import com.chinaitop.depot.act.model.HistoryList;
18 20
 import com.chinaitop.depot.act.service.ActTaskService;
@@ -58,6 +60,12 @@ public class BusinessContractAuditController {
58 60
     @Autowired
59 61
     private BusinessFileService businessFileService;
60 62
     
63
+    @Autowired
64
+    private RestTemplate restTemplate;
65
+    
66
+    @Value("${customerUrl}")
67
+    private String customerUrl;
68
+    
61 69
     /**
62 70
      * 获取审批列表.
63 71
      * @param pageNum  页码
@@ -147,6 +155,11 @@ public class BusinessContractAuditController {
147 155
         Map<String, Object> modelMap = new HashMap<String, Object>();
148 156
         BusinessContract contract = businessContractService.findById(id);
149 157
         modelMap.put("contract", contract);
158
+        
159
+        //客户
160
+        Object forObject =  restTemplate.getForEntity(customerUrl+""+contract.getCustomerBid(), Object.class);
161
+        modelMap.put("customer",forObject);
162
+        
150 163
        // 获取对应的文件.
151 164
         List<BusinessFile> fileList= businessFileService.getByBid(id,"contract", null, null);
152 165
         

+ 372 - 237
src/main/java/com/chinaitop/depot/business/mapper/BusinessContractMapper.xml

@@ -7,7 +7,7 @@
7 7
       This element is automatically generated by MyBatis Generator, do not modify.
8 8
       This element was generated on Mon Jun 29 19:30:27 CST 2020.
9 9
     -->
10
-    <id column="id" property="id" jdbcType="INTEGER" />
10
+    <!-- <id column="id" property="id" jdbcType="INTEGER" />
11 11
     <result column="contract_number" property="contractNumber" jdbcType="VARCHAR" />
12 12
     <result column="contract_title" property="contractTitle" jdbcType="VARCHAR" />
13 13
     <result column="customer_id" property="customerId" jdbcType="VARCHAR" />
@@ -63,7 +63,72 @@
63 63
     <result column="lybzj" property="lybzj" jdbcType="VARCHAR" />
64 64
     <result column="khqyr" property="khqyr" jdbcType="VARCHAR" />
65 65
     <result column="bfkhh" property="bfkhh" jdbcType="VARCHAR" />
66
+    <result column="bfzh" property="bfzh" jdbcType="VARCHAR" /> -->
67
+    
68
+    <id column="id" property="id" jdbcType="INTEGER" />
69
+    <result column="contract_number" property="contractNumber" jdbcType="VARCHAR" />
70
+    <result column="plan_bid" property="planBid" jdbcType="INTEGER" />
71
+    <result column="contract_title" property="contractTitle" jdbcType="VARCHAR" />
72
+    <result column="contract_type" property="contractType" jdbcType="INTEGER" />
73
+    <result column="signing_time" property="signingTime" jdbcType="DATE" />
74
+    <result column="qddd" property="qddd" jdbcType="VARCHAR" />
75
+    <result column="money_quantity" property="moneyQuantity" jdbcType="VARCHAR" />
76
+    <result column="lybzj" property="lybzj" jdbcType="VARCHAR" />
77
+    <result column="customer_bid" property="customerBid" jdbcType="INTEGER" />
78
+    <result column="grain_quantity" property="grainQuantity" jdbcType="DECIMAL" />
79
+    <result column="customer_id" property="customerId" jdbcType="VARCHAR" />
80
+    <result column="customer_number" property="customerNumber" jdbcType="VARCHAR" />
81
+    <result column="customer_name" property="customerName" jdbcType="VARCHAR" />
82
+    <result column="signing_man" property="signingMan" jdbcType="VARCHAR" />
83
+    <result column="enable_date" property="enableDate" jdbcType="TIMESTAMP" />
84
+    <result column="performance_quantity" property="performanceQuantity" jdbcType="DECIMAL" />
85
+    <result column="performance_rate" property="performanceRate" jdbcType="DECIMAL" />
86
+    <result column="settle_contract_uniformity" property="settleContractUniformity" jdbcType="TINYINT" />
87
+    <result column="settle_contract_uniformity_reason" property="settleContractUniformityReason" jdbcType="VARCHAR" />
88
+    <result column="sign_comple_time" property="signCompleTime" jdbcType="TIMESTAMP" />
89
+    <result column="purchase_unit" property="purchaseUnit" jdbcType="VARCHAR" />
90
+    <result column="disable_date" property="disableDate" jdbcType="TIMESTAMP" />
91
+    <result column="original_contract" property="originalContract" jdbcType="VARCHAR" />
92
+    <result column="original_contract_bid" property="originalContractBid" jdbcType="INTEGER" />
93
+    <result column="root_contract_bid" property="rootContractBid" jdbcType="INTEGER" />
94
+    <result column="shipping_type" property="shippingType" jdbcType="INTEGER" />
95
+    <result column="contract_pay_type" property="contractPayType" jdbcType="INTEGER" />
96
+    <result column="finished_quantity" property="finishedQuantity" jdbcType="VARCHAR" />
97
+    <result column="money_of_finished_quantity" property="moneyOfFinishedQuantity" jdbcType="VARCHAR" />
98
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
99
+    <result column="plant_acreage" property="plantAcreage" jdbcType="VARCHAR" />
100
+    <result column="plan_number" property="planNumber" jdbcType="VARCHAR" />
101
+    <result column="mobile" property="mobile" jdbcType="VARCHAR" />
102
+    <result column="bank_name" property="bankName" jdbcType="VARCHAR" />
103
+    <result column="account_name" property="accountName" jdbcType="VARCHAR" />
104
+    <result column="account_number" property="accountNumber" jdbcType="VARCHAR" />
105
+    <result column="breach_liability" property="breachLiability" jdbcType="VARCHAR" />
106
+    <result column="dissolution_conditions" property="dissolutionConditions" jdbcType="VARCHAR" />
107
+    <result column="identification" property="identification" jdbcType="VARCHAR" />
108
+    <result column="khqyr" property="khqyr" jdbcType="VARCHAR" />
109
+    <result column="bfkhh" property="bfkhh" jdbcType="VARCHAR" />
66 110
     <result column="bfzh" property="bfzh" jdbcType="VARCHAR" />
111
+    <result column="dispute_settlement_method" property="disputeSettlementMethod" jdbcType="VARCHAR" />
112
+    <result column="change_record_flag" property="changeRecordFlag" jdbcType="VARCHAR" />
113
+    <result column="change_reason" property="changeReason" jdbcType="VARCHAR" />
114
+    <result column="change_time" property="changeTime" jdbcType="TIMESTAMP" />
115
+    <result column="change_content" property="changeContent" jdbcType="VARCHAR" />
116
+    <result column="changing" property="changing" jdbcType="VARCHAR" />
117
+    <result column="audit_state" property="auditState" jdbcType="VARCHAR" />
118
+    <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
119
+    <result column="process_definition_id" property="processDefinitionId" jdbcType="VARCHAR" />
120
+    <result column="agree_time" property="agreeTime" jdbcType="TIMESTAMP" />
121
+    <result column="create_man" property="createMan" jdbcType="VARCHAR" />
122
+    <result column="creater" property="creater" jdbcType="VARCHAR" />
123
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
124
+    <result column="create_unit" property="createUnit" jdbcType="VARCHAR" />
125
+    <result column="create_depot" property="createDepot" jdbcType="VARCHAR" />
126
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
127
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
128
+    <result column="in_application" property="inApplication" jdbcType="INTEGER" />
129
+    <result column="creater_id" property="createrId" jdbcType="INTEGER" />
130
+    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
131
+    <result column="attachment" property="attachment" jdbcType="VARCHAR" />
67 132
     
68 133
   </resultMap>
69 134
   <sql id="Example_Where_Clause" >
@@ -140,16 +205,18 @@
140 205
       This element is automatically generated by MyBatis Generator, do not modify.
141 206
       This element was generated on Mon Jun 29 19:30:27 CST 2020.
142 207
     -->
143
-    id, contract_number, contract_title, customer_id, customer_bid, customer_number, 
144
-    customer_name, grain_quantity, money_quantity, signing_man, signing_time, enable_date, 
145
-    disable_date, contract_type, original_contract, original_contract_bid, root_contract_bid, 
208
+    id, contract_number, plan_bid, contract_title, contract_type, signing_time, qddd, 
209
+    money_quantity, lybzj, customer_bid, grain_quantity, customer_id, customer_number, 
210
+    customer_name, signing_man, enable_date, performance_quantity, performance_rate, 
211
+    settle_contract_uniformity, settle_contract_uniformity_reason, sign_comple_time, 
212
+    purchase_unit, disable_date, original_contract, original_contract_bid, root_contract_bid, 
146 213
     shipping_type, contract_pay_type, finished_quantity, money_of_finished_quantity, 
147 214
     remark, plant_acreage, plan_number, mobile, bank_name, account_name, account_number, 
148
-    breach_liability, dissolution_conditions, dispute_settlement_method, change_record_flag, 
149
-    change_reason, change_time, change_content, changing, plan_bid, audit_state, process_instance_id, 
150
-    process_definition_id, agree_time, create_man, creater, create_time, create_unit, 
151
-    create_depot, update_time, org_id, in_application, creater_id, identification, updatetime, 
152
-    qddd, lybzj, khqyr, bfkhh, bfzh
215
+    breach_liability, dissolution_conditions, identification, khqyr, bfkhh, bfzh, dispute_settlement_method, 
216
+    change_record_flag, change_reason, change_time, change_content, changing, audit_state, 
217
+    process_instance_id, process_definition_id, agree_time, create_man, creater, create_time, 
218
+    create_unit, create_depot, update_time, org_id, in_application, creater_id, updatetime, 
219
+    attachment
153 220
   </sql>
154 221
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessContractExample" >
155 222
     <!--
@@ -202,58 +269,54 @@
202 269
     </if>
203 270
   </delete>
204 271
   <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.business.model.BusinessContract" >
205
-    <!--
206
-      WARNING - @mbggenerated
207
-      This element is automatically generated by MyBatis Generator, do not modify.
208
-      This element was generated on Mon Jun 29 19:30:27 CST 2020.
209
-    -->
210
-    insert into business_contract (id, contract_number, contract_title, 
211
-      customer_id, customer_bid, customer_number, 
212
-      customer_name, grain_quantity, money_quantity, 
213
-      signing_man, signing_time, enable_date, 
214
-      disable_date, contract_type, original_contract, 
215
-      original_contract_bid, root_contract_bid, shipping_type, 
216
-      contract_pay_type, finished_quantity, money_of_finished_quantity, 
272
+    insert into business_contract (id, contract_number, plan_bid, 
273
+      contract_title, contract_type, signing_time, 
274
+      qddd, money_quantity, lybzj, 
275
+      customer_bid, grain_quantity, customer_id, 
276
+      customer_number, customer_name, signing_man, 
277
+      enable_date, performance_quantity, performance_rate, 
278
+      settle_contract_uniformity, settle_contract_uniformity_reason, 
279
+      sign_comple_time, purchase_unit, disable_date, 
280
+      original_contract, original_contract_bid, 
281
+      root_contract_bid, shipping_type, contract_pay_type, 
282
+      finished_quantity, money_of_finished_quantity, 
217 283
       remark, plant_acreage, plan_number, 
218 284
       mobile, bank_name, account_name, 
219 285
       account_number, breach_liability, dissolution_conditions, 
220
-      dispute_settlement_method, change_record_flag, 
286
+      identification, khqyr, bfkhh, 
287
+      bfzh, dispute_settlement_method, change_record_flag, 
221 288
       change_reason, change_time, change_content, 
222
-      changing, plan_bid, audit_state, 
223
-      process_instance_id, process_definition_id, 
224
-      agree_time, create_man, creater, 
225
-      create_time, create_unit, create_depot, 
226
-      update_time, org_id, in_application, 
227
-      creater_id, identification, updatetime, 
228
-      qddd, lybzj, khqyr, 
229
-      bfkhh, bfzh)
230
-    values (#{id,jdbcType=INTEGER}, #{contractNumber,jdbcType=VARCHAR}, #{contractTitle,jdbcType=VARCHAR}, 
231
-      #{customerId,jdbcType=VARCHAR}, #{customerBid,jdbcType=INTEGER}, #{customerNumber,jdbcType=VARCHAR}, 
232
-      #{customerName,jdbcType=VARCHAR}, #{grainQuantity,jdbcType=VARCHAR}, #{moneyQuantity,jdbcType=VARCHAR}, 
233
-      #{signingMan,jdbcType=VARCHAR}, #{signingTime,jdbcType=TIMESTAMP}, #{enableDate,jdbcType=TIMESTAMP}, 
234
-      #{disableDate,jdbcType=TIMESTAMP}, #{contractType,jdbcType=INTEGER}, #{originalContract,jdbcType=VARCHAR}, 
235
-      #{originalContractBid,jdbcType=INTEGER}, #{rootContractBid,jdbcType=INTEGER}, #{shippingType,jdbcType=INTEGER}, 
236
-      #{contractPayType,jdbcType=INTEGER}, #{finishedQuantity,jdbcType=VARCHAR}, #{moneyOfFinishedQuantity,jdbcType=VARCHAR}, 
289
+      changing, audit_state, process_instance_id, 
290
+      process_definition_id, agree_time, create_man, 
291
+      creater, create_time, create_unit, 
292
+      create_depot, update_time, org_id, 
293
+      in_application, creater_id, updatetime, 
294
+      attachment)
295
+    values (#{id,jdbcType=INTEGER}, #{contractNumber,jdbcType=VARCHAR}, #{planBid,jdbcType=INTEGER}, 
296
+      #{contractTitle,jdbcType=VARCHAR}, #{contractType,jdbcType=INTEGER}, #{signingTime,jdbcType=DATE}, 
297
+      #{qddd,jdbcType=VARCHAR}, #{moneyQuantity,jdbcType=VARCHAR}, #{lybzj,jdbcType=VARCHAR}, 
298
+      #{customerBid,jdbcType=INTEGER}, #{grainQuantity,jdbcType=DECIMAL}, #{customerId,jdbcType=VARCHAR}, 
299
+      #{customerNumber,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, #{signingMan,jdbcType=VARCHAR}, 
300
+      #{enableDate,jdbcType=TIMESTAMP}, #{performanceQuantity,jdbcType=DECIMAL}, #{performanceRate,jdbcType=DECIMAL}, 
301
+      #{settleContractUniformity,jdbcType=TINYINT}, #{settleContractUniformityReason,jdbcType=VARCHAR}, 
302
+      #{signCompleTime,jdbcType=TIMESTAMP}, #{purchaseUnit,jdbcType=VARCHAR}, #{disableDate,jdbcType=TIMESTAMP}, 
303
+      #{originalContract,jdbcType=VARCHAR}, #{originalContractBid,jdbcType=INTEGER}, 
304
+      #{rootContractBid,jdbcType=INTEGER}, #{shippingType,jdbcType=INTEGER}, #{contractPayType,jdbcType=INTEGER}, 
305
+      #{finishedQuantity,jdbcType=VARCHAR}, #{moneyOfFinishedQuantity,jdbcType=VARCHAR}, 
237 306
       #{remark,jdbcType=VARCHAR}, #{plantAcreage,jdbcType=VARCHAR}, #{planNumber,jdbcType=VARCHAR}, 
238 307
       #{mobile,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{accountName,jdbcType=VARCHAR}, 
239 308
       #{accountNumber,jdbcType=VARCHAR}, #{breachLiability,jdbcType=VARCHAR}, #{dissolutionConditions,jdbcType=VARCHAR}, 
240
-      #{disputeSettlementMethod,jdbcType=VARCHAR}, #{changeRecordFlag,jdbcType=VARCHAR}, 
309
+      #{identification,jdbcType=VARCHAR}, #{khqyr,jdbcType=VARCHAR}, #{bfkhh,jdbcType=VARCHAR}, 
310
+      #{bfzh,jdbcType=VARCHAR}, #{disputeSettlementMethod,jdbcType=VARCHAR}, #{changeRecordFlag,jdbcType=VARCHAR}, 
241 311
       #{changeReason,jdbcType=VARCHAR}, #{changeTime,jdbcType=TIMESTAMP}, #{changeContent,jdbcType=VARCHAR}, 
242
-      #{changing,jdbcType=VARCHAR}, #{planBid,jdbcType=INTEGER}, #{auditState,jdbcType=VARCHAR}, 
243
-      #{processInstanceId,jdbcType=VARCHAR}, #{processDefinitionId,jdbcType=VARCHAR}, 
244
-      #{agreeTime,jdbcType=TIMESTAMP}, #{createMan,jdbcType=VARCHAR}, #{creater,jdbcType=VARCHAR}, 
245
-      #{createTime,jdbcType=TIMESTAMP}, #{createUnit,jdbcType=VARCHAR}, #{createDepot,jdbcType=VARCHAR}, 
246
-      #{updateTime,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER}, #{inApplication,jdbcType=INTEGER}, 
247
-      #{createrId,jdbcType=INTEGER}, #{identification,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}, 
248
-      #{qddd,jdbcType=VARCHAR}, #{lybzj,jdbcType=VARCHAR}, #{khqyr,jdbcType=VARCHAR}, 
249
-      #{bfkhh,jdbcType=VARCHAR}, #{bfzh,jdbcType=VARCHAR})
312
+      #{changing,jdbcType=VARCHAR}, #{auditState,jdbcType=VARCHAR}, #{processInstanceId,jdbcType=VARCHAR}, 
313
+      #{processDefinitionId,jdbcType=VARCHAR}, #{agreeTime,jdbcType=TIMESTAMP}, #{createMan,jdbcType=VARCHAR}, 
314
+      #{creater,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUnit,jdbcType=VARCHAR}, 
315
+      #{createDepot,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER}, 
316
+      #{inApplication,jdbcType=INTEGER}, #{createrId,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, 
317
+      #{attachment,jdbcType=VARCHAR})
250 318
   </insert>
251 319
   <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessContract" >
252
-    <!--
253
-      WARNING - @mbggenerated
254
-      This element is automatically generated by MyBatis Generator, do not modify.
255
-      This element was generated on Mon Jun 29 19:30:27 CST 2020.
256
-    -->
257 320
     insert into business_contract
258 321
     <trim prefix="(" suffix=")" suffixOverrides="," >
259 322
       <if test="id != null" >
@@ -262,42 +325,69 @@
262 325
       <if test="contractNumber != null" >
263 326
         contract_number,
264 327
       </if>
328
+      <if test="planBid != null" >
329
+        plan_bid,
330
+      </if>
265 331
       <if test="contractTitle != null" >
266 332
         contract_title,
267 333
       </if>
268
-      <if test="customerId != null" >
269
-        customer_id,
334
+      <if test="contractType != null" >
335
+        contract_type,
336
+      </if>
337
+      <if test="signingTime != null" >
338
+        signing_time,
339
+      </if>
340
+      <if test="qddd != null" >
341
+        qddd,
342
+      </if>
343
+      <if test="moneyQuantity != null" >
344
+        money_quantity,
345
+      </if>
346
+      <if test="lybzj != null" >
347
+        lybzj,
270 348
       </if>
271 349
       <if test="customerBid != null" >
272 350
         customer_bid,
273 351
       </if>
352
+      <if test="grainQuantity != null" >
353
+        grain_quantity,
354
+      </if>
355
+      <if test="customerId != null" >
356
+        customer_id,
357
+      </if>
274 358
       <if test="customerNumber != null" >
275 359
         customer_number,
276 360
       </if>
277 361
       <if test="customerName != null" >
278 362
         customer_name,
279 363
       </if>
280
-      <if test="grainQuantity != null" >
281
-        grain_quantity,
282
-      </if>
283
-      <if test="moneyQuantity != null" >
284
-        money_quantity,
285
-      </if>
286 364
       <if test="signingMan != null" >
287 365
         signing_man,
288 366
       </if>
289
-      <if test="signingTime != null" >
290
-        signing_time,
291
-      </if>
292 367
       <if test="enableDate != null" >
293 368
         enable_date,
294 369
       </if>
370
+      <if test="performanceQuantity != null" >
371
+        performance_quantity,
372
+      </if>
373
+      <if test="performanceRate != null" >
374
+        performance_rate,
375
+      </if>
376
+      <if test="settleContractUniformity != null" >
377
+        settle_contract_uniformity,
378
+      </if>
379
+      <if test="settleContractUniformityReason != null" >
380
+        settle_contract_uniformity_reason,
381
+      </if>
382
+      <if test="signCompleTime != null" >
383
+        sign_comple_time,
384
+      </if>
385
+      <if test="purchaseUnit != null" >
386
+        purchase_unit,
387
+      </if>
295 388
       <if test="disableDate != null" >
296 389
         disable_date,
297 390
       </if>
298
-      <if test="contractType != null" >
299
-        contract_type,
300
-      </if>
301 391
       <if test="originalContract != null" >
302 392
         original_contract,
303 393
       </if>
@@ -346,6 +436,18 @@
346 436
       <if test="dissolutionConditions != null" >
347 437
         dissolution_conditions,
348 438
       </if>
439
+      <if test="identification != null" >
440
+        identification,
441
+      </if>
442
+      <if test="khqyr != null" >
443
+        khqyr,
444
+      </if>
445
+      <if test="bfkhh != null" >
446
+        bfkhh,
447
+      </if>
448
+      <if test="bfzh != null" >
449
+        bfzh,
450
+      </if>
349 451
       <if test="disputeSettlementMethod != null" >
350 452
         dispute_settlement_method,
351 453
       </if>
@@ -364,9 +466,6 @@
364 466
       <if test="changing != null" >
365 467
         changing,
366 468
       </if>
367
-      <if test="planBid != null" >
368
-        plan_bid,
369
-      </if>
370 469
       <if test="auditState != null" >
371 470
         audit_state,
372 471
       </if>
@@ -406,28 +505,12 @@
406 505
       <if test="createrId != null" >
407 506
         creater_id,
408 507
       </if>
409
-      <if test="identification != null" >
410
-        identification,
411
-      </if>
412 508
       <if test="updatetime != null" >
413 509
         updatetime,
414 510
       </if>
415
-      <if test="qddd != null" >
416
-        qddd,
511
+      <if test="attachment != null" >
512
+        attachment,
417 513
       </if>
418
-      <if test="lybzj != null" >
419
-        lybzj,
420
-      </if>
421
-      <if test="khqyr != null" >
422
-        khqyr,
423
-      </if>
424
-      <if test="bfkhh != null" >
425
-        bfkhh,
426
-      </if>
427
-      <if test="bfzh != null" >
428
-        bfzh,
429
-      </if>
430
-      
431 514
     </trim>
432 515
     <trim prefix="values (" suffix=")" suffixOverrides="," >
433 516
       <if test="id != null" >
@@ -436,42 +519,69 @@
436 519
       <if test="contractNumber != null" >
437 520
         #{contractNumber,jdbcType=VARCHAR},
438 521
       </if>
522
+      <if test="planBid != null" >
523
+        #{planBid,jdbcType=INTEGER},
524
+      </if>
439 525
       <if test="contractTitle != null" >
440 526
         #{contractTitle,jdbcType=VARCHAR},
441 527
       </if>
442
-      <if test="customerId != null" >
443
-        #{customerId,jdbcType=VARCHAR},
528
+      <if test="contractType != null" >
529
+        #{contractType,jdbcType=INTEGER},
530
+      </if>
531
+      <if test="signingTime != null" >
532
+        #{signingTime,jdbcType=DATE},
533
+      </if>
534
+      <if test="qddd != null" >
535
+        #{qddd,jdbcType=VARCHAR},
536
+      </if>
537
+      <if test="moneyQuantity != null" >
538
+        #{moneyQuantity,jdbcType=VARCHAR},
539
+      </if>
540
+      <if test="lybzj != null" >
541
+        #{lybzj,jdbcType=VARCHAR},
444 542
       </if>
445 543
       <if test="customerBid != null" >
446 544
         #{customerBid,jdbcType=INTEGER},
447 545
       </if>
546
+      <if test="grainQuantity != null" >
547
+        #{grainQuantity,jdbcType=DECIMAL},
548
+      </if>
549
+      <if test="customerId != null" >
550
+        #{customerId,jdbcType=VARCHAR},
551
+      </if>
448 552
       <if test="customerNumber != null" >
449 553
         #{customerNumber,jdbcType=VARCHAR},
450 554
       </if>
451 555
       <if test="customerName != null" >
452 556
         #{customerName,jdbcType=VARCHAR},
453 557
       </if>
454
-      <if test="grainQuantity != null" >
455
-        #{grainQuantity,jdbcType=VARCHAR},
456
-      </if>
457
-      <if test="moneyQuantity != null" >
458
-        #{moneyQuantity,jdbcType=VARCHAR},
459
-      </if>
460 558
       <if test="signingMan != null" >
461 559
         #{signingMan,jdbcType=VARCHAR},
462 560
       </if>
463
-      <if test="signingTime != null" >
464
-        #{signingTime,jdbcType=TIMESTAMP},
465
-      </if>
466 561
       <if test="enableDate != null" >
467 562
         #{enableDate,jdbcType=TIMESTAMP},
468 563
       </if>
564
+      <if test="performanceQuantity != null" >
565
+        #{performanceQuantity,jdbcType=DECIMAL},
566
+      </if>
567
+      <if test="performanceRate != null" >
568
+        #{performanceRate,jdbcType=DECIMAL},
569
+      </if>
570
+      <if test="settleContractUniformity != null" >
571
+        #{settleContractUniformity,jdbcType=TINYINT},
572
+      </if>
573
+      <if test="settleContractUniformityReason != null" >
574
+        #{settleContractUniformityReason,jdbcType=VARCHAR},
575
+      </if>
576
+      <if test="signCompleTime != null" >
577
+        #{signCompleTime,jdbcType=TIMESTAMP},
578
+      </if>
579
+      <if test="purchaseUnit != null" >
580
+        #{purchaseUnit,jdbcType=VARCHAR},
581
+      </if>
469 582
       <if test="disableDate != null" >
470 583
         #{disableDate,jdbcType=TIMESTAMP},
471 584
       </if>
472
-      <if test="contractType != null" >
473
-        #{contractType,jdbcType=INTEGER},
474
-      </if>
475 585
       <if test="originalContract != null" >
476 586
         #{originalContract,jdbcType=VARCHAR},
477 587
       </if>
@@ -520,6 +630,18 @@
520 630
       <if test="dissolutionConditions != null" >
521 631
         #{dissolutionConditions,jdbcType=VARCHAR},
522 632
       </if>
633
+      <if test="identification != null" >
634
+        #{identification,jdbcType=VARCHAR},
635
+      </if>
636
+      <if test="khqyr != null" >
637
+        #{khqyr,jdbcType=VARCHAR},
638
+      </if>
639
+      <if test="bfkhh != null" >
640
+        #{bfkhh,jdbcType=VARCHAR},
641
+      </if>
642
+      <if test="bfzh != null" >
643
+        #{bfzh,jdbcType=VARCHAR},
644
+      </if>
523 645
       <if test="disputeSettlementMethod != null" >
524 646
         #{disputeSettlementMethod,jdbcType=VARCHAR},
525 647
       </if>
@@ -538,9 +660,6 @@
538 660
       <if test="changing != null" >
539 661
         #{changing,jdbcType=VARCHAR},
540 662
       </if>
541
-      <if test="planBid != null" >
542
-        #{planBid,jdbcType=INTEGER},
543
-      </if>
544 663
       <if test="auditState != null" >
545 664
         #{auditState,jdbcType=VARCHAR},
546 665
       </if>
@@ -580,28 +699,12 @@
580 699
       <if test="createrId != null" >
581 700
         #{createrId,jdbcType=INTEGER},
582 701
       </if>
583
-      <if test="identification != null" >
584
-        #{identification,jdbcType=VARCHAR},
585
-      </if>
586 702
       <if test="updatetime != null" >
587 703
         #{updatetime,jdbcType=TIMESTAMP},
588 704
       </if>
589
-      <if test="qddd != null" >
590
-        #{qddd,jdbcType=VARCHAR},
591
-      </if>
592
-      <if test="lybzj != null" >
593
-        #{lybzj,jdbcType=VARCHAR},
594
-      </if>
595
-      <if test="khqyr != null" >
596
-        #{khqyr,jdbcType=VARCHAR},
597
-      </if>
598
-      <if test="bfkhh != null" >
599
-        #{bfkhh,jdbcType=VARCHAR},
600
-      </if>
601
-      <if test="bfzh != null" >
602
-        #{bfzh,jdbcType=VARCHAR},
705
+      <if test="attachment != null" >
706
+        #{attachment,jdbcType=VARCHAR},
603 707
       </if>
604
-      
605 708
     </trim>
606 709
   </insert>
607 710
   <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessContractExample" resultType="java.lang.Integer" >
@@ -616,11 +719,6 @@
616 719
     </if>
617 720
   </select>
618 721
   <update id="updateByExampleSelective" parameterType="map" >
619
-    <!--
620
-      WARNING - @mbggenerated
621
-      This element is automatically generated by MyBatis Generator, do not modify.
622
-      This element was generated on Mon Jun 29 19:30:27 CST 2020.
623
-    -->
624 722
     update business_contract
625 723
     <set >
626 724
       <if test="record.id != null" >
@@ -629,42 +727,69 @@
629 727
       <if test="record.contractNumber != null" >
630 728
         contract_number = #{record.contractNumber,jdbcType=VARCHAR},
631 729
       </if>
730
+      <if test="record.planBid != null" >
731
+        plan_bid = #{record.planBid,jdbcType=INTEGER},
732
+      </if>
632 733
       <if test="record.contractTitle != null" >
633 734
         contract_title = #{record.contractTitle,jdbcType=VARCHAR},
634 735
       </if>
635
-      <if test="record.customerId != null" >
636
-        customer_id = #{record.customerId,jdbcType=VARCHAR},
736
+      <if test="record.contractType != null" >
737
+        contract_type = #{record.contractType,jdbcType=INTEGER},
738
+      </if>
739
+      <if test="record.signingTime != null" >
740
+        signing_time = #{record.signingTime,jdbcType=DATE},
741
+      </if>
742
+      <if test="record.qddd != null" >
743
+        qddd = #{record.qddd,jdbcType=VARCHAR},
744
+      </if>
745
+      <if test="record.moneyQuantity != null" >
746
+        money_quantity = #{record.moneyQuantity,jdbcType=VARCHAR},
747
+      </if>
748
+      <if test="record.lybzj != null" >
749
+        lybzj = #{record.lybzj,jdbcType=VARCHAR},
637 750
       </if>
638 751
       <if test="record.customerBid != null" >
639 752
         customer_bid = #{record.customerBid,jdbcType=INTEGER},
640 753
       </if>
754
+      <if test="record.grainQuantity != null" >
755
+        grain_quantity = #{record.grainQuantity,jdbcType=DECIMAL},
756
+      </if>
757
+      <if test="record.customerId != null" >
758
+        customer_id = #{record.customerId,jdbcType=VARCHAR},
759
+      </if>
641 760
       <if test="record.customerNumber != null" >
642 761
         customer_number = #{record.customerNumber,jdbcType=VARCHAR},
643 762
       </if>
644 763
       <if test="record.customerName != null" >
645 764
         customer_name = #{record.customerName,jdbcType=VARCHAR},
646 765
       </if>
647
-      <if test="record.grainQuantity != null" >
648
-        grain_quantity = #{record.grainQuantity,jdbcType=VARCHAR},
649
-      </if>
650
-      <if test="record.moneyQuantity != null" >
651
-        money_quantity = #{record.moneyQuantity,jdbcType=VARCHAR},
652
-      </if>
653 766
       <if test="record.signingMan != null" >
654 767
         signing_man = #{record.signingMan,jdbcType=VARCHAR},
655 768
       </if>
656
-      <if test="record.signingTime != null" >
657
-        signing_time = #{record.signingTime,jdbcType=TIMESTAMP},
658
-      </if>
659 769
       <if test="record.enableDate != null" >
660 770
         enable_date = #{record.enableDate,jdbcType=TIMESTAMP},
661 771
       </if>
772
+      <if test="record.performanceQuantity != null" >
773
+        performance_quantity = #{record.performanceQuantity,jdbcType=DECIMAL},
774
+      </if>
775
+      <if test="record.performanceRate != null" >
776
+        performance_rate = #{record.performanceRate,jdbcType=DECIMAL},
777
+      </if>
778
+      <if test="record.settleContractUniformity != null" >
779
+        settle_contract_uniformity = #{record.settleContractUniformity,jdbcType=TINYINT},
780
+      </if>
781
+      <if test="record.settleContractUniformityReason != null" >
782
+        settle_contract_uniformity_reason = #{record.settleContractUniformityReason,jdbcType=VARCHAR},
783
+      </if>
784
+      <if test="record.signCompleTime != null" >
785
+        sign_comple_time = #{record.signCompleTime,jdbcType=TIMESTAMP},
786
+      </if>
787
+      <if test="record.purchaseUnit != null" >
788
+        purchase_unit = #{record.purchaseUnit,jdbcType=VARCHAR},
789
+      </if>
662 790
       <if test="record.disableDate != null" >
663 791
         disable_date = #{record.disableDate,jdbcType=TIMESTAMP},
664 792
       </if>
665
-      <if test="record.contractType != null" >
666
-        contract_type = #{record.contractType,jdbcType=INTEGER},
667
-      </if>
668 793
       <if test="record.originalContract != null" >
669 794
         original_contract = #{record.originalContract,jdbcType=VARCHAR},
670 795
       </if>
@@ -713,6 +838,18 @@
713 838
       <if test="record.dissolutionConditions != null" >
714 839
         dissolution_conditions = #{record.dissolutionConditions,jdbcType=VARCHAR},
715 840
       </if>
841
+      <if test="record.identification != null" >
842
+        identification = #{record.identification,jdbcType=VARCHAR},
843
+      </if>
844
+      <if test="record.khqyr != null" >
845
+        khqyr = #{record.khqyr,jdbcType=VARCHAR},
846
+      </if>
847
+      <if test="record.bfkhh != null" >
848
+        bfkhh = #{record.bfkhh,jdbcType=VARCHAR},
849
+      </if>
850
+      <if test="record.bfzh != null" >
851
+        bfzh = #{record.bfzh,jdbcType=VARCHAR},
852
+      </if>
716 853
       <if test="record.disputeSettlementMethod != null" >
717 854
         dispute_settlement_method = #{record.disputeSettlementMethod,jdbcType=VARCHAR},
718 855
       </if>
@@ -731,9 +868,6 @@
731 868
       <if test="record.changing != null" >
732 869
         changing = #{record.changing,jdbcType=VARCHAR},
733 870
       </if>
734
-      <if test="record.planBid != null" >
735
-        plan_bid = #{record.planBid,jdbcType=INTEGER},
736
-      </if>
737 871
       <if test="record.auditState != null" >
738 872
         audit_state = #{record.auditState,jdbcType=VARCHAR},
739 873
       </if>
@@ -773,54 +907,42 @@
773 907
       <if test="record.createrId != null" >
774 908
         creater_id = #{record.createrId,jdbcType=INTEGER},
775 909
       </if>
776
-      <if test="record.identification != null" >
777
-        identification = #{record.identification,jdbcType=VARCHAR},
778
-      </if>
779 910
       <if test="record.updatetime != null" >
780 911
         updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
781 912
       </if>
782
-      <if test="record.qddd != null" >
783
-        qddd = #{record.qddd,jdbcType=VARCHAR},
913
+      <if test="record.attachment != null" >
914
+        attachment = #{record.attachment,jdbcType=VARCHAR},
784 915
       </if>
785
-      <if test="record.lybzj != null" >
786
-        lybzj = #{record.lybzj,jdbcType=VARCHAR},
787
-      </if>
788
-      <if test="record.khqyr != null" >
789
-        khqyr = #{record.khqyr,jdbcType=VARCHAR},
790
-      </if>
791
-      <if test="record.bfkhh != null" >
792
-        bfkhh = #{record.bfkhh,jdbcType=VARCHAR},
793
-      </if>
794
-      <if test="record.bfzh != null" >
795
-        bfzh = #{record.bfzh,jdbcType=VARCHAR},
796
-      </if>
797
-      
798 916
     </set>
799 917
     <if test="_parameter != null" >
800 918
       <include refid="Update_By_Example_Where_Clause" />
801 919
     </if>
802 920
   </update>
803 921
   <update id="updateByExample" parameterType="map" >
804
-    <!--
805
-      WARNING - @mbggenerated
806
-      This element is automatically generated by MyBatis Generator, do not modify.
807
-      This element was generated on Mon Jun 29 19:30:27 CST 2020.
808
-    -->
809 922
     update business_contract
810 923
     set id = #{record.id,jdbcType=INTEGER},
811 924
       contract_number = #{record.contractNumber,jdbcType=VARCHAR},
925
+      plan_bid = #{record.planBid,jdbcType=INTEGER},
812 926
       contract_title = #{record.contractTitle,jdbcType=VARCHAR},
813
-      customer_id = #{record.customerId,jdbcType=VARCHAR},
927
+      contract_type = #{record.contractType,jdbcType=INTEGER},
928
+      signing_time = #{record.signingTime,jdbcType=DATE},
929
+      qddd = #{record.qddd,jdbcType=VARCHAR},
930
+      money_quantity = #{record.moneyQuantity,jdbcType=VARCHAR},
931
+      lybzj = #{record.lybzj,jdbcType=VARCHAR},
814 932
       customer_bid = #{record.customerBid,jdbcType=INTEGER},
933
+      grain_quantity = #{record.grainQuantity,jdbcType=DECIMAL},
934
+      customer_id = #{record.customerId,jdbcType=VARCHAR},
815 935
       customer_number = #{record.customerNumber,jdbcType=VARCHAR},
816 936
       customer_name = #{record.customerName,jdbcType=VARCHAR},
817
-      grain_quantity = #{record.grainQuantity,jdbcType=VARCHAR},
818
-      money_quantity = #{record.moneyQuantity,jdbcType=VARCHAR},
819 937
       signing_man = #{record.signingMan,jdbcType=VARCHAR},
820
-      signing_time = #{record.signingTime,jdbcType=TIMESTAMP},
821 938
       enable_date = #{record.enableDate,jdbcType=TIMESTAMP},
939
+      performance_quantity = #{record.performanceQuantity,jdbcType=DECIMAL},
940
+      performance_rate = #{record.performanceRate,jdbcType=DECIMAL},
941
+      settle_contract_uniformity = #{record.settleContractUniformity,jdbcType=TINYINT},
942
+      settle_contract_uniformity_reason = #{record.settleContractUniformityReason,jdbcType=VARCHAR},
943
+      sign_comple_time = #{record.signCompleTime,jdbcType=TIMESTAMP},
944
+      purchase_unit = #{record.purchaseUnit,jdbcType=VARCHAR},
822 945
       disable_date = #{record.disableDate,jdbcType=TIMESTAMP},
823
-      contract_type = #{record.contractType,jdbcType=INTEGER},
824 946
       original_contract = #{record.originalContract,jdbcType=VARCHAR},
825 947
       original_contract_bid = #{record.originalContractBid,jdbcType=INTEGER},
826 948
       root_contract_bid = #{record.rootContractBid,jdbcType=INTEGER},
@@ -837,13 +959,16 @@
837 959
       account_number = #{record.accountNumber,jdbcType=VARCHAR},
838 960
       breach_liability = #{record.breachLiability,jdbcType=VARCHAR},
839 961
       dissolution_conditions = #{record.dissolutionConditions,jdbcType=VARCHAR},
962
+      identification = #{record.identification,jdbcType=VARCHAR},
963
+      khqyr = #{record.khqyr,jdbcType=VARCHAR},
964
+      bfkhh = #{record.bfkhh,jdbcType=VARCHAR},
965
+      bfzh = #{record.bfzh,jdbcType=VARCHAR},
840 966
       dispute_settlement_method = #{record.disputeSettlementMethod,jdbcType=VARCHAR},
841 967
       change_record_flag = #{record.changeRecordFlag,jdbcType=VARCHAR},
842 968
       change_reason = #{record.changeReason,jdbcType=VARCHAR},
843 969
       change_time = #{record.changeTime,jdbcType=TIMESTAMP},
844 970
       change_content = #{record.changeContent,jdbcType=VARCHAR},
845 971
       changing = #{record.changing,jdbcType=VARCHAR},
846
-      plan_bid = #{record.planBid,jdbcType=INTEGER},
847 972
       audit_state = #{record.auditState,jdbcType=VARCHAR},
848 973
       process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
849 974
       process_definition_id = #{record.processDefinitionId,jdbcType=VARCHAR},
@@ -857,65 +982,81 @@
857 982
       org_id = #{record.orgId,jdbcType=INTEGER},
858 983
       in_application = #{record.inApplication,jdbcType=INTEGER},
859 984
       creater_id = #{record.createrId,jdbcType=INTEGER},
860
-      identification = #{record.identification,jdbcType=VARCHAR},
861 985
       updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
862
-      qddd = #{record.qddd,jdbcType=VARCHAR},
863
-      lybzj = #{record.lybzj,jdbcType=VARCHAR},
864
-      khqyr = #{record.khqyr,jdbcType=VARCHAR},
865
-      bfkhh = #{record.bfkhh,jdbcType=VARCHAR},
866
-      bfzh = #{record.bfzh,jdbcType=VARCHAR}
867
-      
986
+      attachment = #{record.attachment,jdbcType=VARCHAR}
868 987
     <if test="_parameter != null" >
869 988
       <include refid="Update_By_Example_Where_Clause" />
870 989
     </if>
871 990
   </update>
872 991
   <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessContract" >
873
-    <!--
874
-      WARNING - @mbggenerated
875
-      This element is automatically generated by MyBatis Generator, do not modify.
876
-      This element was generated on Mon Jun 29 19:30:27 CST 2020.
877
-    -->
878 992
     update business_contract
879 993
     <set >
880 994
       <if test="contractNumber != null" >
881 995
         contract_number = #{contractNumber,jdbcType=VARCHAR},
882 996
       </if>
997
+      <if test="planBid != null" >
998
+        plan_bid = #{planBid,jdbcType=INTEGER},
999
+      </if>
883 1000
       <if test="contractTitle != null" >
884 1001
         contract_title = #{contractTitle,jdbcType=VARCHAR},
885 1002
       </if>
886
-      <if test="customerId != null" >
887
-        customer_id = #{customerId,jdbcType=VARCHAR},
1003
+      <if test="contractType != null" >
1004
+        contract_type = #{contractType,jdbcType=INTEGER},
1005
+      </if>
1006
+      <if test="signingTime != null" >
1007
+        signing_time = #{signingTime,jdbcType=DATE},
1008
+      </if>
1009
+      <if test="qddd != null" >
1010
+        qddd = #{qddd,jdbcType=VARCHAR},
1011
+      </if>
1012
+      <if test="moneyQuantity != null" >
1013
+        money_quantity = #{moneyQuantity,jdbcType=VARCHAR},
1014
+      </if>
1015
+      <if test="lybzj != null" >
1016
+        lybzj = #{lybzj,jdbcType=VARCHAR},
888 1017
       </if>
889 1018
       <if test="customerBid != null" >
890 1019
         customer_bid = #{customerBid,jdbcType=INTEGER},
891 1020
       </if>
1021
+      <if test="grainQuantity != null" >
1022
+        grain_quantity = #{grainQuantity,jdbcType=DECIMAL},
1023
+      </if>
1024
+      <if test="customerId != null" >
1025
+        customer_id = #{customerId,jdbcType=VARCHAR},
1026
+      </if>
892 1027
       <if test="customerNumber != null" >
893 1028
         customer_number = #{customerNumber,jdbcType=VARCHAR},
894 1029
       </if>
895 1030
       <if test="customerName != null" >
896 1031
         customer_name = #{customerName,jdbcType=VARCHAR},
897 1032
       </if>
898
-      <if test="grainQuantity != null" >
899
-        grain_quantity = #{grainQuantity,jdbcType=VARCHAR},
900
-      </if>
901
-      <if test="moneyQuantity != null" >
902
-        money_quantity = #{moneyQuantity,jdbcType=VARCHAR},
903
-      </if>
904 1033
       <if test="signingMan != null" >
905 1034
         signing_man = #{signingMan,jdbcType=VARCHAR},
906 1035
       </if>
907
-      <if test="signingTime != null" >
908
-        signing_time = #{signingTime,jdbcType=TIMESTAMP},
909
-      </if>
910 1036
       <if test="enableDate != null" >
911 1037
         enable_date = #{enableDate,jdbcType=TIMESTAMP},
912 1038
       </if>
1039
+      <if test="performanceQuantity != null" >
1040
+        performance_quantity = #{performanceQuantity,jdbcType=DECIMAL},
1041
+      </if>
1042
+      <if test="performanceRate != null" >
1043
+        performance_rate = #{performanceRate,jdbcType=DECIMAL},
1044
+      </if>
1045
+      <if test="settleContractUniformity != null" >
1046
+        settle_contract_uniformity = #{settleContractUniformity,jdbcType=TINYINT},
1047
+      </if>
1048
+      <if test="settleContractUniformityReason != null" >
1049
+        settle_contract_uniformity_reason = #{settleContractUniformityReason,jdbcType=VARCHAR},
1050
+      </if>
1051
+      <if test="signCompleTime != null" >
1052
+        sign_comple_time = #{signCompleTime,jdbcType=TIMESTAMP},
1053
+      </if>
1054
+      <if test="purchaseUnit != null" >
1055
+        purchase_unit = #{purchaseUnit,jdbcType=VARCHAR},
1056
+      </if>
913 1057
       <if test="disableDate != null" >
914 1058
         disable_date = #{disableDate,jdbcType=TIMESTAMP},
915 1059
       </if>
916
-      <if test="contractType != null" >
917
-        contract_type = #{contractType,jdbcType=INTEGER},
918
-      </if>
919 1060
       <if test="originalContract != null" >
920 1061
         original_contract = #{originalContract,jdbcType=VARCHAR},
921 1062
       </if>
@@ -964,6 +1105,18 @@
964 1105
       <if test="dissolutionConditions != null" >
965 1106
         dissolution_conditions = #{dissolutionConditions,jdbcType=VARCHAR},
966 1107
       </if>
1108
+      <if test="identification != null" >
1109
+        identification = #{identification,jdbcType=VARCHAR},
1110
+      </if>
1111
+      <if test="khqyr != null" >
1112
+        khqyr = #{khqyr,jdbcType=VARCHAR},
1113
+      </if>
1114
+      <if test="bfkhh != null" >
1115
+        bfkhh = #{bfkhh,jdbcType=VARCHAR},
1116
+      </if>
1117
+      <if test="bfzh != null" >
1118
+        bfzh = #{bfzh,jdbcType=VARCHAR},
1119
+      </if>
967 1120
       <if test="disputeSettlementMethod != null" >
968 1121
         dispute_settlement_method = #{disputeSettlementMethod,jdbcType=VARCHAR},
969 1122
       </if>
@@ -982,9 +1135,6 @@
982 1135
       <if test="changing != null" >
983 1136
         changing = #{changing,jdbcType=VARCHAR},
984 1137
       </if>
985
-      <if test="planBid != null" >
986
-        plan_bid = #{planBid,jdbcType=INTEGER},
987
-      </if>
988 1138
       <if test="auditState != null" >
989 1139
         audit_state = #{auditState,jdbcType=VARCHAR},
990 1140
       </if>
@@ -1024,51 +1174,39 @@
1024 1174
       <if test="createrId != null" >
1025 1175
         creater_id = #{createrId,jdbcType=INTEGER},
1026 1176
       </if>
1027
-      <if test="identification != null" >
1028
-        identification = #{identification,jdbcType=VARCHAR},
1029
-      </if>
1030 1177
       <if test="updatetime != null" >
1031 1178
         updatetime = #{updatetime,jdbcType=TIMESTAMP},
1032 1179
       </if>
1033
-      <if test="qddd != null" >
1034
-        qddd = #{qddd,jdbcType=VARCHAR},
1180
+      <if test="attachment != null" >
1181
+        attachment = #{attachment,jdbcType=VARCHAR},
1035 1182
       </if>
1036
-      <if test="lybzj != null" >
1037
-        lybzj = #{lybzj,jdbcType=VARCHAR},
1038
-      </if>
1039
-      <if test="khqyr != null" >
1040
-        khqyr = #{khqyr,jdbcType=VARCHAR},
1041
-      </if>
1042
-      <if test="bfkhh != null" >
1043
-        bfkhh = #{bfkhh,jdbcType=VARCHAR},
1044
-      </if>
1045
-      <if test="bfzh != null" >
1046
-        bfzh = #{bfzh,jdbcType=VARCHAR},
1047
-      </if>
1048
-      
1049 1183
     </set>
1050 1184
     where id = #{id,jdbcType=INTEGER}
1051 1185
   </update>
1052 1186
   <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessContract" >
1053
-    <!--
1054
-      WARNING - @mbggenerated
1055
-      This element is automatically generated by MyBatis Generator, do not modify.
1056
-      This element was generated on Mon Jun 29 19:30:27 CST 2020.
1057
-    -->
1058 1187
     update business_contract
1059 1188
     set contract_number = #{contractNumber,jdbcType=VARCHAR},
1189
+      plan_bid = #{planBid,jdbcType=INTEGER},
1060 1190
       contract_title = #{contractTitle,jdbcType=VARCHAR},
1061
-      customer_id = #{customerId,jdbcType=VARCHAR},
1191
+      contract_type = #{contractType,jdbcType=INTEGER},
1192
+      signing_time = #{signingTime,jdbcType=DATE},
1193
+      qddd = #{qddd,jdbcType=VARCHAR},
1194
+      money_quantity = #{moneyQuantity,jdbcType=VARCHAR},
1195
+      lybzj = #{lybzj,jdbcType=VARCHAR},
1062 1196
       customer_bid = #{customerBid,jdbcType=INTEGER},
1197
+      grain_quantity = #{grainQuantity,jdbcType=DECIMAL},
1198
+      customer_id = #{customerId,jdbcType=VARCHAR},
1063 1199
       customer_number = #{customerNumber,jdbcType=VARCHAR},
1064 1200
       customer_name = #{customerName,jdbcType=VARCHAR},
1065
-      grain_quantity = #{grainQuantity,jdbcType=VARCHAR},
1066
-      money_quantity = #{moneyQuantity,jdbcType=VARCHAR},
1067 1201
       signing_man = #{signingMan,jdbcType=VARCHAR},
1068
-      signing_time = #{signingTime,jdbcType=TIMESTAMP},
1069 1202
       enable_date = #{enableDate,jdbcType=TIMESTAMP},
1203
+      performance_quantity = #{performanceQuantity,jdbcType=DECIMAL},
1204
+      performance_rate = #{performanceRate,jdbcType=DECIMAL},
1205
+      settle_contract_uniformity = #{settleContractUniformity,jdbcType=TINYINT},
1206
+      settle_contract_uniformity_reason = #{settleContractUniformityReason,jdbcType=VARCHAR},
1207
+      sign_comple_time = #{signCompleTime,jdbcType=TIMESTAMP},
1208
+      purchase_unit = #{purchaseUnit,jdbcType=VARCHAR},
1070 1209
       disable_date = #{disableDate,jdbcType=TIMESTAMP},
1071
-      contract_type = #{contractType,jdbcType=INTEGER},
1072 1210
       original_contract = #{originalContract,jdbcType=VARCHAR},
1073 1211
       original_contract_bid = #{originalContractBid,jdbcType=INTEGER},
1074 1212
       root_contract_bid = #{rootContractBid,jdbcType=INTEGER},
@@ -1085,13 +1223,16 @@
1085 1223
       account_number = #{accountNumber,jdbcType=VARCHAR},
1086 1224
       breach_liability = #{breachLiability,jdbcType=VARCHAR},
1087 1225
       dissolution_conditions = #{dissolutionConditions,jdbcType=VARCHAR},
1226
+      identification = #{identification,jdbcType=VARCHAR},
1227
+      khqyr = #{khqyr,jdbcType=VARCHAR},
1228
+      bfkhh = #{bfkhh,jdbcType=VARCHAR},
1229
+      bfzh = #{bfzh,jdbcType=VARCHAR},
1088 1230
       dispute_settlement_method = #{disputeSettlementMethod,jdbcType=VARCHAR},
1089 1231
       change_record_flag = #{changeRecordFlag,jdbcType=VARCHAR},
1090 1232
       change_reason = #{changeReason,jdbcType=VARCHAR},
1091 1233
       change_time = #{changeTime,jdbcType=TIMESTAMP},
1092 1234
       change_content = #{changeContent,jdbcType=VARCHAR},
1093 1235
       changing = #{changing,jdbcType=VARCHAR},
1094
-      plan_bid = #{planBid,jdbcType=INTEGER},
1095 1236
       audit_state = #{auditState,jdbcType=VARCHAR},
1096 1237
       process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
1097 1238
       process_definition_id = #{processDefinitionId,jdbcType=VARCHAR},
@@ -1105,14 +1246,8 @@
1105 1246
       org_id = #{orgId,jdbcType=INTEGER},
1106 1247
       in_application = #{inApplication,jdbcType=INTEGER},
1107 1248
       creater_id = #{createrId,jdbcType=INTEGER},
1108
-      identification = #{identification,jdbcType=VARCHAR},
1109 1249
       updatetime = #{updatetime,jdbcType=TIMESTAMP},
1110
-      qddd = #{qddd,jdbcType=VARCHAR},
1111
-      lybzj = #{lybzj,jdbcType=VARCHAR},
1112
-      khqyr = #{khqyr,jdbcType=VARCHAR},
1113
-      bfkhh = #{bfkhh,jdbcType=VARCHAR},
1114
-      bfzh = #{bfzh,jdbcType=VARCHAR}
1115
-      
1250
+      attachment = #{attachment,jdbcType=VARCHAR}
1116 1251
     where id = #{id,jdbcType=INTEGER}
1117 1252
   </update>
1118 1253
   

Разница между файлами не показана из-за своего большого размера
+ 475 - 1157
src/main/java/com/chinaitop/depot/business/model/BusinessContract.java


Разница между файлами не показана из-за своего большого размера
+ 1834 - 1450
src/main/java/com/chinaitop/depot/business/model/BusinessContractExample.java


+ 2 - 2
src/main/java/com/chinaitop/depot/business/service/BusinessContractService.java

@@ -16,7 +16,7 @@ public interface BusinessContractService {
16 16
 	
17 17
 	BusinessContract findById(Integer id);
18 18
 	
19
-	void update(BusinessContract contract, List<BusinessStoreWareDetail> storeWareDetailList, String fileIds, String deleteFileIds);
19
+	void update(BusinessContract contract, List<BusinessStoreWareDetail> storeWareDetailList);
20 20
 	
21 21
 	void remove(Integer id,String processInstanceId,String deleteReason, Integer planBid);
22 22
 	
@@ -154,7 +154,7 @@ public interface BusinessContractService {
154 154
      */
155 155
     Map<String, Object> add(BusinessContract contract,
156 156
             List<BusinessStoreWareDetail> storeWareDetailList, Integer userId,
157
-            String realName,Integer depotInfoOrgId, String fileIds);
157
+            String realName,Integer depotInfoOrgId);
158 158
 
159 159
     /**
160 160
      * 根据计划id修改应用状态.

+ 16 - 11
src/main/java/com/chinaitop/depot/business/service/impl/BusinessContractServiceImpl.java

@@ -100,7 +100,7 @@ public class BusinessContractServiceImpl implements BusinessContractService {
100 100
      */
101 101
     @Transactional(readOnly = false)
102 102
     public Map<String, Object> add(BusinessContract contract, List<BusinessStoreWareDetail> storeWareDetailList,
103
-            Integer userId,String realName,Integer depotInfoOrgId,String fileIds) {
103
+            Integer userId,String realName,Integer depotInfoOrgId) {
104 104
         Map<String, Object> returnMap = new HashMap<String, Object>();
105 105
         
106 106
         /*// 通过规则,获取合同编号.
@@ -112,8 +112,10 @@ public class BusinessContractServiceImpl implements BusinessContractService {
112 112
             return returnMap;
113 113
         }*/
114 114
         // 合同数量.
115
-        String grainQuantity = contract.getGrainQuantity();
116
-        BigDecimal grainQuantityB = new BigDecimal(grainQuantity);
115
+        /*String grainQuantity = contract.getGrainQuantity()+"";
116
+        BigDecimal grainQuantityB = new BigDecimal(grainQuantity);*/
117
+        
118
+        BigDecimal grainQuantityB = contract.getGrainQuantity();
117 119
         // 合同单价.
118 120
        // String grainPrice = contract.getGrainPrice();
119 121
         //BigDecimal grainPriceB = new BigDecimal(grainPrice);
@@ -173,19 +175,19 @@ public class BusinessContractServiceImpl implements BusinessContractService {
173 175
             }
174 176
         }
175 177
        // 修改fileIds对应附件的bid为当前计划的id.
176
-        businessFileService.updateFileByFileIdsAndBid(fileIds, contract.getId(),"contract");
178
+       // businessFileService.updateFileByFileIdsAndBid(fileIds, contract.getId(),"contract");
177 179
         return returnMap;
178 180
     }
179 181
 
180 182
     /**
181 183
      * 修改.
182 184
      */
183
-    public void update(BusinessContract contract, List<BusinessStoreWareDetail> storeWareDetailList,String fileIds, String deleteFileIds) {
185
+    public void update(BusinessContract contract, List<BusinessStoreWareDetail> storeWareDetailList) {
184 186
         contractMapper.updateByPrimaryKey(contract);
185
-        // 修改fileIds对应附件的bid为当前计划的id.
187
+       /* // 修改fileIds对应附件的bid为当前计划的id.
186 188
         businessFileService.updateFileByFileIdsAndBid(fileIds, contract.getId(),"contract");
187 189
         // 删除附件.
188
-        businessFileService.deleteFileByFileIdArrayString(deleteFileIds);
190
+        businessFileService.deleteFileByFileIdArrayString(deleteFileIds);*/
189 191
         // 修改仓房货位数量质量标准子表.
190 192
         if (storeWareDetailList != null && storeWareDetailList.size() > 0) {
191 193
             for (BusinessStoreWareDetail storeWareDetail : storeWareDetailList) {
@@ -1073,8 +1075,9 @@ public class BusinessContractServiceImpl implements BusinessContractService {
1073 1075
                                 businessContractV.setCompleteAmount(sumRkslD.stripTrailingZeros().toPlainString());
1074 1076
                                 
1075 1077
                                 // 要求数量.
1076
-                                String demandAmount = businessContractV.getGrainQuantity();
1077
-                                BigDecimal demandAmountD = new BigDecimal(demandAmount.toString());
1078
+                                /*String demandAmount = businessContractV.getGrainQuantity()+"";
1079
+                                BigDecimal demandAmountD = new BigDecimal(demandAmount.toString());*/
1080
+                                BigDecimal demandAmountD = businessContractV.getGrainQuantity();
1078 1081
                                 
1079 1082
                                 // 除法. 已完成数量/要求数量
1080 1083
                                 BigDecimal complete = sumRkslD.divide(demandAmountD, 4, BigDecimal.ROUND_HALF_DOWN);
@@ -1098,8 +1101,10 @@ public class BusinessContractServiceImpl implements BusinessContractService {
1098 1101
                                 businessContractV.setCompleteAmount(sumCkslD.stripTrailingZeros().toPlainString());
1099 1102
                                 
1100 1103
                                 // 要求数量.
1101
-                                String demandAmount = businessContractV.getGrainQuantity();
1102
-                                BigDecimal demandAmountD = new BigDecimal(demandAmount.toString());
1104
+                                /*String demandAmount = businessContractV.getGrainQuantity();
1105
+                                BigDecimal demandAmountD = new BigDecimal(demandAmount.toString());*/
1106
+                                
1107
+                                BigDecimal demandAmountD = businessContractV.getGrainQuantity();
1103 1108
                                 
1104 1109
                                 // 除法. 已完成数量/要求数量
1105 1110
                                 BigDecimal complete = sumCkslD.divide(demandAmountD, 4, BigDecimal.ROUND_HALF_DOWN);

+ 3 - 6
src/main/java/com/chinaitop/depot/business/service/impl/GrainContractServiceImpl.java

@@ -89,8 +89,7 @@ public class GrainContractServiceImpl implements GrainContractService {
89 89
         Map<String, Object> returnMap = new HashMap<String, Object>();
90 90
         
91 91
         // 合同数量.
92
-        String grainQuantity = contract.getGrainQuantity();
93
-        BigDecimal grainQuantityB = new BigDecimal(grainQuantity);
92
+        BigDecimal grainQuantityB = contract.getGrainQuantity();
94 93
         // 合同单价.
95 94
        // String grainPrice = contract.getGrainPrice();
96 95
         //BigDecimal grainPriceB = new BigDecimal(grainPrice);
@@ -999,8 +998,7 @@ public class GrainContractServiceImpl implements GrainContractService {
999 998
                                 businessContractV.setCompleteAmount(sumRkslD.stripTrailingZeros().toPlainString());
1000 999
                                 
1001 1000
                                 // 要求数量.
1002
-                                String demandAmount = businessContractV.getGrainQuantity();
1003
-                                BigDecimal demandAmountD = new BigDecimal(demandAmount.toString());
1001
+                                BigDecimal demandAmountD = businessContractV.getGrainQuantity();
1004 1002
                                 
1005 1003
                                 // 除法. 已完成数量/要求数量
1006 1004
                                 BigDecimal complete = sumRkslD.divide(demandAmountD, 4, BigDecimal.ROUND_HALF_DOWN);
@@ -1020,8 +1018,7 @@ public class GrainContractServiceImpl implements GrainContractService {
1020 1018
                                 businessContractV.setCompleteAmount(sumCkslD.stripTrailingZeros().toPlainString());
1021 1019
                                 
1022 1020
                                 // 要求数量.
1023
-                                String demandAmount = businessContractV.getGrainQuantity();
1024
-                                BigDecimal demandAmountD = new BigDecimal(demandAmount.toString());
1021
+                                BigDecimal demandAmountD = businessContractV.getGrainQuantity();
1025 1022
                                 
1026 1023
                                 // 除法. 已完成数量/要求数量
1027 1024
                                 BigDecimal complete = sumCkslD.divide(demandAmountD, 4, BigDecimal.ROUND_HALF_DOWN);

+ 4 - 0
src/main/java/com/chinaitop/depot/grainReserves/common/PageParam.java

@@ -23,4 +23,8 @@ public class PageParam {
23 23
     @NotNull(message = "页码非空")
24 24
     @Min(value = 1, message = "每页条数>=1")
25 25
     private Integer pageSize;
26
+
27
+    @ApiModelProperty(value = "库区编码")
28
+    @NotNull(message = "库区编码非空")
29
+    private Integer orgId;
26 30
 }

+ 1 - 1
src/main/java/com/chinaitop/depot/grainReserves/mapper/BizGopsPlanMapper.java

@@ -14,7 +14,7 @@ import java.util.List;
14 14
  */
15 15
 @Repository
16 16
 public interface BizGopsPlanMapper {
17
-    List<BizGopsPlan> getPageList(@Param("orgName") String orgName);
17
+    List<BizGopsPlan> getPageList(@Param("planName") String planName, @Param("orgId") Integer orgId);
18 18
 
19 19
     List<GopsPlanObject> getPlanSaleList(@Param("id") String id);
20 20
 

+ 3 - 2
src/main/java/com/chinaitop/depot/grainReserves/mapper/BizGopsPlanMapper.xml

@@ -19,8 +19,9 @@
19 19
         LEFT JOIN org_info oi ON bfp.org_id = oi.org_id
20 20
         <where>
21 21
             bfp.`status` = 1
22
-            <if test="orgName != null and orgName != ''">
23
-                oi.org_name LIKE CONCAT("%", orgName, "%")
22
+            and bfp.org_id = #{orgId}
23
+            <if test="planName != null and planName != ''">
24
+               and bfp.plan_name LIKE CONCAT("%", #{planName}, "%")
24 25
             </if>
25 26
         </where>
26 27
     </select>

+ 1 - 1
src/main/java/com/chinaitop/depot/grainReserves/model/BizGopsPlan.java

@@ -42,7 +42,7 @@ public class BizGopsPlan {
42 42
     private Integer planType;
43 43
 
44 44
     @ApiModelProperty(value = "计划下达时间")
45
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
45
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
46 46
     private Date planReleaseTime;
47 47
 
48 48
     @ApiModelProperty(value = "状态 0:保存;1:下发;")

+ 2 - 2
src/main/java/com/chinaitop/depot/grainReserves/model/BizGopsPlanPage.java

@@ -17,7 +17,7 @@ import java.io.Serializable;
17 17
 public class BizGopsPlanPage extends PageParam implements Serializable {
18 18
     private static final long serialVersionUID = 4988791677403961372L;
19 19
 
20
-    @ApiModelProperty(value = "库区名称")
21
-    private String orgName;
20
+    @ApiModelProperty(value = "计划名称")
21
+    private String planName;
22 22
 
23 23
 }

+ 4 - 4
src/main/java/com/chinaitop/depot/grainReserves/model/GopsPlanObject.java

@@ -50,28 +50,28 @@ public class GopsPlanObject {
50 50
     private Integer warehouseId;
51 51
 
52 52
     @ApiModelProperty(value = "货位名称", position = 6)
53
-    private Integer warehouseName;
53
+    private String warehouseName;
54 54
 
55 55
     /** 粮食品种;外库depot_qh.basic_enum的id; */
56 56
     @ApiModelProperty(value = "粮食品种id", position = 7)
57 57
     private Integer grainVarietyId;
58 58
 
59 59
     @ApiModelProperty(value = "粮食品种名称", position = 8)
60
-    private Integer grainVarietyName;
60
+    private String grainVarietyName;
61 61
 
62 62
     /** 粮食性质;外库depot_qh.basic_enum的id; */
63 63
     @ApiModelProperty(value = "粮食性质id", position = 9)
64 64
     private Integer grainNatureId;
65 65
 
66 66
     @ApiModelProperty(value = "粮食性质名称", position = 10)
67
-    private Integer grainNatureName;
67
+    private String grainNatureName;
68 68
 
69 69
     /** 粮食等级;外库depot_qh.basic_enum的id; */
70 70
     @ApiModelProperty(value = "粮食等级id", position = 11)
71 71
     private Integer grainGradeId;
72 72
 
73 73
     @ApiModelProperty(value = "粮食等级名称", position = 12)
74
-    private Integer grainGradeName;
74
+    private String grainGradeName;
75 75
 
76 76
     /** 计划数量 */
77 77
     @ApiModelProperty(value = "计划数量", position = 13)

+ 1 - 1
src/main/java/com/chinaitop/depot/grainReserves/service/BizGopsPlanService.java

@@ -31,7 +31,7 @@ public interface BizGopsPlanService {
31 31
         @Override
32 32
         public PageInfo<BizGopsPlan> getPageList(BizGopsPlanPage pageParam) {
33 33
             PageHelper.startPage(pageParam.getPageNum(), pageParam.getPageSize());
34
-            List<BizGopsPlan> list = gopsPlanMapper.getPageList(pageParam.getOrgName());
34
+            List<BizGopsPlan> list = gopsPlanMapper.getPageList(pageParam.getPlanName(), pageParam.getOrgId());
35 35
             return new PageInfo<>(list);
36 36
         }
37 37
 

+ 152 - 0
src/main/java/com/chinaitop/depot/pg/controller/BusinessPgGopsPlanController.java

@@ -0,0 +1,152 @@
1
+package com.chinaitop.depot.pg.controller;
2
+
3
+
4
+import com.chinaitop.depot.business.model.OrgInfo;
5
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlan;
6
+import com.chinaitop.depot.pg.model.vo.BusinessPgGopsPlanVO;
7
+import com.chinaitop.depot.pg.model.vo.DataCrkywCplspDefaultVO;
8
+import com.chinaitop.depot.pg.param.BusinessPgGopsPlanPageParam;
9
+import com.chinaitop.depot.pg.service.BusinessPgGopsPlanService;
10
+import com.chinaitop.depot.rp.model.BusinessQcQualityInspection;
11
+import com.chinaitop.depot.rp.model.BusinessRpReport;
12
+import com.chinaitop.depot.rp.model.vo.BusinessRpOutboundVO;
13
+import com.chinaitop.depot.rp.model.vo.BusinessRpReportRecVO;
14
+import com.chinaitop.depot.rp.model.vo.BusinessRpReportVO;
15
+import com.chinaitop.depot.rp.param.BusinessRpBiweeklyReportPageParam;
16
+import com.chinaitop.depot.rp.param.BusinessRpReportPageParam;
17
+import com.chinaitop.depot.rp.service.BusinessRpReportService;
18
+import com.github.pagehelper.PageInfo;
19
+import io.swagger.annotations.Api;
20
+import io.swagger.annotations.ApiImplicitParam;
21
+import io.swagger.annotations.ApiImplicitParams;
22
+import io.swagger.annotations.ApiOperation;
23
+import org.springframework.http.MediaType;
24
+import org.springframework.web.bind.annotation.*;
25
+
26
+import javax.annotation.Resource;
27
+import javax.validation.constraints.NotBlank;
28
+import javax.validation.constraints.NotNull;
29
+import java.util.ArrayList;
30
+import java.util.HashMap;
31
+import java.util.List;
32
+import java.util.Map;
33
+
34
+/**
35
+ *
36
+ * 成品粮购销计划 前端控制器
37
+ *
38
+ *
39
+ * @author TS
40
+ * @since 2024-06-11
41
+ */
42
+@RestController
43
+@RequestMapping("/pgGopsPlan")
44
+@Api(value= "BusinessPgGopsPlanController", description = "成品粮购销计划")
45
+public class BusinessPgGopsPlanController {
46
+
47
+    @Resource
48
+    private BusinessRpReportService businessRpReportService;
49
+
50
+    @Resource
51
+    private BusinessPgGopsPlanService businessPgGopsPlanService;
52
+
53
+
54
+
55
+    /**
56
+     * 成品粮购销计划列表
57
+     * @return
58
+     * @throws Exception
59
+     */
60
+    @RequestMapping(value="/getList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
61
+    @ApiOperation(value="成品粮购销计划列表", notes = "查询数据列表,支持分页")
62
+    public PageInfo<Map<String,Object>> getList(BusinessPgGopsPlanPageParam businessPgGopsPlanPageParam){
63
+
64
+        List<Map<String,Object>> list = businessPgGopsPlanService.queryByExample(businessPgGopsPlanPageParam);
65
+        PageInfo<Map<String,Object>> pageInfo = new PageInfo<>(list);
66
+        return pageInfo;
67
+    }
68
+
69
+
70
+    /**
71
+     * 获取本库区对应的商品列表
72
+     * @return
73
+     * @throws
74
+     */
75
+    @GetMapping("/getCplSpList")
76
+    @ApiOperation(value="获取本库区对应的商品列表", notes = "获取本库区对应的商品列表")
77
+    public List<DataCrkywCplspDefaultVO> getCplSpList(@RequestParam("orgId") @NotBlank(message = "不能为空") String orgId) {
78
+
79
+        List<DataCrkywCplspDefaultVO> list = businessPgGopsPlanService.getCplSpList(orgId);
80
+        return list;
81
+    }
82
+
83
+
84
+    /**
85
+     * 保存或修改成品粮购销计划
86
+     * @param
87
+     * @return
88
+     */
89
+    @RequestMapping(value="/add",produces = MediaType.APPLICATION_JSON_VALUE,  method=RequestMethod.POST)
90
+    @ApiOperation(value="保存或修改成品粮购销计划", notes = "保存")
91
+    public Map<String, Object> add(@RequestBody BusinessPgGopsPlan businessPgGopsPlan) {
92
+        Map<String, Object> modelMap = new HashMap<String, Object>();
93
+        try {
94
+            modelMap = businessPgGopsPlanService.add(businessPgGopsPlan);
95
+        } catch (Exception e) {
96
+            e.printStackTrace();
97
+            modelMap.put("msg", "失败!");
98
+            modelMap.put("status", "error");
99
+            return modelMap;
100
+        }
101
+        return modelMap;
102
+    }
103
+
104
+
105
+
106
+
107
+    /**
108
+     * 删除成品粮购销计划
109
+     * @param
110
+     * @return
111
+     * @throws Exception
112
+     */
113
+    @RequestMapping(value="/removeById",produces = MediaType.APPLICATION_JSON_VALUE,  method=RequestMethod.POST)
114
+    @ApiOperation(value="删除成品粮购销计划", notes = "保存")
115
+    public Map<String, Object> removeById(@RequestParam("id")@NotNull(message = "Id不能为空")Integer  id)
116
+            throws Exception {
117
+        Map<String, Object> modelMap = new HashMap<>();
118
+        try {
119
+            modelMap = businessPgGopsPlanService.removeById(id);
120
+        } catch (Exception e) {
121
+            e.printStackTrace();
122
+            modelMap.put("msg", "删除失败!");
123
+            modelMap.put("status", "error");
124
+            return modelMap;
125
+        }
126
+        return modelMap;
127
+    }
128
+
129
+
130
+
131
+
132
+
133
+    /**
134
+     * 得到成品粮购销计划
135
+     * @return
136
+     * @throws Exception
137
+     */
138
+    @RequestMapping(value="/getPgPlanDetail",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
139
+    @ApiOperation(value="得到成品粮购销计划", notes = "得到轮换计划接收详情")
140
+    public BusinessPgGopsPlanVO getPgPlanDetail(@RequestParam("id")@NotNull(message = "Id不能为空") Integer id)   {
141
+
142
+        BusinessPgGopsPlanVO gopsPlanVO = businessPgGopsPlanService.getPgPlanDetail(id);
143
+        return gopsPlanVO;
144
+    }
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+}

+ 36 - 0
src/main/java/com/chinaitop/depot/pg/mapper/BusinessPgGopsPlanDetailMapper.java

@@ -0,0 +1,36 @@
1
+package com.chinaitop.depot.pg.mapper;
2
+
3
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetail;
4
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetailExample;
5
+import java.util.List;
6
+
7
+import com.chinaitop.depot.pg.model.vo.BusinessPgGopsPlanDetailVO;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+public interface BusinessPgGopsPlanDetailMapper {
11
+    int countByExample(BusinessPgGopsPlanDetailExample example);
12
+
13
+    int deleteByExample(BusinessPgGopsPlanDetailExample example);
14
+
15
+    int deleteByPrimaryKey(Integer id);
16
+
17
+    int insert(BusinessPgGopsPlanDetail record);
18
+
19
+    int insertSelective(BusinessPgGopsPlanDetail record);
20
+
21
+    List<BusinessPgGopsPlanDetail> selectByExample(BusinessPgGopsPlanDetailExample example);
22
+
23
+    BusinessPgGopsPlanDetail selectByPrimaryKey(Integer id);
24
+
25
+    int updateByExampleSelective(@Param("record") BusinessPgGopsPlanDetail record, @Param("example") BusinessPgGopsPlanDetailExample example);
26
+
27
+    int updateByExample(@Param("record") BusinessPgGopsPlanDetail record, @Param("example") BusinessPgGopsPlanDetailExample example);
28
+
29
+    int updateByPrimaryKeySelective(BusinessPgGopsPlanDetail record);
30
+
31
+    int updateByPrimaryKey(BusinessPgGopsPlanDetail record);
32
+
33
+    int deleteByMainId(@Param("planId") Integer planId);
34
+
35
+    List<BusinessPgGopsPlanDetailVO> findPlanDetailList(@Param("planId") Integer planId);
36
+}

+ 350 - 0
src/main/java/com/chinaitop/depot/pg/mapper/BusinessPgGopsPlanDetailMapper.xml

@@ -0,0 +1,350 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.pg.mapper.BusinessPgGopsPlanDetailMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetail" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="createdate" property="createdate" jdbcType="TIMESTAMP" />
7
+    <result column="updatename" property="updatename" jdbcType="VARCHAR" />
8
+    <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
9
+    <result column="pg_gops_plan_id" property="pgGopsPlanId" jdbcType="INTEGER" />
10
+    <result column="crkyw_cplsp_default_id" property="crkywCplspDefaultId" jdbcType="VARCHAR" />
11
+    <result column="grain_nature_id" property="grainNatureId" jdbcType="VARCHAR" />
12
+    <result column="quantity" property="quantity" jdbcType="DECIMAL" />
13
+    <result column="weight" property="weight" jdbcType="DECIMAL" />
14
+    <result column="unit_price" property="unitPrice" jdbcType="DECIMAL" />
15
+    <result column="amount" property="amount" jdbcType="DECIMAL" />
16
+    <result column="completion_quantity" property="completionQuantity" jdbcType="DECIMAL" />
17
+  </resultMap>
18
+  <sql id="Example_Where_Clause" >
19
+    <where >
20
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
21
+        <if test="criteria.valid" >
22
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
23
+            <foreach collection="criteria.criteria" item="criterion" >
24
+              <choose >
25
+                <when test="criterion.noValue" >
26
+                  and ${criterion.condition}
27
+                </when>
28
+                <when test="criterion.singleValue" >
29
+                  and ${criterion.condition} #{criterion.value}
30
+                </when>
31
+                <when test="criterion.betweenValue" >
32
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
33
+                </when>
34
+                <when test="criterion.listValue" >
35
+                  and ${criterion.condition}
36
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
37
+                    #{listItem}
38
+                  </foreach>
39
+                </when>
40
+              </choose>
41
+            </foreach>
42
+          </trim>
43
+        </if>
44
+      </foreach>
45
+    </where>
46
+  </sql>
47
+  <sql id="Update_By_Example_Where_Clause" >
48
+    <where >
49
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
50
+        <if test="criteria.valid" >
51
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
52
+            <foreach collection="criteria.criteria" item="criterion" >
53
+              <choose >
54
+                <when test="criterion.noValue" >
55
+                  and ${criterion.condition}
56
+                </when>
57
+                <when test="criterion.singleValue" >
58
+                  and ${criterion.condition} #{criterion.value}
59
+                </when>
60
+                <when test="criterion.betweenValue" >
61
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
62
+                </when>
63
+                <when test="criterion.listValue" >
64
+                  and ${criterion.condition}
65
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
66
+                    #{listItem}
67
+                  </foreach>
68
+                </when>
69
+              </choose>
70
+            </foreach>
71
+          </trim>
72
+        </if>
73
+      </foreach>
74
+    </where>
75
+  </sql>
76
+  <sql id="Base_Column_List" >
77
+    id, createdate, updatename, updatedate, pg_gops_plan_id, crkyw_cplsp_default_id, 
78
+    grain_nature_id, quantity, weight, unit_price, amount
79
+  </sql>
80
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetailExample" >
81
+    select
82
+    <if test="distinct" >
83
+      distinct
84
+    </if>
85
+    <include refid="Base_Column_List" />
86
+    from business_pg_gops_plan_detail
87
+    <if test="_parameter != null" >
88
+      <include refid="Example_Where_Clause" />
89
+    </if>
90
+    <if test="orderByClause != null" >
91
+      order by ${orderByClause}
92
+    </if>
93
+  </select>
94
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
95
+    select 
96
+    <include refid="Base_Column_List" />
97
+    from business_pg_gops_plan_detail
98
+    where id = #{id,jdbcType=INTEGER}
99
+  </select>
100
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
101
+    delete from business_pg_gops_plan_detail
102
+    where id = #{id,jdbcType=INTEGER}
103
+  </delete>
104
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetailExample" >
105
+    delete from business_pg_gops_plan_detail
106
+    <if test="_parameter != null" >
107
+      <include refid="Example_Where_Clause" />
108
+    </if>
109
+  </delete>
110
+  <insert id="insert" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetail" >
111
+    insert into business_pg_gops_plan_detail (id, createdate, updatename, 
112
+      updatedate, pg_gops_plan_id, crkyw_cplsp_default_id, 
113
+      grain_nature_id, quantity, weight, 
114
+      unit_price, amount)
115
+    values (#{id,jdbcType=INTEGER}, #{createdate,jdbcType=TIMESTAMP}, #{updatename,jdbcType=VARCHAR}, 
116
+      #{updatedate,jdbcType=TIMESTAMP}, #{pgGopsPlanId,jdbcType=INTEGER}, #{crkywCplspDefaultId,jdbcType=VARCHAR}, 
117
+      #{grainNatureId,jdbcType=VARCHAR}, #{quantity,jdbcType=DECIMAL}, #{weight,jdbcType=DECIMAL}, 
118
+      #{unitPrice,jdbcType=DECIMAL}, #{amount,jdbcType=DECIMAL})
119
+  </insert>
120
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetail" >
121
+    insert into business_pg_gops_plan_detail
122
+    <trim prefix="(" suffix=")" suffixOverrides="," >
123
+      <if test="id != null" >
124
+        id,
125
+      </if>
126
+      <if test="createdate != null" >
127
+        createdate,
128
+      </if>
129
+      <if test="updatename != null" >
130
+        updatename,
131
+      </if>
132
+      <if test="updatedate != null" >
133
+        updatedate,
134
+      </if>
135
+      <if test="pgGopsPlanId != null" >
136
+        pg_gops_plan_id,
137
+      </if>
138
+      <if test="crkywCplspDefaultId != null" >
139
+        crkyw_cplsp_default_id,
140
+      </if>
141
+      <if test="grainNatureId != null" >
142
+        grain_nature_id,
143
+      </if>
144
+      <if test="quantity != null" >
145
+        quantity,
146
+      </if>
147
+      <if test="weight != null" >
148
+        weight,
149
+      </if>
150
+      <if test="unitPrice != null" >
151
+        unit_price,
152
+      </if>
153
+      <if test="amount != null" >
154
+        amount,
155
+      </if>
156
+    </trim>
157
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
158
+      <if test="id != null" >
159
+        #{id,jdbcType=INTEGER},
160
+      </if>
161
+      <if test="createdate != null" >
162
+        #{createdate,jdbcType=TIMESTAMP},
163
+      </if>
164
+      <if test="updatename != null" >
165
+        #{updatename,jdbcType=VARCHAR},
166
+      </if>
167
+      <if test="updatedate != null" >
168
+        #{updatedate,jdbcType=TIMESTAMP},
169
+      </if>
170
+      <if test="pgGopsPlanId != null" >
171
+        #{pgGopsPlanId,jdbcType=INTEGER},
172
+      </if>
173
+      <if test="crkywCplspDefaultId != null" >
174
+        #{crkywCplspDefaultId,jdbcType=VARCHAR},
175
+      </if>
176
+      <if test="grainNatureId != null" >
177
+        #{grainNatureId,jdbcType=VARCHAR},
178
+      </if>
179
+      <if test="quantity != null" >
180
+        #{quantity,jdbcType=DECIMAL},
181
+      </if>
182
+      <if test="weight != null" >
183
+        #{weight,jdbcType=DECIMAL},
184
+      </if>
185
+      <if test="unitPrice != null" >
186
+        #{unitPrice,jdbcType=DECIMAL},
187
+      </if>
188
+      <if test="amount != null" >
189
+        #{amount,jdbcType=DECIMAL},
190
+      </if>
191
+    </trim>
192
+  </insert>
193
+  <select id="countByExample" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetailExample" resultType="java.lang.Integer" >
194
+    select count(*) from business_pg_gops_plan_detail
195
+    <if test="_parameter != null" >
196
+      <include refid="Example_Where_Clause" />
197
+    </if>
198
+  </select>
199
+  <update id="updateByExampleSelective" parameterType="map" >
200
+    update business_pg_gops_plan_detail
201
+    <set >
202
+      <if test="record.id != null" >
203
+        id = #{record.id,jdbcType=INTEGER},
204
+      </if>
205
+      <if test="record.createdate != null" >
206
+        createdate = #{record.createdate,jdbcType=TIMESTAMP},
207
+      </if>
208
+      <if test="record.updatename != null" >
209
+        updatename = #{record.updatename,jdbcType=VARCHAR},
210
+      </if>
211
+      <if test="record.updatedate != null" >
212
+        updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
213
+      </if>
214
+      <if test="record.pgGopsPlanId != null" >
215
+        pg_gops_plan_id = #{record.pgGopsPlanId,jdbcType=INTEGER},
216
+      </if>
217
+      <if test="record.crkywCplspDefaultId != null" >
218
+        crkyw_cplsp_default_id = #{record.crkywCplspDefaultId,jdbcType=VARCHAR},
219
+      </if>
220
+      <if test="record.grainNatureId != null" >
221
+        grain_nature_id = #{record.grainNatureId,jdbcType=VARCHAR},
222
+      </if>
223
+      <if test="record.quantity != null" >
224
+        quantity = #{record.quantity,jdbcType=DECIMAL},
225
+      </if>
226
+      <if test="record.weight != null" >
227
+        weight = #{record.weight,jdbcType=DECIMAL},
228
+      </if>
229
+      <if test="record.unitPrice != null" >
230
+        unit_price = #{record.unitPrice,jdbcType=DECIMAL},
231
+      </if>
232
+      <if test="record.amount != null" >
233
+        amount = #{record.amount,jdbcType=DECIMAL},
234
+      </if>
235
+    </set>
236
+    <if test="_parameter != null" >
237
+      <include refid="Update_By_Example_Where_Clause" />
238
+    </if>
239
+  </update>
240
+  <update id="updateByExample" parameterType="map" >
241
+    update business_pg_gops_plan_detail
242
+    set id = #{record.id,jdbcType=INTEGER},
243
+      createdate = #{record.createdate,jdbcType=TIMESTAMP},
244
+      updatename = #{record.updatename,jdbcType=VARCHAR},
245
+      updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
246
+      pg_gops_plan_id = #{record.pgGopsPlanId,jdbcType=INTEGER},
247
+      crkyw_cplsp_default_id = #{record.crkywCplspDefaultId,jdbcType=VARCHAR},
248
+      grain_nature_id = #{record.grainNatureId,jdbcType=VARCHAR},
249
+      quantity = #{record.quantity,jdbcType=DECIMAL},
250
+      weight = #{record.weight,jdbcType=DECIMAL},
251
+      unit_price = #{record.unitPrice,jdbcType=DECIMAL},
252
+      amount = #{record.amount,jdbcType=DECIMAL}
253
+    <if test="_parameter != null" >
254
+      <include refid="Update_By_Example_Where_Clause" />
255
+    </if>
256
+  </update>
257
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetail" >
258
+    update business_pg_gops_plan_detail
259
+    <set >
260
+      <if test="createdate != null" >
261
+        createdate = #{createdate,jdbcType=TIMESTAMP},
262
+      </if>
263
+      <if test="updatename != null" >
264
+        updatename = #{updatename,jdbcType=VARCHAR},
265
+      </if>
266
+      <if test="updatedate != null" >
267
+        updatedate = #{updatedate,jdbcType=TIMESTAMP},
268
+      </if>
269
+      <if test="pgGopsPlanId != null" >
270
+        pg_gops_plan_id = #{pgGopsPlanId,jdbcType=INTEGER},
271
+      </if>
272
+      <if test="crkywCplspDefaultId != null" >
273
+        crkyw_cplsp_default_id = #{crkywCplspDefaultId,jdbcType=VARCHAR},
274
+      </if>
275
+      <if test="grainNatureId != null" >
276
+        grain_nature_id = #{grainNatureId,jdbcType=VARCHAR},
277
+      </if>
278
+      <if test="quantity != null" >
279
+        quantity = #{quantity,jdbcType=DECIMAL},
280
+      </if>
281
+      <if test="weight != null" >
282
+        weight = #{weight,jdbcType=DECIMAL},
283
+      </if>
284
+      <if test="unitPrice != null" >
285
+        unit_price = #{unitPrice,jdbcType=DECIMAL},
286
+      </if>
287
+      <if test="amount != null" >
288
+        amount = #{amount,jdbcType=DECIMAL},
289
+      </if>
290
+    </set>
291
+    where id = #{id,jdbcType=INTEGER}
292
+  </update>
293
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetail" >
294
+    update business_pg_gops_plan_detail
295
+    set createdate = #{createdate,jdbcType=TIMESTAMP},
296
+      updatename = #{updatename,jdbcType=VARCHAR},
297
+      updatedate = #{updatedate,jdbcType=TIMESTAMP},
298
+      pg_gops_plan_id = #{pgGopsPlanId,jdbcType=INTEGER},
299
+      crkyw_cplsp_default_id = #{crkywCplspDefaultId,jdbcType=VARCHAR},
300
+      grain_nature_id = #{grainNatureId,jdbcType=VARCHAR},
301
+      quantity = #{quantity,jdbcType=DECIMAL},
302
+      weight = #{weight,jdbcType=DECIMAL},
303
+      unit_price = #{unitPrice,jdbcType=DECIMAL},
304
+      amount = #{amount,jdbcType=DECIMAL}
305
+    where id = #{id,jdbcType=INTEGER}
306
+  </update>
307
+
308
+  <delete id="deleteByMainId" parameterType="java.lang.Integer" >
309
+    DELETE
310
+    FROM
311
+        business_pg_gops_plan_detail
312
+    WHERE
313
+    pg_gops_plan_id = #{planId,jdbcType=INTEGER}
314
+  </delete>
315
+  <select id="findPlanDetailList"  resultType="com.chinaitop.depot.pg.model.vo.BusinessPgGopsPlanDetailVO"  >
316
+     SELECT
317
+    a.id,
318
+    a.createdate,
319
+    a.updatename,
320
+    a.updatedate,
321
+    a.pg_gops_plan_id as pgGopsPlanId,
322
+    a.crkyw_cplsp_default_id as crkywCplspDefaultId,
323
+    a.grain_nature_id as grainNatureId,
324
+    e.enumname as grainNatureName,
325
+    a.quantity,
326
+    a.weight,
327
+    a.unit_price as unitPrice,
328
+    a.amount,
329
+    c.enumName as sjjlpzmc,
330
+    b.sjjlpzbh,
331
+    b.sjjlppmc,
332
+    b.dj,
333
+    n.enumname as djmc,
334
+    b.sjjlspmc,
335
+    b.sjjlspmcbh,
336
+    b.gg,
337
+    b.jldw,
338
+    f.enumname as jldwmc,
339
+    b.bzq
340
+    FROM
341
+    depot_qh.business_pg_gops_plan_detail a
342
+    LEFT JOIN depot_qh.data_crkyw_cplsp_default b ON a.crkyw_cplsp_default_id = b.dataId
343
+    LEFT JOIN depot_qh.basic_enum e on e.enumId = a.grain_nature_id
344
+    left join depot_qh.basic_enum f on f.enumId = b.jldw
345
+    LEFT JOIN  basic_enum c on b.sjjlpzbh = c.enumId
346
+    LEFT JOIN  basic_enum n on b.dj = n.enumId
347
+    where a.pg_gops_plan_id = #{planId}
348
+  </select>
349
+
350
+</mapper>

+ 41 - 0
src/main/java/com/chinaitop/depot/pg/mapper/BusinessPgGopsPlanMapper.java

@@ -0,0 +1,41 @@
1
+package com.chinaitop.depot.pg.mapper;
2
+
3
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlan;
4
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlanExample;
5
+import java.util.List;
6
+import java.util.Map;
7
+
8
+import com.chinaitop.depot.pg.model.vo.BusinessPgGopsPlanVO;
9
+import com.chinaitop.depot.pg.model.vo.DataCrkywCplspDefaultVO;
10
+import com.chinaitop.depot.pg.param.BusinessPgGopsPlanPageParam;
11
+import org.apache.ibatis.annotations.Param;
12
+
13
+public interface BusinessPgGopsPlanMapper {
14
+    int countByExample(BusinessPgGopsPlanExample example);
15
+
16
+    int deleteByExample(BusinessPgGopsPlanExample example);
17
+
18
+    int deleteByPrimaryKey(Integer id);
19
+
20
+    int insert(BusinessPgGopsPlan record);
21
+
22
+    int insertSelective(BusinessPgGopsPlan record);
23
+
24
+    List<BusinessPgGopsPlan> selectByExample(BusinessPgGopsPlanExample example);
25
+
26
+    BusinessPgGopsPlan selectByPrimaryKey(Integer id);
27
+
28
+    int updateByExampleSelective(@Param("record") BusinessPgGopsPlan record, @Param("example") BusinessPgGopsPlanExample example);
29
+
30
+    int updateByExample(@Param("record") BusinessPgGopsPlan record, @Param("example") BusinessPgGopsPlanExample example);
31
+
32
+    int updateByPrimaryKeySelective(BusinessPgGopsPlan record);
33
+
34
+    int updateByPrimaryKey(BusinessPgGopsPlan record);
35
+
36
+    List<Map<String,Object>> selectByPageParam(@Param("pageParam")BusinessPgGopsPlanPageParam pageParam);
37
+
38
+    BusinessPgGopsPlanVO getPgPlan(@Param("id") Integer id);
39
+
40
+    List<DataCrkywCplspDefaultVO> getCplSpList(@Param("orgId")String orgId);
41
+}

+ 467 - 0
src/main/java/com/chinaitop/depot/pg/mapper/BusinessPgGopsPlanMapper.xml

@@ -0,0 +1,467 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.pg.mapper.BusinessPgGopsPlanMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.pg.model.BusinessPgGopsPlan" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="createdate" property="createdate" jdbcType="TIMESTAMP" />
7
+    <result column="updatename" property="updatename" jdbcType="VARCHAR" />
8
+    <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
9
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
10
+    <result column="plan_code" property="planCode" jdbcType="VARCHAR" />
11
+    <result column="plan_type" property="planType" jdbcType="TINYINT" />
12
+    <result column="plan_start_time" property="planStartTime" jdbcType="TIMESTAMP" />
13
+    <result column="plan_end_time" property="planEndTime" jdbcType="TIMESTAMP" />
14
+    <result column="customer_name" property="customerName" jdbcType="VARCHAR" />
15
+    <result column="contact_information" property="contactInformation" jdbcType="VARCHAR" />
16
+    <result column="total_amount" property="totalAmount" jdbcType="DECIMAL" />
17
+    <result column="completion_amount" property="completionAmount" jdbcType="DECIMAL" />
18
+    <result column="remaining_amount" property="remainingAmount" jdbcType="DECIMAL" />
19
+    <result column="plan_quantity" property="planQuantity" jdbcType="DECIMAL" />
20
+    <result column="completion_quantity" property="completionQuantity" jdbcType="DECIMAL" />
21
+  </resultMap>
22
+  <sql id="Example_Where_Clause" >
23
+    <where >
24
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
25
+        <if test="criteria.valid" >
26
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
27
+            <foreach collection="criteria.criteria" item="criterion" >
28
+              <choose >
29
+                <when test="criterion.noValue" >
30
+                  and ${criterion.condition}
31
+                </when>
32
+                <when test="criterion.singleValue" >
33
+                  and ${criterion.condition} #{criterion.value}
34
+                </when>
35
+                <when test="criterion.betweenValue" >
36
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
37
+                </when>
38
+                <when test="criterion.listValue" >
39
+                  and ${criterion.condition}
40
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
41
+                    #{listItem}
42
+                  </foreach>
43
+                </when>
44
+              </choose>
45
+            </foreach>
46
+          </trim>
47
+        </if>
48
+      </foreach>
49
+    </where>
50
+  </sql>
51
+  <sql id="Update_By_Example_Where_Clause" >
52
+    <where >
53
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
54
+        <if test="criteria.valid" >
55
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
56
+            <foreach collection="criteria.criteria" item="criterion" >
57
+              <choose >
58
+                <when test="criterion.noValue" >
59
+                  and ${criterion.condition}
60
+                </when>
61
+                <when test="criterion.singleValue" >
62
+                  and ${criterion.condition} #{criterion.value}
63
+                </when>
64
+                <when test="criterion.betweenValue" >
65
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
66
+                </when>
67
+                <when test="criterion.listValue" >
68
+                  and ${criterion.condition}
69
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
70
+                    #{listItem}
71
+                  </foreach>
72
+                </when>
73
+              </choose>
74
+            </foreach>
75
+          </trim>
76
+        </if>
77
+      </foreach>
78
+    </where>
79
+  </sql>
80
+  <sql id="Base_Column_List" >
81
+    id, createdate, updatename, updatedate, org_id, plan_code, plan_type, plan_start_time, 
82
+    plan_end_time, customer_name, contact_information, total_amount, completion_amount, 
83
+    remaining_amount, plan_quantity, completion_quantity
84
+  </sql>
85
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlanExample" >
86
+    select
87
+    <if test="distinct" >
88
+      distinct
89
+    </if>
90
+    <include refid="Base_Column_List" />
91
+    from business_pg_gops_plan
92
+    <if test="_parameter != null" >
93
+      <include refid="Example_Where_Clause" />
94
+    </if>
95
+    <if test="orderByClause != null" >
96
+      order by ${orderByClause}
97
+    </if>
98
+  </select>
99
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
100
+    select 
101
+    <include refid="Base_Column_List" />
102
+    from business_pg_gops_plan
103
+    where id = #{id,jdbcType=INTEGER}
104
+  </select>
105
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
106
+    delete from business_pg_gops_plan
107
+    where id = #{id,jdbcType=INTEGER}
108
+  </delete>
109
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlanExample" >
110
+    delete from business_pg_gops_plan
111
+    <if test="_parameter != null" >
112
+      <include refid="Example_Where_Clause" />
113
+    </if>
114
+  </delete>
115
+  <insert id="insert" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlan" >
116
+    insert into business_pg_gops_plan (id, createdate, updatename, 
117
+      updatedate, org_id, plan_code, 
118
+      plan_type, plan_start_time, plan_end_time, 
119
+      customer_name, contact_information, total_amount, 
120
+      completion_amount, remaining_amount, plan_quantity, 
121
+      completion_quantity)
122
+    values (#{id,jdbcType=INTEGER}, #{createdate,jdbcType=TIMESTAMP}, #{updatename,jdbcType=VARCHAR}, 
123
+      #{updatedate,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER}, #{planCode,jdbcType=VARCHAR}, 
124
+      #{planType,jdbcType=TINYINT}, #{planStartTime,jdbcType=TIMESTAMP}, #{planEndTime,jdbcType=TIMESTAMP}, 
125
+      #{customerName,jdbcType=VARCHAR}, #{contactInformation,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, 
126
+      #{completionAmount,jdbcType=DECIMAL}, #{remainingAmount,jdbcType=DECIMAL}, #{planQuantity,jdbcType=INTEGER}, 
127
+      #{completionQuantity,jdbcType=INTEGER})
128
+  </insert>
129
+  <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlan" >
130
+    insert into business_pg_gops_plan
131
+    <trim prefix="(" suffix=")" suffixOverrides="," >
132
+      <if test="id != null" >
133
+        id,
134
+      </if>
135
+      <if test="createdate != null" >
136
+        createdate,
137
+      </if>
138
+      <if test="updatename != null" >
139
+        updatename,
140
+      </if>
141
+      <if test="updatedate != null" >
142
+        updatedate,
143
+      </if>
144
+      <if test="orgId != null" >
145
+        org_id,
146
+      </if>
147
+      <if test="planCode != null" >
148
+        plan_code,
149
+      </if>
150
+      <if test="planName != null" >
151
+        plan_name,
152
+      </if>
153
+      <if test="planType != null" >
154
+        plan_type,
155
+      </if>
156
+      <if test="planStartTime != null" >
157
+        plan_start_time,
158
+      </if>
159
+      <if test="planEndTime != null" >
160
+        plan_end_time,
161
+      </if>
162
+      <if test="customerName != null" >
163
+        customer_name,
164
+      </if>
165
+      <if test="contactInformation != null" >
166
+        contact_information,
167
+      </if>
168
+      <if test="totalAmount != null" >
169
+        total_amount,
170
+      </if>
171
+      <if test="completionAmount != null" >
172
+        completion_amount,
173
+      </if>
174
+      <if test="remainingAmount != null" >
175
+        remaining_amount,
176
+      </if>
177
+      <if test="planQuantity != null" >
178
+        plan_quantity,
179
+      </if>
180
+      <if test="completionQuantity != null" >
181
+        completion_quantity,
182
+      </if>
183
+    </trim>
184
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
185
+      <if test="id != null" >
186
+        #{id,jdbcType=INTEGER},
187
+      </if>
188
+      <if test="createdate != null" >
189
+        #{createdate,jdbcType=TIMESTAMP},
190
+      </if>
191
+      <if test="updatename != null" >
192
+        #{updatename,jdbcType=VARCHAR},
193
+      </if>
194
+      <if test="updatedate != null" >
195
+        #{updatedate,jdbcType=TIMESTAMP},
196
+      </if>
197
+      <if test="orgId != null" >
198
+        #{orgId,jdbcType=INTEGER},
199
+      </if>
200
+      <if test="planCode != null" >
201
+        #{planCode,jdbcType=VARCHAR},
202
+      </if>
203
+      <if test="planName != null" >
204
+        #{planName,jdbcType=VARCHAR},
205
+      </if>
206
+      <if test="planType != null" >
207
+        #{planType,jdbcType=TINYINT},
208
+      </if>
209
+      <if test="planStartTime != null" >
210
+        #{planStartTime,jdbcType=TIMESTAMP},
211
+      </if>
212
+      <if test="planEndTime != null" >
213
+        #{planEndTime,jdbcType=TIMESTAMP},
214
+      </if>
215
+      <if test="customerName != null" >
216
+        #{customerName,jdbcType=VARCHAR},
217
+      </if>
218
+      <if test="contactInformation != null" >
219
+        #{contactInformation,jdbcType=VARCHAR},
220
+      </if>
221
+      <if test="totalAmount != null" >
222
+        #{totalAmount,jdbcType=DECIMAL},
223
+      </if>
224
+      <if test="completionAmount != null" >
225
+        #{completionAmount,jdbcType=DECIMAL},
226
+      </if>
227
+      <if test="remainingAmount != null" >
228
+        #{remainingAmount,jdbcType=DECIMAL},
229
+      </if>
230
+      <if test="planQuantity != null" >
231
+        #{planQuantity,jdbcType=INTEGER},
232
+      </if>
233
+      <if test="completionQuantity != null" >
234
+        #{completionQuantity,jdbcType=INTEGER},
235
+      </if>
236
+    </trim>
237
+  </insert>
238
+  <select id="countByExample" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlanExample" resultType="java.lang.Integer" >
239
+    select count(*) from business_pg_gops_plan
240
+    <if test="_parameter != null" >
241
+      <include refid="Example_Where_Clause" />
242
+    </if>
243
+  </select>
244
+  <update id="updateByExampleSelective" parameterType="map" >
245
+    update business_pg_gops_plan
246
+    <set >
247
+      <if test="record.id != null" >
248
+        id = #{record.id,jdbcType=INTEGER},
249
+      </if>
250
+      <if test="record.createdate != null" >
251
+        createdate = #{record.createdate,jdbcType=TIMESTAMP},
252
+      </if>
253
+      <if test="record.updatename != null" >
254
+        updatename = #{record.updatename,jdbcType=VARCHAR},
255
+      </if>
256
+      <if test="record.updatedate != null" >
257
+        updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
258
+      </if>
259
+      <if test="record.orgId != null" >
260
+        org_id = #{record.orgId,jdbcType=INTEGER},
261
+      </if>
262
+      <if test="record.planCode != null" >
263
+        plan_code = #{record.planCode,jdbcType=VARCHAR},
264
+      </if>
265
+      <if test="record.planType != null" >
266
+        plan_type = #{record.planType,jdbcType=TINYINT},
267
+      </if>
268
+      <if test="record.planStartTime != null" >
269
+        plan_start_time = #{record.planStartTime,jdbcType=TIMESTAMP},
270
+      </if>
271
+      <if test="record.planEndTime != null" >
272
+        plan_end_time = #{record.planEndTime,jdbcType=TIMESTAMP},
273
+      </if>
274
+      <if test="record.customerName != null" >
275
+        customer_name = #{record.customerName,jdbcType=VARCHAR},
276
+      </if>
277
+      <if test="record.contactInformation != null" >
278
+        contact_information = #{record.contactInformation,jdbcType=VARCHAR},
279
+      </if>
280
+      <if test="record.totalAmount != null" >
281
+        total_amount = #{record.totalAmount,jdbcType=DECIMAL},
282
+      </if>
283
+      <if test="record.completionAmount != null" >
284
+        completion_amount = #{record.completionAmount,jdbcType=DECIMAL},
285
+      </if>
286
+      <if test="record.remainingAmount != null" >
287
+        remaining_amount = #{record.remainingAmount,jdbcType=DECIMAL},
288
+      </if>
289
+      <if test="record.planQuantity != null" >
290
+        plan_quantity = #{record.planQuantity,jdbcType=INTEGER},
291
+      </if>
292
+      <if test="record.completionQuantity != null" >
293
+        completion_quantity = #{record.completionQuantity,jdbcType=INTEGER},
294
+      </if>
295
+    </set>
296
+    <if test="_parameter != null" >
297
+      <include refid="Update_By_Example_Where_Clause" />
298
+    </if>
299
+  </update>
300
+  <update id="updateByExample" parameterType="map" >
301
+    update business_pg_gops_plan
302
+    set id = #{record.id,jdbcType=INTEGER},
303
+      createdate = #{record.createdate,jdbcType=TIMESTAMP},
304
+      updatename = #{record.updatename,jdbcType=VARCHAR},
305
+      updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
306
+      org_id = #{record.orgId,jdbcType=INTEGER},
307
+      plan_code = #{record.planCode,jdbcType=VARCHAR},
308
+      plan_type = #{record.planType,jdbcType=TINYINT},
309
+      plan_start_time = #{record.planStartTime,jdbcType=TIMESTAMP},
310
+      plan_end_time = #{record.planEndTime,jdbcType=TIMESTAMP},
311
+      customer_name = #{record.customerName,jdbcType=VARCHAR},
312
+      contact_information = #{record.contactInformation,jdbcType=VARCHAR},
313
+      total_amount = #{record.totalAmount,jdbcType=DECIMAL},
314
+      completion_amount = #{record.completionAmount,jdbcType=DECIMAL},
315
+      remaining_amount = #{record.remainingAmount,jdbcType=DECIMAL},
316
+      plan_quantity = #{record.planQuantity,jdbcType=INTEGER},
317
+      completion_quantity = #{record.completionQuantity,jdbcType=INTEGER}
318
+    <if test="_parameter != null" >
319
+      <include refid="Update_By_Example_Where_Clause" />
320
+    </if>
321
+  </update>
322
+  <update id="updateByPrimaryKeySelective"  parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlan" >
323
+    update business_pg_gops_plan
324
+    <set >
325
+      <if test="createdate != null" >
326
+        createdate = #{createdate,jdbcType=TIMESTAMP},
327
+      </if>
328
+      <if test="updatename != null" >
329
+        updatename = #{updatename,jdbcType=VARCHAR},
330
+      </if>
331
+      <if test="updatedate != null" >
332
+        updatedate = #{updatedate,jdbcType=TIMESTAMP},
333
+      </if>
334
+      <if test="orgId != null" >
335
+        org_id = #{orgId,jdbcType=INTEGER},
336
+      </if>
337
+      <if test="planCode != null" >
338
+        plan_code = #{planCode,jdbcType=VARCHAR},
339
+      </if>
340
+      <if test="planType != null" >
341
+        plan_type = #{planType,jdbcType=TINYINT},
342
+      </if>
343
+      <if test="planStartTime != null" >
344
+        plan_start_time = #{planStartTime,jdbcType=TIMESTAMP},
345
+      </if>
346
+      <if test="planEndTime != null" >
347
+        plan_end_time = #{planEndTime,jdbcType=TIMESTAMP},
348
+      </if>
349
+      <if test="customerName != null" >
350
+        customer_name = #{customerName,jdbcType=VARCHAR},
351
+      </if>
352
+      <if test="contactInformation != null" >
353
+        contact_information = #{contactInformation,jdbcType=VARCHAR},
354
+      </if>
355
+      <if test="totalAmount != null" >
356
+        total_amount = #{totalAmount,jdbcType=DECIMAL},
357
+      </if>
358
+      <if test="completionAmount != null" >
359
+        completion_amount = #{completionAmount,jdbcType=DECIMAL},
360
+      </if>
361
+      <if test="remainingAmount != null" >
362
+        remaining_amount = #{remainingAmount,jdbcType=DECIMAL},
363
+      </if>
364
+      <if test="planQuantity != null" >
365
+        plan_quantity = #{planQuantity,jdbcType=INTEGER},
366
+      </if>
367
+      <if test="completionQuantity != null" >
368
+        completion_quantity = #{completionQuantity,jdbcType=INTEGER},
369
+      </if>
370
+    </set>
371
+    where id = #{id,jdbcType=INTEGER}
372
+  </update>
373
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.pg.model.BusinessPgGopsPlan" >
374
+    update business_pg_gops_plan
375
+    set createdate = #{createdate,jdbcType=TIMESTAMP},
376
+      updatename = #{updatename,jdbcType=VARCHAR},
377
+      updatedate = #{updatedate,jdbcType=TIMESTAMP},
378
+      org_id = #{orgId,jdbcType=INTEGER},
379
+      plan_code = #{planCode,jdbcType=VARCHAR},
380
+      plan_type = #{planType,jdbcType=TINYINT},
381
+      plan_start_time = #{planStartTime,jdbcType=TIMESTAMP},
382
+      plan_end_time = #{planEndTime,jdbcType=TIMESTAMP},
383
+      customer_name = #{customerName,jdbcType=VARCHAR},
384
+      contact_information = #{contactInformation,jdbcType=VARCHAR},
385
+      total_amount = #{totalAmount,jdbcType=DECIMAL},
386
+      completion_amount = #{completionAmount,jdbcType=DECIMAL},
387
+      remaining_amount = #{remainingAmount,jdbcType=DECIMAL},
388
+      plan_quantity = #{planQuantity,jdbcType=INTEGER},
389
+      completion_quantity = #{completionQuantity,jdbcType=INTEGER}
390
+    where id = #{id,jdbcType=INTEGER}
391
+  </update>
392
+  <select id="selectByPageParam" resultType="java.util.Map">
393
+    SELECT
394
+    a.id as "id",
395
+    a.plan_code as "planCode",
396
+    a.plan_name as "planName",
397
+    a.plan_type as "planType",
398
+    DATE_FORMAT(a.plan_start_time,'%Y') as "planYear",
399
+    a.plan_quantity as "planQuantity",
400
+    a.completion_quantity as "completionQuantity",
401
+    a.completion_quantity/a.plan_quantity*100 as "planRate",
402
+    b.dwmc as "dwmc",
403
+    d.org_name as "orgName",
404
+    DATE_FORMAT(a.plan_start_time,'%Y-%m-%d %T') AS "planStartTime"
405
+    FROM
406
+    depot_qh.business_pg_gops_plan a
407
+    LEFT JOIN depot_qh.org_info d on a.org_id = d.org_id
408
+    LEFT JOIN province_all.biz_unit_info b on d.unit_info_id = b.id
409
+    where 1=1
410
+    <if test="pageParam.unitName !=null and pageParam.unitName!=''">
411
+      and b.dwmc like concat("%",#{pageParam.unitName},"%")
412
+    </if>
413
+    <if test="pageParam.year !=null and pageParam.year!=''">
414
+      and  DATE_FORMAT(a.plan_start_time,'%Y') = #{pageParam.year}
415
+    </if>
416
+    ORDER BY a.plan_start_time  desc
417
+  </select>
418
+  <select id="getPgPlan" resultType="com.chinaitop.depot.pg.model.vo.BusinessPgGopsPlanVO">
419
+  SELECT
420
+	a.id,
421
+	a.createdate,
422
+	a.updatename,
423
+	a.updatedate,
424
+	a.org_id as orgId,
425
+	a.plan_code as planCode,
426
+	a.plan_name as planName,
427
+	a.plan_type as planType,
428
+	a.plan_start_time as planStartTime,
429
+	a.plan_end_time as planEndTime,
430
+	a.customer_name as customerName,
431
+	a.contact_information as contactInformation,
432
+	a.total_amount as totalAmount,
433
+	a.completion_amount as completionAmount,
434
+	a.remaining_amount as remainingAmount,
435
+	a.plan_quantity as planQuantity,
436
+	a.completion_quantity as completionQuantity,
437
+	d.org_name AS orgName
438
+FROM
439
+	depot_qh.business_pg_gops_plan a
440
+LEFT JOIN depot_qh.org_info d ON a.org_id = d.org_id
441
+where a.id= #{id}
442
+  </select>
443
+  <select id="getCplSpList" resultType="com.chinaitop.depot.pg.model.vo.DataCrkywCplspDefaultVO">
444
+  SELECT
445
+	b.dataId AS dataId,
446
+	b.cjsj,
447
+	c.enumName AS sjjlpzmc,
448
+	b.sjjlpzbh,
449
+	b.sjjlppmc,
450
+	b.dj,
451
+	n.enumname AS djmc,
452
+	b.sjjlspmc,
453
+	b.sjjlspmcbh,
454
+	b.gg,
455
+	b.jldw,
456
+	f.enumname AS jldwmc,
457
+	b.bzq
458
+FROM
459
+	depot_qh.data_crkyw_cplsp_default b
460
+LEFT JOIN depot_qh.basic_enum f ON f.enumId = b.jldw
461
+LEFT JOIN basic_enum c ON b.sjjlpzbh = c.enumId
462
+LEFT JOIN basic_enum n ON b.dj = n.enumId
463
+WHERE
464
+	b.unitid = #{orgId}
465
+ORDER BY b.cjsj
466
+  </select>
467
+</mapper>

+ 97 - 0
src/main/java/com/chinaitop/depot/pg/model/BusinessPgGopsPlan.java

@@ -0,0 +1,97 @@
1
+package com.chinaitop.depot.pg.model;
2
+
3
+import com.fasterxml.jackson.annotation.JsonFormat;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.Getter;
6
+import lombok.Setter;
7
+
8
+import java.math.BigDecimal;
9
+import java.util.Date;
10
+import java.util.List;
11
+
12
+/**
13
+ * 成品粮监管-购销计划管理表实体
14
+ *
15
+ * @author TS
16
+ * @date  2024/06/11 15:41
17
+ **/
18
+@Getter
19
+@Setter
20
+public class BusinessPgGopsPlan {
21
+
22
+    /** 主键ID */
23
+    @ApiModelProperty(value = "主键ID", position = 1)
24
+    private Integer id;
25
+
26
+    /** 创建日期 */
27
+    @ApiModelProperty(value = "创建日期", position = 2)
28
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
29
+    private Date createdate;
30
+
31
+    /** 更新人 */
32
+    @ApiModelProperty(value = "更新人", position = 3)
33
+    private String updatename;
34
+
35
+    /** 更新日期 */
36
+    @ApiModelProperty(value = "更新日期", position = 4)
37
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
38
+    private Date updatedate;
39
+
40
+    /** 库区;org_info的id; */
41
+    @ApiModelProperty(value = "库区;org_info的id;", position = 5)
42
+    private Integer orgId;
43
+
44
+    /** 计划编号 */
45
+    @ApiModelProperty(value = "计划编号", position = 6)
46
+    private String planCode;
47
+
48
+    /** 计划名称 */
49
+    @ApiModelProperty(value = "计划名称", position = 6)
50
+    private String planName;
51
+
52
+
53
+    /** 计划类型,1:销售计划;2:收购计划; */
54
+    @ApiModelProperty(value = "计划类型,1:销售计划;2:收购计划;", position = 7)
55
+    private Integer planType;
56
+
57
+    /** 计划开始时间 */
58
+    @ApiModelProperty(value = "计划开始时间", position = 8)
59
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
60
+    private Date planStartTime;
61
+
62
+    /** 计划结束时间 */
63
+    @ApiModelProperty(value = "计划结束时间", position = 9)
64
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
65
+    private Date planEndTime;
66
+
67
+    /** 客户名称 */
68
+    @ApiModelProperty(value = "客户名称", position = 10)
69
+    private String customerName;
70
+
71
+    /** 联系方式 */
72
+    @ApiModelProperty(value = "联系方式", position = 11)
73
+    private String contactInformation;
74
+
75
+    /** 总金额 */
76
+    @ApiModelProperty(value = "总金额", position = 12)
77
+    private BigDecimal totalAmount;
78
+
79
+    /** 完成金额 */
80
+    @ApiModelProperty(value = "完成金额", position = 13)
81
+    private BigDecimal completionAmount;
82
+
83
+    /** 剩余金额 */
84
+    @ApiModelProperty(value = "剩余金额", position = 14)
85
+    private BigDecimal remainingAmount;
86
+
87
+    /** 计划数量 */
88
+    @ApiModelProperty(value = "计划数量", position = 15)
89
+    private BigDecimal planQuantity;
90
+
91
+    /** 完成数量 */
92
+    @ApiModelProperty(value = "完成数量", position = 16)
93
+    private BigDecimal completionQuantity;
94
+
95
+    @ApiModelProperty(value = "成品粮明细数据", position = 17)
96
+    List<BusinessPgGopsPlanDetail> detailList;
97
+}

+ 70 - 0
src/main/java/com/chinaitop/depot/pg/model/BusinessPgGopsPlanDetail.java

@@ -0,0 +1,70 @@
1
+package com.chinaitop.depot.pg.model;
2
+
3
+import com.fasterxml.jackson.annotation.JsonFormat;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.Getter;
6
+import lombok.Setter;
7
+
8
+import java.math.BigDecimal;
9
+import java.util.Date;
10
+
11
+/**
12
+ * 成品粮监管-购销计划管理-明细表实体
13
+ *
14
+ * @author TS
15
+ * @date  2024/06/11 15:42
16
+ **/
17
+@Getter
18
+@Setter
19
+public class BusinessPgGopsPlanDetail {
20
+
21
+    /** 明细记录唯一标识符 */
22
+    @ApiModelProperty(value = "明细记录唯一标识符", position = 1)
23
+    private Integer id;
24
+
25
+    /** 创建日期 */
26
+    @ApiModelProperty(value = "创建日期", position = 2)
27
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
28
+    private Date createdate;
29
+
30
+    /** 更新人 */
31
+    @ApiModelProperty(value = "更新人", position = 3)
32
+    private String updatename;
33
+
34
+    /** 更新日期 */
35
+    @ApiModelProperty(value = "更新日期", position = 4)
36
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
37
+    private Date updatedate;
38
+
39
+    /** business_pg_gops_plan的id; */
40
+    @ApiModelProperty(value = "business_pg_gops_plan的id;", position = 5)
41
+    private Integer pgGopsPlanId;
42
+
43
+    /** 商品;data_crkyw_cplsp_default的id; */
44
+    @ApiModelProperty(value = "商品;data_crkyw_cplsp_default的id;", position = 6)
45
+    private String crkywCplspDefaultId;
46
+
47
+    /** 性质 */
48
+    @ApiModelProperty(value = "性质", position = 7)
49
+    private String grainNatureId;
50
+
51
+    /** 数量 */
52
+    @ApiModelProperty(value = "数量", position = 8)
53
+    private BigDecimal quantity;
54
+
55
+    /** 重量,单位:吨 */
56
+    @ApiModelProperty(value = "重量,单位:吨", position = 9)
57
+    private BigDecimal weight;
58
+
59
+    /** 单价,单位:元 */
60
+    @ApiModelProperty(value = "单价,单位:元", position = 10)
61
+    private BigDecimal unitPrice;
62
+
63
+    /** 金额,单位:万元 */
64
+    @ApiModelProperty(value = "金额,单位:万元", position = 11)
65
+    private BigDecimal amount;
66
+
67
+    /** 完成数量 */
68
+    @ApiModelProperty(value = "完成数量", position = 16)
69
+    private BigDecimal completionQuantity;
70
+}

+ 910 - 0
src/main/java/com/chinaitop/depot/pg/model/BusinessPgGopsPlanDetailExample.java

@@ -0,0 +1,910 @@
1
+package com.chinaitop.depot.pg.model;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.ArrayList;
5
+import java.util.Date;
6
+import java.util.List;
7
+
8
+public class BusinessPgGopsPlanDetailExample {
9
+    /**
10
+     * business_pg_gops_plan_detail
11
+     */
12
+    protected String orderByClause;
13
+
14
+    /**
15
+     * business_pg_gops_plan_detail
16
+     */
17
+    protected boolean distinct;
18
+
19
+    /**
20
+     * business_pg_gops_plan_detail
21
+     */
22
+    protected List<Criteria> oredCriteria;
23
+
24
+    public BusinessPgGopsPlanDetailExample() {
25
+        oredCriteria = new ArrayList<Criteria>();
26
+    }
27
+
28
+    public void setOrderByClause(String orderByClause) {
29
+        this.orderByClause = orderByClause;
30
+    }
31
+
32
+    public String getOrderByClause() {
33
+        return orderByClause;
34
+    }
35
+
36
+    public void setDistinct(boolean distinct) {
37
+        this.distinct = distinct;
38
+    }
39
+
40
+    public boolean isDistinct() {
41
+        return distinct;
42
+    }
43
+
44
+    public List<Criteria> getOredCriteria() {
45
+        return oredCriteria;
46
+    }
47
+
48
+    public void or(Criteria criteria) {
49
+        oredCriteria.add(criteria);
50
+    }
51
+
52
+    public Criteria or() {
53
+        Criteria criteria = createCriteriaInternal();
54
+        oredCriteria.add(criteria);
55
+        return criteria;
56
+    }
57
+
58
+    public Criteria createCriteria() {
59
+        Criteria criteria = createCriteriaInternal();
60
+        if (oredCriteria.size() == 0) {
61
+            oredCriteria.add(criteria);
62
+        }
63
+        return criteria;
64
+    }
65
+
66
+    protected Criteria createCriteriaInternal() {
67
+        Criteria criteria = new Criteria();
68
+        return criteria;
69
+    }
70
+
71
+    public void clear() {
72
+        oredCriteria.clear();
73
+        orderByClause = null;
74
+        distinct = false;
75
+    }
76
+
77
+    /**
78
+     * business_pg_gops_plan_detail 2024-06-11
79
+     */
80
+    protected abstract static class GeneratedCriteria {
81
+        protected List<Criterion> criteria;
82
+
83
+        protected GeneratedCriteria() {
84
+            super();
85
+            criteria = new ArrayList<Criterion>();
86
+        }
87
+
88
+        public boolean isValid() {
89
+            return criteria.size() > 0;
90
+        }
91
+
92
+        public List<Criterion> getAllCriteria() {
93
+            return criteria;
94
+        }
95
+
96
+        public List<Criterion> getCriteria() {
97
+            return criteria;
98
+        }
99
+
100
+        protected void addCriterion(String condition) {
101
+            if (condition == null) {
102
+                throw new RuntimeException("Value for condition cannot be null");
103
+            }
104
+            criteria.add(new Criterion(condition));
105
+        }
106
+
107
+        protected void addCriterion(String condition, Object value, String property) {
108
+            if (value == null) {
109
+                throw new RuntimeException("Value for " + property + " cannot be null");
110
+            }
111
+            criteria.add(new Criterion(condition, value));
112
+        }
113
+
114
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
115
+            if (value1 == null || value2 == null) {
116
+                throw new RuntimeException("Between values for " + property + " cannot be null");
117
+            }
118
+            criteria.add(new Criterion(condition, value1, value2));
119
+        }
120
+
121
+        public Criteria andIdIsNull() {
122
+            addCriterion("id is null");
123
+            return (Criteria) this;
124
+        }
125
+
126
+        public Criteria andIdIsNotNull() {
127
+            addCriterion("id is not null");
128
+            return (Criteria) this;
129
+        }
130
+
131
+        public Criteria andIdEqualTo(Integer value) {
132
+            addCriterion("id =", value, "id");
133
+            return (Criteria) this;
134
+        }
135
+
136
+        public Criteria andIdNotEqualTo(Integer value) {
137
+            addCriterion("id <>", value, "id");
138
+            return (Criteria) this;
139
+        }
140
+
141
+        public Criteria andIdGreaterThan(Integer value) {
142
+            addCriterion("id >", value, "id");
143
+            return (Criteria) this;
144
+        }
145
+
146
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
147
+            addCriterion("id >=", value, "id");
148
+            return (Criteria) this;
149
+        }
150
+
151
+        public Criteria andIdLessThan(Integer value) {
152
+            addCriterion("id <", value, "id");
153
+            return (Criteria) this;
154
+        }
155
+
156
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
157
+            addCriterion("id <=", value, "id");
158
+            return (Criteria) this;
159
+        }
160
+
161
+        public Criteria andIdIn(List<Integer> values) {
162
+            addCriterion("id in", values, "id");
163
+            return (Criteria) this;
164
+        }
165
+
166
+        public Criteria andIdNotIn(List<Integer> values) {
167
+            addCriterion("id not in", values, "id");
168
+            return (Criteria) this;
169
+        }
170
+
171
+        public Criteria andIdBetween(Integer value1, Integer value2) {
172
+            addCriterion("id between", value1, value2, "id");
173
+            return (Criteria) this;
174
+        }
175
+
176
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
177
+            addCriterion("id not between", value1, value2, "id");
178
+            return (Criteria) this;
179
+        }
180
+
181
+        public Criteria andCreatedateIsNull() {
182
+            addCriterion("createdate is null");
183
+            return (Criteria) this;
184
+        }
185
+
186
+        public Criteria andCreatedateIsNotNull() {
187
+            addCriterion("createdate is not null");
188
+            return (Criteria) this;
189
+        }
190
+
191
+        public Criteria andCreatedateEqualTo(Date value) {
192
+            addCriterion("createdate =", value, "createdate");
193
+            return (Criteria) this;
194
+        }
195
+
196
+        public Criteria andCreatedateNotEqualTo(Date value) {
197
+            addCriterion("createdate <>", value, "createdate");
198
+            return (Criteria) this;
199
+        }
200
+
201
+        public Criteria andCreatedateGreaterThan(Date value) {
202
+            addCriterion("createdate >", value, "createdate");
203
+            return (Criteria) this;
204
+        }
205
+
206
+        public Criteria andCreatedateGreaterThanOrEqualTo(Date value) {
207
+            addCriterion("createdate >=", value, "createdate");
208
+            return (Criteria) this;
209
+        }
210
+
211
+        public Criteria andCreatedateLessThan(Date value) {
212
+            addCriterion("createdate <", value, "createdate");
213
+            return (Criteria) this;
214
+        }
215
+
216
+        public Criteria andCreatedateLessThanOrEqualTo(Date value) {
217
+            addCriterion("createdate <=", value, "createdate");
218
+            return (Criteria) this;
219
+        }
220
+
221
+        public Criteria andCreatedateIn(List<Date> values) {
222
+            addCriterion("createdate in", values, "createdate");
223
+            return (Criteria) this;
224
+        }
225
+
226
+        public Criteria andCreatedateNotIn(List<Date> values) {
227
+            addCriterion("createdate not in", values, "createdate");
228
+            return (Criteria) this;
229
+        }
230
+
231
+        public Criteria andCreatedateBetween(Date value1, Date value2) {
232
+            addCriterion("createdate between", value1, value2, "createdate");
233
+            return (Criteria) this;
234
+        }
235
+
236
+        public Criteria andCreatedateNotBetween(Date value1, Date value2) {
237
+            addCriterion("createdate not between", value1, value2, "createdate");
238
+            return (Criteria) this;
239
+        }
240
+
241
+        public Criteria andUpdatenameIsNull() {
242
+            addCriterion("updatename is null");
243
+            return (Criteria) this;
244
+        }
245
+
246
+        public Criteria andUpdatenameIsNotNull() {
247
+            addCriterion("updatename is not null");
248
+            return (Criteria) this;
249
+        }
250
+
251
+        public Criteria andUpdatenameEqualTo(String value) {
252
+            addCriterion("updatename =", value, "updatename");
253
+            return (Criteria) this;
254
+        }
255
+
256
+        public Criteria andUpdatenameNotEqualTo(String value) {
257
+            addCriterion("updatename <>", value, "updatename");
258
+            return (Criteria) this;
259
+        }
260
+
261
+        public Criteria andUpdatenameGreaterThan(String value) {
262
+            addCriterion("updatename >", value, "updatename");
263
+            return (Criteria) this;
264
+        }
265
+
266
+        public Criteria andUpdatenameGreaterThanOrEqualTo(String value) {
267
+            addCriterion("updatename >=", value, "updatename");
268
+            return (Criteria) this;
269
+        }
270
+
271
+        public Criteria andUpdatenameLessThan(String value) {
272
+            addCriterion("updatename <", value, "updatename");
273
+            return (Criteria) this;
274
+        }
275
+
276
+        public Criteria andUpdatenameLessThanOrEqualTo(String value) {
277
+            addCriterion("updatename <=", value, "updatename");
278
+            return (Criteria) this;
279
+        }
280
+
281
+        public Criteria andUpdatenameLike(String value) {
282
+            addCriterion("updatename like", value, "updatename");
283
+            return (Criteria) this;
284
+        }
285
+
286
+        public Criteria andUpdatenameNotLike(String value) {
287
+            addCriterion("updatename not like", value, "updatename");
288
+            return (Criteria) this;
289
+        }
290
+
291
+        public Criteria andUpdatenameIn(List<String> values) {
292
+            addCriterion("updatename in", values, "updatename");
293
+            return (Criteria) this;
294
+        }
295
+
296
+        public Criteria andUpdatenameNotIn(List<String> values) {
297
+            addCriterion("updatename not in", values, "updatename");
298
+            return (Criteria) this;
299
+        }
300
+
301
+        public Criteria andUpdatenameBetween(String value1, String value2) {
302
+            addCriterion("updatename between", value1, value2, "updatename");
303
+            return (Criteria) this;
304
+        }
305
+
306
+        public Criteria andUpdatenameNotBetween(String value1, String value2) {
307
+            addCriterion("updatename not between", value1, value2, "updatename");
308
+            return (Criteria) this;
309
+        }
310
+
311
+        public Criteria andUpdatedateIsNull() {
312
+            addCriterion("updatedate is null");
313
+            return (Criteria) this;
314
+        }
315
+
316
+        public Criteria andUpdatedateIsNotNull() {
317
+            addCriterion("updatedate is not null");
318
+            return (Criteria) this;
319
+        }
320
+
321
+        public Criteria andUpdatedateEqualTo(Date value) {
322
+            addCriterion("updatedate =", value, "updatedate");
323
+            return (Criteria) this;
324
+        }
325
+
326
+        public Criteria andUpdatedateNotEqualTo(Date value) {
327
+            addCriterion("updatedate <>", value, "updatedate");
328
+            return (Criteria) this;
329
+        }
330
+
331
+        public Criteria andUpdatedateGreaterThan(Date value) {
332
+            addCriterion("updatedate >", value, "updatedate");
333
+            return (Criteria) this;
334
+        }
335
+
336
+        public Criteria andUpdatedateGreaterThanOrEqualTo(Date value) {
337
+            addCriterion("updatedate >=", value, "updatedate");
338
+            return (Criteria) this;
339
+        }
340
+
341
+        public Criteria andUpdatedateLessThan(Date value) {
342
+            addCriterion("updatedate <", value, "updatedate");
343
+            return (Criteria) this;
344
+        }
345
+
346
+        public Criteria andUpdatedateLessThanOrEqualTo(Date value) {
347
+            addCriterion("updatedate <=", value, "updatedate");
348
+            return (Criteria) this;
349
+        }
350
+
351
+        public Criteria andUpdatedateIn(List<Date> values) {
352
+            addCriterion("updatedate in", values, "updatedate");
353
+            return (Criteria) this;
354
+        }
355
+
356
+        public Criteria andUpdatedateNotIn(List<Date> values) {
357
+            addCriterion("updatedate not in", values, "updatedate");
358
+            return (Criteria) this;
359
+        }
360
+
361
+        public Criteria andUpdatedateBetween(Date value1, Date value2) {
362
+            addCriterion("updatedate between", value1, value2, "updatedate");
363
+            return (Criteria) this;
364
+        }
365
+
366
+        public Criteria andUpdatedateNotBetween(Date value1, Date value2) {
367
+            addCriterion("updatedate not between", value1, value2, "updatedate");
368
+            return (Criteria) this;
369
+        }
370
+
371
+        public Criteria andPgGopsPlanIdIsNull() {
372
+            addCriterion("pg_gops_plan_id is null");
373
+            return (Criteria) this;
374
+        }
375
+
376
+        public Criteria andPgGopsPlanIdIsNotNull() {
377
+            addCriterion("pg_gops_plan_id is not null");
378
+            return (Criteria) this;
379
+        }
380
+
381
+        public Criteria andPgGopsPlanIdEqualTo(Integer value) {
382
+            addCriterion("pg_gops_plan_id =", value, "pgGopsPlanId");
383
+            return (Criteria) this;
384
+        }
385
+
386
+        public Criteria andPgGopsPlanIdNotEqualTo(Integer value) {
387
+            addCriterion("pg_gops_plan_id <>", value, "pgGopsPlanId");
388
+            return (Criteria) this;
389
+        }
390
+
391
+        public Criteria andPgGopsPlanIdGreaterThan(Integer value) {
392
+            addCriterion("pg_gops_plan_id >", value, "pgGopsPlanId");
393
+            return (Criteria) this;
394
+        }
395
+
396
+        public Criteria andPgGopsPlanIdGreaterThanOrEqualTo(Integer value) {
397
+            addCriterion("pg_gops_plan_id >=", value, "pgGopsPlanId");
398
+            return (Criteria) this;
399
+        }
400
+
401
+        public Criteria andPgGopsPlanIdLessThan(Integer value) {
402
+            addCriterion("pg_gops_plan_id <", value, "pgGopsPlanId");
403
+            return (Criteria) this;
404
+        }
405
+
406
+        public Criteria andPgGopsPlanIdLessThanOrEqualTo(Integer value) {
407
+            addCriterion("pg_gops_plan_id <=", value, "pgGopsPlanId");
408
+            return (Criteria) this;
409
+        }
410
+
411
+        public Criteria andPgGopsPlanIdIn(List<Integer> values) {
412
+            addCriterion("pg_gops_plan_id in", values, "pgGopsPlanId");
413
+            return (Criteria) this;
414
+        }
415
+
416
+        public Criteria andPgGopsPlanIdNotIn(List<Integer> values) {
417
+            addCriterion("pg_gops_plan_id not in", values, "pgGopsPlanId");
418
+            return (Criteria) this;
419
+        }
420
+
421
+        public Criteria andPgGopsPlanIdBetween(Integer value1, Integer value2) {
422
+            addCriterion("pg_gops_plan_id between", value1, value2, "pgGopsPlanId");
423
+            return (Criteria) this;
424
+        }
425
+
426
+        public Criteria andPgGopsPlanIdNotBetween(Integer value1, Integer value2) {
427
+            addCriterion("pg_gops_plan_id not between", value1, value2, "pgGopsPlanId");
428
+            return (Criteria) this;
429
+        }
430
+
431
+        public Criteria andCrkywCplspDefaultIdIsNull() {
432
+            addCriterion("crkyw_cplsp_default_id is null");
433
+            return (Criteria) this;
434
+        }
435
+
436
+        public Criteria andCrkywCplspDefaultIdIsNotNull() {
437
+            addCriterion("crkyw_cplsp_default_id is not null");
438
+            return (Criteria) this;
439
+        }
440
+
441
+        public Criteria andCrkywCplspDefaultIdEqualTo(String value) {
442
+            addCriterion("crkyw_cplsp_default_id =", value, "crkywCplspDefaultId");
443
+            return (Criteria) this;
444
+        }
445
+
446
+        public Criteria andCrkywCplspDefaultIdNotEqualTo(String value) {
447
+            addCriterion("crkyw_cplsp_default_id <>", value, "crkywCplspDefaultId");
448
+            return (Criteria) this;
449
+        }
450
+
451
+        public Criteria andCrkywCplspDefaultIdGreaterThan(String value) {
452
+            addCriterion("crkyw_cplsp_default_id >", value, "crkywCplspDefaultId");
453
+            return (Criteria) this;
454
+        }
455
+
456
+        public Criteria andCrkywCplspDefaultIdGreaterThanOrEqualTo(String value) {
457
+            addCriterion("crkyw_cplsp_default_id >=", value, "crkywCplspDefaultId");
458
+            return (Criteria) this;
459
+        }
460
+
461
+        public Criteria andCrkywCplspDefaultIdLessThan(String value) {
462
+            addCriterion("crkyw_cplsp_default_id <", value, "crkywCplspDefaultId");
463
+            return (Criteria) this;
464
+        }
465
+
466
+        public Criteria andCrkywCplspDefaultIdLessThanOrEqualTo(String value) {
467
+            addCriterion("crkyw_cplsp_default_id <=", value, "crkywCplspDefaultId");
468
+            return (Criteria) this;
469
+        }
470
+
471
+        public Criteria andCrkywCplspDefaultIdLike(String value) {
472
+            addCriterion("crkyw_cplsp_default_id like", value, "crkywCplspDefaultId");
473
+            return (Criteria) this;
474
+        }
475
+
476
+        public Criteria andCrkywCplspDefaultIdNotLike(String value) {
477
+            addCriterion("crkyw_cplsp_default_id not like", value, "crkywCplspDefaultId");
478
+            return (Criteria) this;
479
+        }
480
+
481
+        public Criteria andCrkywCplspDefaultIdIn(List<String> values) {
482
+            addCriterion("crkyw_cplsp_default_id in", values, "crkywCplspDefaultId");
483
+            return (Criteria) this;
484
+        }
485
+
486
+        public Criteria andCrkywCplspDefaultIdNotIn(List<String> values) {
487
+            addCriterion("crkyw_cplsp_default_id not in", values, "crkywCplspDefaultId");
488
+            return (Criteria) this;
489
+        }
490
+
491
+        public Criteria andCrkywCplspDefaultIdBetween(String value1, String value2) {
492
+            addCriterion("crkyw_cplsp_default_id between", value1, value2, "crkywCplspDefaultId");
493
+            return (Criteria) this;
494
+        }
495
+
496
+        public Criteria andCrkywCplspDefaultIdNotBetween(String value1, String value2) {
497
+            addCriterion("crkyw_cplsp_default_id not between", value1, value2, "crkywCplspDefaultId");
498
+            return (Criteria) this;
499
+        }
500
+
501
+        public Criteria andGrainNatureIdIsNull() {
502
+            addCriterion("grain_nature_id is null");
503
+            return (Criteria) this;
504
+        }
505
+
506
+        public Criteria andGrainNatureIdIsNotNull() {
507
+            addCriterion("grain_nature_id is not null");
508
+            return (Criteria) this;
509
+        }
510
+
511
+        public Criteria andGrainNatureIdEqualTo(String value) {
512
+            addCriterion("grain_nature_id =", value, "grainNatureId");
513
+            return (Criteria) this;
514
+        }
515
+
516
+        public Criteria andGrainNatureIdNotEqualTo(String value) {
517
+            addCriterion("grain_nature_id <>", value, "grainNatureId");
518
+            return (Criteria) this;
519
+        }
520
+
521
+        public Criteria andGrainNatureIdGreaterThan(String value) {
522
+            addCriterion("grain_nature_id >", value, "grainNatureId");
523
+            return (Criteria) this;
524
+        }
525
+
526
+        public Criteria andGrainNatureIdGreaterThanOrEqualTo(String value) {
527
+            addCriterion("grain_nature_id >=", value, "grainNatureId");
528
+            return (Criteria) this;
529
+        }
530
+
531
+        public Criteria andGrainNatureIdLessThan(String value) {
532
+            addCriterion("grain_nature_id <", value, "grainNatureId");
533
+            return (Criteria) this;
534
+        }
535
+
536
+        public Criteria andGrainNatureIdLessThanOrEqualTo(String value) {
537
+            addCriterion("grain_nature_id <=", value, "grainNatureId");
538
+            return (Criteria) this;
539
+        }
540
+
541
+        public Criteria andGrainNatureIdLike(String value) {
542
+            addCriterion("grain_nature_id like", value, "grainNatureId");
543
+            return (Criteria) this;
544
+        }
545
+
546
+        public Criteria andGrainNatureIdNotLike(String value) {
547
+            addCriterion("grain_nature_id not like", value, "grainNatureId");
548
+            return (Criteria) this;
549
+        }
550
+
551
+        public Criteria andGrainNatureIdIn(List<String> values) {
552
+            addCriterion("grain_nature_id in", values, "grainNatureId");
553
+            return (Criteria) this;
554
+        }
555
+
556
+        public Criteria andGrainNatureIdNotIn(List<String> values) {
557
+            addCriterion("grain_nature_id not in", values, "grainNatureId");
558
+            return (Criteria) this;
559
+        }
560
+
561
+        public Criteria andGrainNatureIdBetween(String value1, String value2) {
562
+            addCriterion("grain_nature_id between", value1, value2, "grainNatureId");
563
+            return (Criteria) this;
564
+        }
565
+
566
+        public Criteria andGrainNatureIdNotBetween(String value1, String value2) {
567
+            addCriterion("grain_nature_id not between", value1, value2, "grainNatureId");
568
+            return (Criteria) this;
569
+        }
570
+
571
+        public Criteria andQuantityIsNull() {
572
+            addCriterion("quantity is null");
573
+            return (Criteria) this;
574
+        }
575
+
576
+        public Criteria andQuantityIsNotNull() {
577
+            addCriterion("quantity is not null");
578
+            return (Criteria) this;
579
+        }
580
+
581
+        public Criteria andQuantityEqualTo(BigDecimal value) {
582
+            addCriterion("quantity =", value, "quantity");
583
+            return (Criteria) this;
584
+        }
585
+
586
+        public Criteria andQuantityNotEqualTo(BigDecimal value) {
587
+            addCriterion("quantity <>", value, "quantity");
588
+            return (Criteria) this;
589
+        }
590
+
591
+        public Criteria andQuantityGreaterThan(BigDecimal value) {
592
+            addCriterion("quantity >", value, "quantity");
593
+            return (Criteria) this;
594
+        }
595
+
596
+        public Criteria andQuantityGreaterThanOrEqualTo(BigDecimal value) {
597
+            addCriterion("quantity >=", value, "quantity");
598
+            return (Criteria) this;
599
+        }
600
+
601
+        public Criteria andQuantityLessThan(BigDecimal value) {
602
+            addCriterion("quantity <", value, "quantity");
603
+            return (Criteria) this;
604
+        }
605
+
606
+        public Criteria andQuantityLessThanOrEqualTo(BigDecimal value) {
607
+            addCriterion("quantity <=", value, "quantity");
608
+            return (Criteria) this;
609
+        }
610
+
611
+        public Criteria andQuantityIn(List<BigDecimal> values) {
612
+            addCriterion("quantity in", values, "quantity");
613
+            return (Criteria) this;
614
+        }
615
+
616
+        public Criteria andQuantityNotIn(List<BigDecimal> values) {
617
+            addCriterion("quantity not in", values, "quantity");
618
+            return (Criteria) this;
619
+        }
620
+
621
+        public Criteria andQuantityBetween(BigDecimal value1, BigDecimal value2) {
622
+            addCriterion("quantity between", value1, value2, "quantity");
623
+            return (Criteria) this;
624
+        }
625
+
626
+        public Criteria andQuantityNotBetween(BigDecimal value1, BigDecimal value2) {
627
+            addCriterion("quantity not between", value1, value2, "quantity");
628
+            return (Criteria) this;
629
+        }
630
+
631
+        public Criteria andWeightIsNull() {
632
+            addCriterion("weight is null");
633
+            return (Criteria) this;
634
+        }
635
+
636
+        public Criteria andWeightIsNotNull() {
637
+            addCriterion("weight is not null");
638
+            return (Criteria) this;
639
+        }
640
+
641
+        public Criteria andWeightEqualTo(BigDecimal value) {
642
+            addCriterion("weight =", value, "weight");
643
+            return (Criteria) this;
644
+        }
645
+
646
+        public Criteria andWeightNotEqualTo(BigDecimal value) {
647
+            addCriterion("weight <>", value, "weight");
648
+            return (Criteria) this;
649
+        }
650
+
651
+        public Criteria andWeightGreaterThan(BigDecimal value) {
652
+            addCriterion("weight >", value, "weight");
653
+            return (Criteria) this;
654
+        }
655
+
656
+        public Criteria andWeightGreaterThanOrEqualTo(BigDecimal value) {
657
+            addCriterion("weight >=", value, "weight");
658
+            return (Criteria) this;
659
+        }
660
+
661
+        public Criteria andWeightLessThan(BigDecimal value) {
662
+            addCriterion("weight <", value, "weight");
663
+            return (Criteria) this;
664
+        }
665
+
666
+        public Criteria andWeightLessThanOrEqualTo(BigDecimal value) {
667
+            addCriterion("weight <=", value, "weight");
668
+            return (Criteria) this;
669
+        }
670
+
671
+        public Criteria andWeightIn(List<BigDecimal> values) {
672
+            addCriterion("weight in", values, "weight");
673
+            return (Criteria) this;
674
+        }
675
+
676
+        public Criteria andWeightNotIn(List<BigDecimal> values) {
677
+            addCriterion("weight not in", values, "weight");
678
+            return (Criteria) this;
679
+        }
680
+
681
+        public Criteria andWeightBetween(BigDecimal value1, BigDecimal value2) {
682
+            addCriterion("weight between", value1, value2, "weight");
683
+            return (Criteria) this;
684
+        }
685
+
686
+        public Criteria andWeightNotBetween(BigDecimal value1, BigDecimal value2) {
687
+            addCriterion("weight not between", value1, value2, "weight");
688
+            return (Criteria) this;
689
+        }
690
+
691
+        public Criteria andUnitPriceIsNull() {
692
+            addCriterion("unit_price is null");
693
+            return (Criteria) this;
694
+        }
695
+
696
+        public Criteria andUnitPriceIsNotNull() {
697
+            addCriterion("unit_price is not null");
698
+            return (Criteria) this;
699
+        }
700
+
701
+        public Criteria andUnitPriceEqualTo(BigDecimal value) {
702
+            addCriterion("unit_price =", value, "unitPrice");
703
+            return (Criteria) this;
704
+        }
705
+
706
+        public Criteria andUnitPriceNotEqualTo(BigDecimal value) {
707
+            addCriterion("unit_price <>", value, "unitPrice");
708
+            return (Criteria) this;
709
+        }
710
+
711
+        public Criteria andUnitPriceGreaterThan(BigDecimal value) {
712
+            addCriterion("unit_price >", value, "unitPrice");
713
+            return (Criteria) this;
714
+        }
715
+
716
+        public Criteria andUnitPriceGreaterThanOrEqualTo(BigDecimal value) {
717
+            addCriterion("unit_price >=", value, "unitPrice");
718
+            return (Criteria) this;
719
+        }
720
+
721
+        public Criteria andUnitPriceLessThan(BigDecimal value) {
722
+            addCriterion("unit_price <", value, "unitPrice");
723
+            return (Criteria) this;
724
+        }
725
+
726
+        public Criteria andUnitPriceLessThanOrEqualTo(BigDecimal value) {
727
+            addCriterion("unit_price <=", value, "unitPrice");
728
+            return (Criteria) this;
729
+        }
730
+
731
+        public Criteria andUnitPriceIn(List<BigDecimal> values) {
732
+            addCriterion("unit_price in", values, "unitPrice");
733
+            return (Criteria) this;
734
+        }
735
+
736
+        public Criteria andUnitPriceNotIn(List<BigDecimal> values) {
737
+            addCriterion("unit_price not in", values, "unitPrice");
738
+            return (Criteria) this;
739
+        }
740
+
741
+        public Criteria andUnitPriceBetween(BigDecimal value1, BigDecimal value2) {
742
+            addCriterion("unit_price between", value1, value2, "unitPrice");
743
+            return (Criteria) this;
744
+        }
745
+
746
+        public Criteria andUnitPriceNotBetween(BigDecimal value1, BigDecimal value2) {
747
+            addCriterion("unit_price not between", value1, value2, "unitPrice");
748
+            return (Criteria) this;
749
+        }
750
+
751
+        public Criteria andAmountIsNull() {
752
+            addCriterion("amount is null");
753
+            return (Criteria) this;
754
+        }
755
+
756
+        public Criteria andAmountIsNotNull() {
757
+            addCriterion("amount is not null");
758
+            return (Criteria) this;
759
+        }
760
+
761
+        public Criteria andAmountEqualTo(BigDecimal value) {
762
+            addCriterion("amount =", value, "amount");
763
+            return (Criteria) this;
764
+        }
765
+
766
+        public Criteria andAmountNotEqualTo(BigDecimal value) {
767
+            addCriterion("amount <>", value, "amount");
768
+            return (Criteria) this;
769
+        }
770
+
771
+        public Criteria andAmountGreaterThan(BigDecimal value) {
772
+            addCriterion("amount >", value, "amount");
773
+            return (Criteria) this;
774
+        }
775
+
776
+        public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) {
777
+            addCriterion("amount >=", value, "amount");
778
+            return (Criteria) this;
779
+        }
780
+
781
+        public Criteria andAmountLessThan(BigDecimal value) {
782
+            addCriterion("amount <", value, "amount");
783
+            return (Criteria) this;
784
+        }
785
+
786
+        public Criteria andAmountLessThanOrEqualTo(BigDecimal value) {
787
+            addCriterion("amount <=", value, "amount");
788
+            return (Criteria) this;
789
+        }
790
+
791
+        public Criteria andAmountIn(List<BigDecimal> values) {
792
+            addCriterion("amount in", values, "amount");
793
+            return (Criteria) this;
794
+        }
795
+
796
+        public Criteria andAmountNotIn(List<BigDecimal> values) {
797
+            addCriterion("amount not in", values, "amount");
798
+            return (Criteria) this;
799
+        }
800
+
801
+        public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) {
802
+            addCriterion("amount between", value1, value2, "amount");
803
+            return (Criteria) this;
804
+        }
805
+
806
+        public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) {
807
+            addCriterion("amount not between", value1, value2, "amount");
808
+            return (Criteria) this;
809
+        }
810
+    }
811
+
812
+    /**
813
+     * business_pg_gops_plan_detail
814
+     */
815
+    public static class Criteria extends GeneratedCriteria {
816
+
817
+        protected Criteria() {
818
+            super();
819
+        }
820
+    }
821
+
822
+    /**
823
+     * business_pg_gops_plan_detail 2024-06-11
824
+     */
825
+    public static class Criterion {
826
+        private String condition;
827
+
828
+        private Object value;
829
+
830
+        private Object secondValue;
831
+
832
+        private boolean noValue;
833
+
834
+        private boolean singleValue;
835
+
836
+        private boolean betweenValue;
837
+
838
+        private boolean listValue;
839
+
840
+        private String typeHandler;
841
+
842
+        public String getCondition() {
843
+            return condition;
844
+        }
845
+
846
+        public Object getValue() {
847
+            return value;
848
+        }
849
+
850
+        public Object getSecondValue() {
851
+            return secondValue;
852
+        }
853
+
854
+        public boolean isNoValue() {
855
+            return noValue;
856
+        }
857
+
858
+        public boolean isSingleValue() {
859
+            return singleValue;
860
+        }
861
+
862
+        public boolean isBetweenValue() {
863
+            return betweenValue;
864
+        }
865
+
866
+        public boolean isListValue() {
867
+            return listValue;
868
+        }
869
+
870
+        public String getTypeHandler() {
871
+            return typeHandler;
872
+        }
873
+
874
+        protected Criterion(String condition) {
875
+            super();
876
+            this.condition = condition;
877
+            this.typeHandler = null;
878
+            this.noValue = true;
879
+        }
880
+
881
+        protected Criterion(String condition, Object value, String typeHandler) {
882
+            super();
883
+            this.condition = condition;
884
+            this.value = value;
885
+            this.typeHandler = typeHandler;
886
+            if (value instanceof List<?>) {
887
+                this.listValue = true;
888
+            } else {
889
+                this.singleValue = true;
890
+            }
891
+        }
892
+
893
+        protected Criterion(String condition, Object value) {
894
+            this(condition, value, null);
895
+        }
896
+
897
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
898
+            super();
899
+            this.condition = condition;
900
+            this.value = value;
901
+            this.secondValue = secondValue;
902
+            this.typeHandler = typeHandler;
903
+            this.betweenValue = true;
904
+        }
905
+
906
+        protected Criterion(String condition, Object value, Object secondValue) {
907
+            this(condition, value, secondValue, null);
908
+        }
909
+    }
910
+}

Разница между файлами не показана из-за своего большого размера
+ 1220 - 0
src/main/java/com/chinaitop/depot/pg/model/BusinessPgGopsPlanExample.java


+ 59 - 0
src/main/java/com/chinaitop/depot/pg/model/vo/BusinessPgGopsPlanDetailVO.java

@@ -0,0 +1,59 @@
1
+package com.chinaitop.depot.pg.model.vo;
2
+
3
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetail;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.Getter;
6
+import lombok.Setter;
7
+
8
+import java.math.BigDecimal;
9
+import java.util.Date;
10
+
11
+/**
12
+ * 成品粮监管-购销计划管理-明细表实体
13
+ *
14
+ * @author TS
15
+ * @date  2024/06/11 15:42
16
+ **/
17
+@Getter
18
+@Setter
19
+public class BusinessPgGopsPlanDetailVO extends BusinessPgGopsPlanDetail {
20
+
21
+
22
+    @ApiModelProperty(value = "实际军粮品种名称")
23
+    private String sjjlpzmc;
24
+
25
+    @ApiModelProperty(value = "实际军粮品种编号")
26
+    private String sjjlpzbh;
27
+
28
+    @ApiModelProperty(value = "实际军粮品牌名称")
29
+    private String sjjlppmc;
30
+
31
+
32
+    @ApiModelProperty(value = "等级")
33
+    private String dj;
34
+
35
+    @ApiModelProperty(value = "等级名称")
36
+    private String djmc;
37
+
38
+    @ApiModelProperty(value = "实际军粮商品名称")
39
+    private String sjjlspmc;
40
+
41
+    @ApiModelProperty(value = "实际军粮商品名称编号")
42
+    private String sjjlspmcbh;
43
+
44
+    @ApiModelProperty(value = "规格")
45
+    private String gg;
46
+
47
+    @ApiModelProperty(value = "计量单位")
48
+    private String jldw;
49
+
50
+    @ApiModelProperty(value = "计量单位名称")
51
+    private String jldwmc;
52
+
53
+    @ApiModelProperty(value = "保质期")
54
+    private String bzq;
55
+
56
+    @ApiModelProperty(value = "性质名称", position = 7)
57
+    private String grainNatureName;
58
+
59
+}

+ 29 - 0
src/main/java/com/chinaitop/depot/pg/model/vo/BusinessPgGopsPlanVO.java

@@ -0,0 +1,29 @@
1
+package com.chinaitop.depot.pg.model.vo;
2
+
3
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlan;
4
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetail;
5
+import io.swagger.annotations.ApiModelProperty;
6
+import lombok.Getter;
7
+import lombok.Setter;
8
+
9
+import java.math.BigDecimal;
10
+import java.util.Date;
11
+import java.util.List;
12
+
13
+/**
14
+ * 成品粮监管-购销计划管理表VO
15
+ *
16
+ * @author TS
17
+ * @date  2024/06/11 15:41
18
+ **/
19
+@Getter
20
+@Setter
21
+public class BusinessPgGopsPlanVO extends BusinessPgGopsPlan {
22
+
23
+
24
+    @ApiModelProperty(value = "库区名称", position = 2)
25
+    private String orgName;
26
+
27
+    @ApiModelProperty(value = "回显成品粮明细数据", position = 3)
28
+    List<BusinessPgGopsPlanDetailVO> detailVoList;
29
+}

+ 68 - 0
src/main/java/com/chinaitop/depot/pg/model/vo/DataCrkywCplspDefaultVO.java

@@ -0,0 +1,68 @@
1
+package com.chinaitop.depot.pg.model.vo;
2
+
3
+import com.fasterxml.jackson.annotation.JsonFormat;
4
+import io.swagger.annotations.ApiModel;
5
+import io.swagger.annotations.ApiModelProperty;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.util.Date;
12
+
13
+/**
14
+ * <p>
15
+ * 成品粮商品表
16
+ * </p>
17
+ *
18
+ * @author TangSong
19
+ * @since 2024-06-11
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@ApiModel(value="DataCrkywCplspDefault对象", description="成品粮商品表")
25
+public class DataCrkywCplspDefaultVO implements Serializable {
26
+
27
+private static final long serialVersionUID=1L;
28
+
29
+    @ApiModelProperty(value = "ID")
30
+    private String dataId;
31
+
32
+    @ApiModelProperty(value = "创建时间")
33
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
34
+    private Date cjsj;
35
+
36
+    @ApiModelProperty(value = "实际军粮品种名称")
37
+    private String sjjlpzmc;
38
+
39
+    @ApiModelProperty(value = "实际军粮品种编号")
40
+    private String sjjlpzbh;
41
+
42
+    @ApiModelProperty(value = "实际军粮品牌名称")
43
+    private String sjjlppmc;
44
+
45
+    @ApiModelProperty(value = "等级")
46
+    private String dj;
47
+
48
+    @ApiModelProperty(value = "等级名称")
49
+    private String djmc;
50
+
51
+    @ApiModelProperty(value = "实际军粮商品名称")
52
+    private String sjjlspmc;
53
+
54
+    @ApiModelProperty(value = "实际军粮商品名称编号")
55
+    private String sjjlspmcbh;
56
+
57
+    @ApiModelProperty(value = "规格")
58
+    private String gg;
59
+
60
+    @ApiModelProperty(value = "计量单位")
61
+    private String jldw;
62
+
63
+    @ApiModelProperty(value = "计量单位名称")
64
+    private String jldwmc;
65
+
66
+    @ApiModelProperty(value = "保质期")
67
+    private String bzq;
68
+}

+ 32 - 0
src/main/java/com/chinaitop/depot/pg/param/BusinessPgGopsPlanPageParam.java

@@ -0,0 +1,32 @@
1
+package com.chinaitop.depot.pg.param;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+import lombok.Getter;
5
+import lombok.Setter;
6
+
7
+@Getter
8
+@Setter
9
+public class BusinessPgGopsPlanPageParam {
10
+
11
+    /** 当前页 */
12
+    @ApiModelProperty(value = "当前页码")
13
+    private Integer current;
14
+
15
+    /** 每页条数 */
16
+    @ApiModelProperty(value = "每页条数")
17
+    private Integer size;
18
+
19
+    @ApiModelProperty(value = "库区名称")
20
+    private String orgName;
21
+
22
+    @ApiModelProperty(value = "企业名称")
23
+    private String unitName;
24
+    /** 性质id */
25
+    @ApiModelProperty(value = "性质id")
26
+    private String grainNatureId;
27
+
28
+    @ApiModelProperty(value = "年度")
29
+    private String year;
30
+
31
+
32
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/pg/service/BusinessPgGopsPlanDetailService.java

@@ -0,0 +1,16 @@
1
+package com.chinaitop.depot.pg.service;
2
+
3
+/**
4
+ * <p>
5
+ * 轮换计划-入库信息表 服务类
6
+ * </p>
7
+ *
8
+ * @author TS
9
+ * @since 2024-06-11
10
+ */
11
+public interface BusinessPgGopsPlanDetailService {
12
+
13
+
14
+
15
+
16
+}

+ 55 - 0
src/main/java/com/chinaitop/depot/pg/service/BusinessPgGopsPlanService.java

@@ -0,0 +1,55 @@
1
+package com.chinaitop.depot.pg.service;
2
+
3
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlan;
4
+import com.chinaitop.depot.pg.model.vo.BusinessPgGopsPlanVO;
5
+import com.chinaitop.depot.pg.model.vo.DataCrkywCplspDefaultVO;
6
+import com.chinaitop.depot.pg.param.BusinessPgGopsPlanPageParam;
7
+
8
+import java.util.List;
9
+import java.util.Map;
10
+
11
+/**
12
+ * <p>
13
+ * 轮换计划-入库信息表 服务类
14
+ * </p>
15
+ *
16
+ * @author TS
17
+ * @since 2024-06-11
18
+ */
19
+public interface BusinessPgGopsPlanService {
20
+
21
+    /**
22
+     * 成品粮购销计划列表
23
+     * @param businessPgGopsPlanPageParam
24
+     * @return
25
+     */
26
+    List<Map<String,Object>> queryByExample(BusinessPgGopsPlanPageParam businessPgGopsPlanPageParam);
27
+
28
+    /**
29
+     * 保存或修改成品粮购销计划
30
+     * @param businessPgGopsPlan
31
+     * @return
32
+     */
33
+    Map<String,Object> add(BusinessPgGopsPlan businessPgGopsPlan);
34
+
35
+    /**
36
+     * 删除成品粮购销计划
37
+     * @param id
38
+     * @return
39
+     */
40
+    Map<String,Object> removeById(Integer id);
41
+
42
+    /**
43
+     * 得到成品粮购销计划
44
+     * @param id
45
+     * @return
46
+     */
47
+    BusinessPgGopsPlanVO getPgPlanDetail(Integer id);
48
+
49
+    /**
50
+     * 获取本库区对应的商品列表
51
+     * @param orgId
52
+     * @return
53
+     */
54
+    List<DataCrkywCplspDefaultVO> getCplSpList(String orgId);
55
+}

+ 17 - 0
src/main/java/com/chinaitop/depot/pg/service/impl/BusinessPgGopsPlanDetailServiceImpl.java

@@ -0,0 +1,17 @@
1
+package com.chinaitop.depot.pg.service.impl;
2
+
3
+import com.chinaitop.depot.pg.service.BusinessPgGopsPlanDetailService;
4
+import org.springframework.stereotype.Service;
5
+
6
+/**
7
+ * <p>
8
+ * 成品粮购销计划明细 服务实现类 * </p>
9
+ *
10
+ * @author TS
11
+ * @since 2024-06-11
12
+ */
13
+@Service
14
+public class BusinessPgGopsPlanDetailServiceImpl implements BusinessPgGopsPlanDetailService {
15
+
16
+
17
+}

+ 142 - 0
src/main/java/com/chinaitop/depot/pg/service/impl/BusinessPgGopsPlanServiceImpl.java

@@ -0,0 +1,142 @@
1
+package com.chinaitop.depot.pg.service.impl;
2
+
3
+import cn.hutool.core.date.DateUtil;
4
+import com.chinaitop.depot.pg.mapper.BusinessPgGopsPlanDetailMapper;
5
+import com.chinaitop.depot.pg.mapper.BusinessPgGopsPlanMapper;
6
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlan;
7
+import com.chinaitop.depot.pg.model.BusinessPgGopsPlanDetail;
8
+import com.chinaitop.depot.pg.model.vo.BusinessPgGopsPlanDetailVO;
9
+import com.chinaitop.depot.pg.model.vo.BusinessPgGopsPlanVO;
10
+import com.chinaitop.depot.pg.model.vo.DataCrkywCplspDefaultVO;
11
+import com.chinaitop.depot.pg.param.BusinessPgGopsPlanPageParam;
12
+import com.chinaitop.depot.pg.service.BusinessPgGopsPlanDetailService;
13
+import com.chinaitop.depot.pg.service.BusinessPgGopsPlanService;
14
+import com.chinaitop.depot.rp.model.BusinessRpBiweeklyReportGrain;
15
+import com.github.pagehelper.PageHelper;
16
+import org.springframework.stereotype.Service;
17
+import org.springframework.transaction.annotation.Transactional;
18
+
19
+import javax.annotation.Resource;
20
+import java.util.Date;
21
+import java.util.HashMap;
22
+import java.util.List;
23
+import java.util.Map;
24
+
25
+/**
26
+ * <p>
27
+ * 成品粮粮购销计划 服务实现类
28
+ * </p>
29
+ *
30
+ * @author TS
31
+ * @since 2024-06-11
32
+ */
33
+@Service
34
+public class BusinessPgGopsPlanServiceImpl implements BusinessPgGopsPlanService {
35
+
36
+    @Resource
37
+    private BusinessPgGopsPlanDetailMapper businessPgGopsPlanDetailMapper;
38
+    @Resource
39
+    private BusinessPgGopsPlanMapper businessPgGopsPlanMapper;
40
+
41
+    /**
42
+     * 成品粮购销计划列表
43
+     *
44
+     * @param pageParam
45
+     * @return
46
+     */
47
+    @Override
48
+    public List<Map<String, Object>> queryByExample(BusinessPgGopsPlanPageParam pageParam) {
49
+        PageHelper.startPage(pageParam.getCurrent(), pageParam.getSize());
50
+        List<Map<String, Object>> list = businessPgGopsPlanMapper.selectByPageParam(pageParam);
51
+        return list;
52
+    }
53
+
54
+    /**
55
+     * 保存或修改成品粮购销计划
56
+     *
57
+     * @param businessPgGopsPlan
58
+     * @return
59
+     */
60
+    @Override
61
+    @Transactional(rollbackFor = Exception.class)
62
+    public Map<String, Object> add(BusinessPgGopsPlan businessPgGopsPlan) {
63
+            Map<String,Object> result = new HashMap<>();
64
+            result.put("status", "error");
65
+            //保存明细品种
66
+            List<BusinessPgGopsPlanDetail>  detailList  =businessPgGopsPlan.getDetailList();
67
+            if (detailList.size() <= 0){
68
+                result.put("msg", "商品明细不能为空");
69
+                return result;
70
+            }
71
+            boolean isAdd = businessPgGopsPlan.getId() == null || businessPgGopsPlan.getId() == 0;
72
+            businessPgGopsPlan.setUpdatedate(new Date());
73
+            if (isAdd){
74
+                businessPgGopsPlan.setCreatedate(new Date());
75
+                businessPgGopsPlanMapper.insertSelective(businessPgGopsPlan); //保存主表信息
76
+            }else{
77
+                businessPgGopsPlanMapper.updateByPrimaryKeySelective(businessPgGopsPlan); //修改主表信息
78
+                //删除明细表数据
79
+                businessPgGopsPlanDetailMapper.deleteByMainId(businessPgGopsPlan.getId());
80
+            }
81
+        for (int i = 0; i < detailList.size(); i++) {
82
+            BusinessPgGopsPlanDetail detail = detailList.get(i);
83
+            detail.setPgGopsPlanId(businessPgGopsPlan.getId());
84
+            detail.setCreatedate(new Date());
85
+            detail.setUpdatedate(new Date());
86
+            businessPgGopsPlanDetailMapper.insertSelective(detail);
87
+        }
88
+
89
+            result.put("status", "success");
90
+            result.put("msg", "保存成功");
91
+            return result;
92
+    }
93
+
94
+    /**
95
+     * 删除成品粮购销计划
96
+     *
97
+     * @param id
98
+     * @return
99
+     */
100
+    @Override
101
+    public Map<String, Object> removeById(Integer id) {
102
+            Map<String,Object> result = new HashMap<>();
103
+            result.put("status", "error");
104
+            if (businessPgGopsPlanMapper.selectByPrimaryKey(id) == null){
105
+                result.put("msg", "数据不存在,已被删除");
106
+                return result;
107
+            }
108
+            //删除明细表数据
109
+            businessPgGopsPlanDetailMapper.deleteByMainId(id);
110
+            //删除主表数据
111
+            businessPgGopsPlanMapper.deleteByPrimaryKey(id);
112
+
113
+            result.put("status", "success");
114
+            result.put("msg", "删除成功");
115
+            return result;
116
+    }
117
+
118
+    /**
119
+     * 得到成品粮购销计划
120
+     *
121
+     * @param id
122
+     * @return
123
+     */
124
+    @Override
125
+    public BusinessPgGopsPlanVO getPgPlanDetail(Integer id) {
126
+        BusinessPgGopsPlanVO businessPgGopsPlanVO = businessPgGopsPlanMapper.getPgPlan(id);
127
+        List<BusinessPgGopsPlanDetailVO> detailVoList = businessPgGopsPlanDetailMapper.findPlanDetailList(id);
128
+        businessPgGopsPlanVO.setDetailVoList(detailVoList);
129
+        return businessPgGopsPlanVO;
130
+    }
131
+
132
+    /**
133
+     * 获取本库区对应的商品列表
134
+     *
135
+     * @param orgId
136
+     * @return
137
+     */
138
+    @Override
139
+    public List<DataCrkywCplspDefaultVO> getCplSpList(String orgId) {
140
+        return businessPgGopsPlanMapper.getCplSpList(orgId);
141
+    }
142
+}

+ 16 - 0
src/main/java/com/chinaitop/depot/rp/controller/BusinessRpReportController.java

@@ -125,6 +125,7 @@ public class BusinessRpReportController {
125 125
 
126 126
 
127 127
 
128
+
128 129
     //
129 130
     /**
130 131
      * 新增时得到轮换计划详情
@@ -166,6 +167,20 @@ public class BusinessRpReportController {
166 167
         return list;
167 168
     }
168 169
 
170
+    /**
171
+     * 根据质检单号查询质检报告
172
+     * @return
173
+     * @throws
174
+     */
175
+    @GetMapping("/getFindByReportIds")
176
+    @ApiOperation(value="根据质检单号查询质检报告", notes = "根据质检单号查询质检报告")
177
+    public List<BusinessQcQualityInspection> getFindByReportIds(@RequestParam("ids") String ids) throws Exception {
178
+
179
+        List<BusinessQcQualityInspection> list = businessRpReportService.getFindByReportIds(ids);
180
+        return list;
181
+    }
182
+
183
+
169 184
 
170 185
     //保存
171 186
 
@@ -213,6 +228,7 @@ public class BusinessRpReportController {
213 228
     @RequestMapping(value="/getRecList",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
214 229
     @ApiOperation(value="轮换计划接收列表", notes = "查询数据列表,支持分页")
215 230
     public PageInfo<Map<String,Object>> getRecList(BusinessRpReportPageParam businessRpReportPageParam) throws Exception {
231
+        System.out.println("----------------------------");
216 232
 
217 233
         List<Map<String,Object>> list = businessRpReportService.getRecList(businessRpReportPageParam);
218 234
         PageInfo<Map<String,Object>> pageInfo = new PageInfo<>(list);

+ 0 - 1
src/main/java/com/chinaitop/depot/rp/mapper/BusinessQcQualityInspectionMapper.java

@@ -35,5 +35,4 @@ public interface BusinessQcQualityInspectionMapper {
35 35
 	List<BusinessQcQualityInspection> getQualityInspectionFindByWarehouseId(Map<String, Object> map);
36 36
 
37 37
 
38
-
39 38
 }

+ 1 - 1
src/main/java/com/chinaitop/depot/rp/mapper/BusinessQcQualityInspectionMapper.xml

@@ -14,7 +14,7 @@
14 14
     <result column="grain_variety_id" property="grainVarietyId" jdbcType="INTEGER" />
15 15
     <result column="grain_grade_id" property="grainGradeId" jdbcType="INTEGER" />
16 16
     <result column="rkrq" property="rkrq" jdbcType="DATE" />
17
-    <result column="receive_year" property="receiveYear" jdbcType="DATE" />
17
+    <result column="receive_year" property="receiveYear" jdbcType="VARCHAR" />
18 18
     <result column="produce_area" property="produceArea" jdbcType="VARCHAR" />
19 19
     <result column="jysj" property="jysj" jdbcType="TIMESTAMP" />
20 20
     <result column="check_result" property="checkResult" jdbcType="TINYINT" />

+ 3 - 0
src/main/java/com/chinaitop/depot/rp/mapper/BusinessRpBiweeklyReportMapper.xml

@@ -272,6 +272,9 @@
272 272
         LEFT JOIN depot_qh.business_rp_biweekly_report_grain f on f.rp_biweekly_report_id = a.id
273 273
         LEFT JOIN depot_qh.basic_enum g on g.enumId = f.grain_variety_id
274 274
         where 1=1
275
+        <if test="pageParam.orgId !=null and pageParam.orgId!=''">
276
+            and a.org_id = #{pageParam.orgId}
277
+        </if>
275 278
         <if test="pageParam.unitName !=null and pageParam.unitName!=''">
276 279
             and b.dwmc like concat("%",#{pageParam.unitName},"%")
277 280
         </if>

+ 1 - 0
src/main/java/com/chinaitop/depot/rp/mapper/BusinessRpInboundMapper.xml

@@ -20,6 +20,7 @@
20 20
     <resultMap id="BaseResultMap2" extends="BaseResultMap" type="com.chinaitop.depot.rp.model.BusinessRpInbound">
21 21
         <result column="grainVarietyName" property="grainVarietyName" />
22 22
         <result column="grainNatureName" property="grainNatureName" />
23
+        <result column="orgName" property="orgName" />
23 24
     </resultMap>
24 25
 
25 26
     <sql id="Example_Where_Clause" >

+ 5 - 1
src/main/java/com/chinaitop/depot/rp/mapper/BusinessRpOutboundMapper.xml

@@ -45,11 +45,14 @@
45 45
     <resultMap id="BaseResultMap2" extends="BaseResultMap" type="com.chinaitop.depot.rp.model.BusinessRpOutbound">
46 46
 
47 47
         <result column="basicStorehouseName" property="basicStorehouseName" />
48
+        <result column="storehouseName" property="storehouseName" />
48 49
         <result column="grainVarietyName" property="grainVarietyName" />
49 50
         <result column="grainNatureName" property="grainNatureName" />
50 51
         <result column="grainGradeName" property="grainGradeName" />
51 52
         <result column="warehouseName" property="warehouseName" />
52 53
         <result column="remarks" property="remarks" jdbcType="LONGVARCHAR" />
54
+        <result column="orgName" property="orgName" />
55
+
53 56
 
54 57
     </resultMap>
55 58
     <resultMap id="ResultMapWithBLOBs" type="com.chinaitop.depot.rp.model.BusinessRpOutbound" extends="BaseResultMap" >
@@ -623,7 +626,8 @@
623 626
     d.inspection_report_id,
624 627
     d.regular_inspection_report_ids,
625 628
     d.plan_quantity,
626
-        o.org_name orgName,
629
+    o.org_name as "orgName",
630
+    st.storehouse_name as "basicStorehouseName",
627 631
     st.storehouse_name as "storehouseName",
628 632
     wa.warehouse_name  as "warehouseName",
629 633
     pz.enumname as "grainVarietyName",

+ 6 - 2
src/main/java/com/chinaitop/depot/rp/mapper/BusinessRpReportMapper.xml

@@ -427,6 +427,9 @@
427 427
         <if test="pageParam.rotationYear !=null and pageParam.rotationYear!=''">
428 428
             and a.rotation_year like concat("%",#{pageParam.rotationYear},"%")
429 429
         </if>
430
+<!--        <if test="pageParam.unitId !=null and pageParam.unitId!=''">-->
431
+<!--            and a.unit_info_id=#{pageParam.unitId}-->
432
+<!--        </if>-->
430 433
 
431 434
     </select>
432 435
 
@@ -461,7 +464,7 @@
461 464
         inner JOIN province_all.biz_rp_issuance a ON c.id = a.rp_report_id
462 465
         LEFT JOIN  depot_qh.business_rp_outbound d on d.rp_report_id = c.id
463 466
         LEFT JOIN province_all.biz_unit_info b on c.unit_info_id = b.id
464
-        where 1=1
467
+        where c.status =1
465 468
         <if test="pageParam.unitName !=null and pageParam.unitName!=''">
466 469
             and b.dwmc like concat("%",#{pageParam.unitName},"%")
467 470
         </if>
@@ -474,12 +477,13 @@
474 477
         <if test="pageParam.unitId !=null and pageParam.unitId!=''">
475 478
             and c.unit_info_id = #{pageParam.unitId}
476 479
         </if>
477
-        <if test="pageParam.unitId !=null and pageParam.unitId!=''">
480
+        <if test="pageParam.orgId !=null and pageParam.orgId!=''">
478 481
             and d.org_Id = #{pageParam.orgId}
479 482
         </if>
480 483
         <!-- <if test="pageParam.lsxzName !=null and pageParam.lsxzName!=''">
481 484
              and a.dwmc like concat("%",#{pageParam.lsxzName},"%")
482 485
          </if>-->
486
+        group by  cast(c.rotation_year as char)
483 487
         ORDER BY c.report_time desc
484 488
     </select>
485 489
     <select id="getRpReportByById" resultMap="BaseResultMap2">

+ 3 - 12
src/main/java/com/chinaitop/depot/rp/model/BusinessQcQualityInspection.java

@@ -34,8 +34,7 @@ public class BusinessQcQualityInspection {
34 34
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
35 35
     private Date rkrq;
36 36
 
37
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
38
-    private Date receiveYear;
37
+    private String receiveYear;
39 38
 
40 39
     private String produceArea;
41 40
 
@@ -282,19 +281,11 @@ public class BusinessQcQualityInspection {
282 281
         this.rkrq = rkrq;
283 282
     }
284 283
 
285
-    /**
286
-     * 收获年度
287
-     * @return receive_year 收获年度
288
-     */
289
-    public Date getReceiveYear() {
284
+    public String getReceiveYear() {
290 285
         return receiveYear;
291 286
     }
292 287
 
293
-    /**
294
-     * 收获年度
295
-     * @param receiveYear 收获年度
296
-     */
297
-    public void setReceiveYear(Date receiveYear) {
288
+    public void setReceiveYear(String receiveYear) {
298 289
         this.receiveYear = receiveYear;
299 290
     }
300 291
 

+ 2 - 0
src/main/java/com/chinaitop/depot/rp/model/BusinessRpInbound.java

@@ -71,4 +71,6 @@ public class BusinessRpInbound implements Serializable {
71 71
     @ApiModelProperty(value = "粮食性质;basic_enum的id;粮食性质名称")
72 72
     private String grainNatureName;
73 73
 
74
+    private String orgName;
75
+
74 76
 }

+ 3 - 0
src/main/java/com/chinaitop/depot/rp/model/BusinessRpOutbound.java

@@ -105,4 +105,7 @@ public class BusinessRpOutbound implements Serializable {
105 105
 
106 106
     @ApiModelProperty(value = "粮食等级;basic_enum的id;粮食等级名称")
107 107
     private String grainGradeName;
108
+
109
+    private String orgName;
110
+    private String storehouseName;
108 111
 }

+ 4 - 0
src/main/java/com/chinaitop/depot/rp/param/BusinessRpBiweeklyReportPageParam.java

@@ -42,6 +42,10 @@ public class BusinessRpBiweeklyReportPageParam {
42 42
     @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
43 43
     private String sortOrder;
44 44
 
45
+    /** 库区id */
46
+    @ApiModelProperty(value = "库区id")
47
+    private String orgId;
48
+
45 49
     /** 企业名称 */
46 50
     @ApiModelProperty(value = "企业名称")
47 51
     private String unitName;

+ 0 - 7
src/main/java/com/chinaitop/depot/rp/param/BusinessRpReportPageParam.java

@@ -17,13 +17,6 @@ public class BusinessRpReportPageParam {
17 17
     @ApiModelProperty(value = "每页条数")
18 18
     private Integer size;
19 19
 
20
-    /** 排序字段 */
21
-    @ApiModelProperty(value = "排序字段,字段驼峰名称,如:userName")
22
-    private String sortField;
23
-
24
-    /** 排序方式 */
25
-    @ApiModelProperty(value = "排序方式,升序:ASCEND;降序:DESCEND")
26
-    private String sortOrder;
27 20
 
28 21
     /** 企业名称 */
29 22
     @ApiModelProperty(value = "企业名称")

+ 2 - 0
src/main/java/com/chinaitop/depot/rp/service/BusinessRpReportService.java

@@ -69,4 +69,6 @@ public interface BusinessRpReportService  {
69 69
     List<BusinessQcQualityInspection> getQualityInspectionFindById(String rpReportId, Integer warehouseId, String jylb,Integer inspectionReportId);
70 70
 
71 71
     List<BusinessQcQualityInspection> getQualityInspectionFindByWarehouseId(String jylb,Integer warehouseId);
72
+
73
+    List<BusinessQcQualityInspection> getFindByReportIds(String ids);
72 74
 }

+ 30 - 8
src/main/java/com/chinaitop/depot/rp/service/impl/BusinessRpReportServiceImpl.java

@@ -113,18 +113,14 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
113 113
 
114 114
         return businessRpReportVO;
115 115
     }
116
-    @Transactional
116
+    @Transactional(rollbackFor = Exception.class)
117 117
     @Override
118 118
     public Map<String, Object> add(BusinessRpReport businessRpReport) {
119 119
         Map<String,Object> result = new HashMap<>();
120 120
         List<BusinessRpInbound>  businessRpInbound = businessRpReport.getBusinessRpInboundList();
121
-//        if (businessRpInbound.size() <= 0){
122
-//            result.put("msg", "出库信息不能为空");
123
-//            return result;
124
-//        }
125 121
         BusinessRpInboundExample businessRpInboundExample =new BusinessRpInboundExample();
126 122
        businessRpReport.setUpdateTime(new Date());
127
-        if(businessRpReport.getStatus()==0){ //保存
123
+        if(businessRpReport.getStatus()==0){
128 124
             if(businessRpReport.getId()!=null){//修改
129 125
                 businessRpReportMapper.updateByPrimaryKeySelective(businessRpReport);
130 126
                 businessRpInboundMapper.deleteByReportId(businessRpReport.getId());
@@ -165,13 +161,14 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
165 161
 
166 162
         }else{//提交
167 163
 
168
-            if(businessRpReport.getId()!=null){//修改
164
+            if(businessRpReport.getId()!=null){
169 165
                 //根据id查找主表数据
170 166
                 BusinessRpReportVO businessRpReportVO =businessRpReportMapper.getRpReportFindByById(businessRpReport.getId());
171 167
                 if(businessRpReportVO!=null){
172 168
                     result.put("status", "error");
173 169
                     result.put("msg", "请填写数据后再执行上传操作");
174 170
                 }
171
+                businessRpReport.setReportTime(new Date());
175 172
                 businessRpReportMapper.updateByPrimaryKeySelective(businessRpReport);
176 173
                 List<BusinessRpInbound> inList =businessRpReport.getBusinessRpInboundList();
177 174
                 if(inList != null && !inList.isEmpty()){
@@ -199,6 +196,7 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
199 196
 
200 197
                 businessRpReport.setCreateTime(new Date());
201 198
                 businessRpReport.setUpdateTime(new Date());
199
+                businessRpReport.setReportTime(new Date());
202 200
                 businessRpReportMapper.insert(businessRpReport);
203 201
                 List<BusinessRpInbound> inList =businessRpReport.getBusinessRpInboundList();
204 202
                 for (BusinessRpInbound br: inList) {
@@ -244,7 +242,7 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
244 242
         businessRpReportMapper.deleteByPrimaryKey(id);
245 243
 
246 244
         result.put("status", "success");
247
-        result.put("msg", "保存成功");
245
+        result.put("msg", "删除成功");
248 246
         return result;
249 247
     }
250 248
 
@@ -300,5 +298,29 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
300 298
         return list;
301 299
     }
302 300
 
301
+    @Override
302
+    public List<BusinessQcQualityInspection> getFindByReportIds(String ids) {
303
+        List<BusinessQcQualityInspection> list = new ArrayList<>();
304
+        try {
305
+            if (ids.contains(",")) {
306
+                String[] idArray = ids.split(",");
307
+                for (String idStr : idArray) {
308
+                    int id = Integer.parseInt(idStr);
309
+                    BusinessQcQualityInspection inspection = businessQcQualityInspectionMapper.selectByPrimaryKey(id);
310
+                    list.add(inspection);
311
+                }
312
+            } else {
313
+                int id = Integer.parseInt(ids);
314
+                list.add(businessQcQualityInspectionMapper.selectByPrimaryKey(id));
315
+            }
316
+        } catch (NumberFormatException e) {
317
+            // 处理ID转换失败的情况
318
+            // 可以记录日志、抛出自定义异常或返回错误信息
319
+            System.err.println("Failed to parse ID from string: " + ids);
320
+        }
321
+
322
+        return list;
323
+    }
324
+
303 325
 
304 326
 }

+ 2 - 0
src/main/resources/bootstrap-dev.yml

@@ -69,3 +69,5 @@ logging:
69 69
     com.chinaitop.depot.system.mapper: debug
70 70
 
71 71
 jsgjjsjUrl: http://localhost:9022/recPublish/sendMessage
72
+customerUrl: http://localhost:9016/depot/business/customer/edit?id=
73
+

+ 2 - 0
src/main/resources/bootstrap-prod.yml

@@ -65,3 +65,5 @@ cxf:
65 65
 crk-webservice: http://10.223.3.62:9025/Base/webServices/StoreChangeServer?wsdl
66 66
 
67 67
 jsgjjsjUrl: http://localhost:9022/recPublish/sendMessage
68
+customerUrl: http://localhost:9016/depot/business/customer/edit?id=
69
+