ZeroLiYi 1 vuosi sitten
vanhempi
commit
00c0672d10

+ 43 - 2
src/main/java/com/chinaitop/depot/rp/controller/BusinessRpReportController.java

@@ -2,6 +2,7 @@ package com.chinaitop.depot.rp.controller;
2 2
 
3 3
 
4 4
 import com.chinaitop.depot.business.model.OrgInfo;
5
+import com.chinaitop.depot.rp.model.BusinessQcQualityInspection;
5 6
 import com.chinaitop.depot.rp.model.BusinessRpBiweeklyReport;
6 7
 import com.chinaitop.depot.rp.model.BusinessRpReport;
7 8
 import com.chinaitop.depot.rp.model.vo.BusinessRpOutboundVO;
@@ -160,9 +161,49 @@ public class BusinessRpReportController {
160 161
      */
161 162
     @RequestMapping(value="/getRpReportFindByById",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
162 163
     @ApiOperation(value="新增时得到轮换计划详情", notes = "新增时得到轮换计划详情")
163
-    public BusinessRpReportVO getRpReportDetailsByAdd(Integer rpReportId) throws Exception {
164
+    public BusinessRpReportRecVO getRpReportDetailsByAdd(String rpReportId) throws Exception {
164 165
 
165
-        BusinessRpReportVO list = businessRpReportService.getRpReportFindByById(rpReportId);
166
+        BusinessRpReportRecVO list = businessRpReportService.getRpReportFindByById(rpReportId);
167
+        return list;
168
+    }
169
+
170
+    /**
171
+     * 查询质检报告
172
+     * @return
173
+     * @throws Exception
174
+     */
175
+//    @RequestMapping(value="/getQualityInspectionFindById",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
176
+//    @ApiOperation(value="新增时得到查询质检报告", notes = "新增时得到查询质检报告")
177
+//    @ApiImplicitParams({
178
+//            @ApiImplicitParam(name = "rpReportId", value = "轮换计划上报id", paramType = "form"),
179
+//            @ApiImplicitParam(name = "warehouseId", value = "货位id", paramType = "form"),
180
+//            @ApiImplicitParam(name = "jylb", value = "检验类别", paramType = "form"),
181
+//            @ApiImplicitParam(name = "inspectionReportId", value = "质检报告id", paramType = "form")
182
+//
183
+//
184
+//    })
185
+//    public List<BusinessQcQualityInspection> getRpReportDetailsByAdd(String rpReportId, Integer warehouseId, String jylb,Integer inspectionReportId) throws Exception {
186
+//
187
+//        List<BusinessQcQualityInspection> list = businessRpReportService.getQualityInspectionFindById(rpReportId,warehouseId,jylb,inspectionReportId);
188
+//        return list;
189
+//    }
190
+
191
+    /**
192
+     * 根据货位查询粮情卡质检报告
193
+     * @return
194
+     * @throws
195
+     */
196
+    @RequestMapping(value="/getQualityInspectionFindByWarehouseId",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
197
+    @ApiOperation(value="根据货位查询粮情卡质检报告", notes = "根据货位查询粮情卡质检报告")
198
+    @ApiImplicitParams({
199
+            @ApiImplicitParam(name = "jylb", value = "检验类别", paramType = "form"),
200
+            @ApiImplicitParam(name = "warehouseId", value = "货位id", paramType = "form")
201
+
202
+
203
+    })
204
+    public List<BusinessQcQualityInspection> getQualityInspectionFindByWarehouseId(String jylb,Integer warehouseId) throws Exception {
205
+
206
+        List<BusinessQcQualityInspection> list = businessRpReportService.getQualityInspectionFindByWarehouseId(jylb,warehouseId);
166 207
         return list;
167 208
     }
168 209
 

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

@@ -27,4 +27,8 @@ public interface BusinessQcQualityInspectionMapper {
27 27
     int updateByPrimaryKeySelective(BusinessQcQualityInspection record);
28 28
 
29 29
     int updateByPrimaryKey(BusinessQcQualityInspection record);
30
+
31
+    List<BusinessQcQualityInspection> getQualityInspectionFindById(@Param("rpReportId")String rpReportId,@Param("warehouseId") Integer warehouseId,@Param("jylb") String jylb,@Param("inspectionReportId")Integer inspectionReportId);
32
+
33
+    List<BusinessQcQualityInspection> getQualityInspectionFindByWarehouseId(String jylb, Integer warehouseId);
30 34
 }

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

@@ -41,6 +41,13 @@
41 41
     <result column="sample_package_model" property="samplePackageModel" jdbcType="VARCHAR" />
42 42
     <result column="bz" property="bz" jdbcType="VARCHAR" />
43 43
   </resultMap>
44
+
45
+
46
+  <resultMap id="BaseResultMap1" extends="BaseResultMap" type="com.chinaitop.depot.rp.model.vo.BusinessQcQualityInspectionVO">
47
+    <result column="grainVarietyName" property="grainVarietyName" jdbcType="VARCHAR" />
48
+
49
+
50
+  </resultMap>
44 51
   <sql id="Example_Where_Clause" >
45 52
     <where >
46 53
       <foreach collection="oredCriteria" item="criteria" separator="or" >
@@ -106,6 +113,42 @@
106 113
     zbjgpd, qysj, qydbh, qyrxm, qyqy, jdrxm, ypbh, ypsl, dbsl, ypdj, sample_status, sample_package_model, 
107 114
     bz
108 115
   </sql>
116
+  <select id="getQualityInspectionFindById"  resultMap="BaseResultMap1"  >
117
+    SELECT
118
+      bqqi.id,
119
+      bqqi.zjbgdh,-- 委托书编号
120
+      bqqi.warehouse_id,--  货位 id
121
+      bqqi.jysj,              -- 检验时间
122
+      bqqi.basic_storehouse_id,-- 仓房id
123
+      bqqi.grain_variety_id,  -- 粮食品种id
124
+      be1.enumName grainVarietyName,   -- 粮食品种名称
125
+      bqqi.check_result   -- 是否合格
126
+    FROM
127
+      business_qc_quality_inspection bqqi
128
+        LEFT JOIN basic_enum be1 ON bqqi.grain_variety_id = be1.enumId
129
+      bqqi.id=#{inspectionReportId}
130
+  </select>
131
+
132
+  <select id="getQualityInspectionFindByWarehouseId"  resultMap="BaseResultMap1"  >
133
+    SELECT
134
+      bqqi.id,
135
+      bqqi.zjbgdh,-- 委托书编号
136
+      bqqi.warehouse_id,--  货位 id
137
+      bqqi.jysj,              -- 检验时间
138
+      bqqi.basic_storehouse_id,-- 仓房id
139
+      bqqi.grain_variety_id,  -- 粮食品种id
140
+      be1.enumName grainVarietyName,   -- 粮食品种名称
141
+      bqqi.check_result   -- 是否合格
142
+    FROM
143
+      business_qc_quality_inspection bqqi
144
+        LEFT JOIN basic_enum be1 ON bqqi.grain_variety_id = be1.enumId
145
+      where bqqi.warehouse_id=#{warehouseId}
146
+  </select>
147
+
148
+
149
+
150
+
151
+
109 152
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.rp.model.BusinessQcQualityInspectionExample" >
110 153
     select
111 154
     <if test="distinct" >

+ 15 - 0
src/main/java/com/chinaitop/depot/rp/model/vo/BusinessQcQualityInspectionVO.java

@@ -0,0 +1,15 @@
1
+package com.chinaitop.depot.rp.model.vo;
2
+
3
+import com.chinaitop.depot.rp.model.BusinessQcQualityInspection;
4
+import lombok.Getter;
5
+import lombok.Setter;
6
+
7
+@Getter
8
+@Setter
9
+public class BusinessQcQualityInspectionVO extends BusinessQcQualityInspection {
10
+
11
+
12
+    private String grainVarietyName;
13
+
14
+
15
+}

+ 7 - 1
src/main/java/com/chinaitop/depot/rp/service/BusinessRpReportService.java

@@ -1,6 +1,7 @@
1 1
 package com.chinaitop.depot.rp.service;
2 2
 
3 3
 import com.chinaitop.depot.business.model.OrgInfo;
4
+import com.chinaitop.depot.rp.model.BusinessQcQualityInspection;
4 5
 import com.chinaitop.depot.rp.model.BusinessRpReport;
5 6
 import com.chinaitop.depot.rp.model.vo.BusinessRpOutboundVO;
6 7
 import com.chinaitop.depot.rp.model.vo.BusinessRpReportRecVO;
@@ -31,7 +32,7 @@ public interface BusinessRpReportService  {
31 32
 
32 33
    List<BusinessRpOutboundVO> findByWareHouseInfo(Integer basicStorehouseId);
33 34
 
34
-    BusinessRpReportVO getRpReportFindByById(Integer rpReportId);
35
+    BusinessRpReportRecVO getRpReportFindByById(String rpReportId);
35 36
 
36 37
     Map<String, Object> add(BusinessRpReport businessRpReport);
37 38
 
@@ -58,4 +59,9 @@ public interface BusinessRpReportService  {
58 59
      * @return
59 60
      */
60 61
     BusinessRpReportRecVO getRpReportRecDetail(String rpReportId, String orgId);
62
+
63
+
64
+    List<BusinessQcQualityInspection> getQualityInspectionFindById(String rpReportId, Integer warehouseId, String jylb,Integer inspectionReportId);
65
+
66
+    List<BusinessQcQualityInspection> getQualityInspectionFindByWarehouseId(String jylb,Integer warehouseId);
61 67
 }

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

@@ -62,13 +62,8 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
62 62
 
63 63
 
64 64
         return businessRpOutboundService.getOutband(warehouseId);
65
-    }  //查询库区数据
66
-//    @Override
67
-//    public BusinessRpOutboundVO findByfindByQualityCheckInfo(Integer warehouseId) {
68
-//
69
-//
70
-//        return businessRpOutboundService.findByfindByQualityCheckInfo(warehouseId);
71
-//    }
65
+    }
66
+
72 67
 
73 68
     @Override
74 69
     public List<OrgInfo> findByOrgInfo(Integer orgId, String unitInfoId) {
@@ -92,22 +87,19 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
92 87
     }
93 88
 
94 89
     @Override
95
-    public BusinessRpReportVO getRpReportFindByById(Integer rpReportId) {
96
-        BusinessRpReportVO businessRpReportVO =businessRpReportMapper.getRpReportFindByById(rpReportId);
97
-        if(businessRpReportVO.getRegularInspectionReportIds()!=null){
98
-            if(businessRpReportVO.getRegularInspectionReportIds().contains(",")){
99
-                String[] s = businessRpReportVO.getRegularInspectionReportIds().split(",");
100
-                for (String id: s) {
101
-                    //查询定检报告check_record_ids
102
-                    //businessRpReportVO.setBusinessRpInboundList("质检对象");
103
-                }
104
-            }
105
-            //查询出库质检报告
90
+    public BusinessRpReportRecVO getRpReportFindByById(String rpReportId) {
91
+       // BusinessRpReportVO businessRpReportVO =businessRpReportMapper.getRpReportFindByById(rpReportId);
106 92
 
107
-        }
93
+        BusinessRpReportRecVO businessRpReportRecVO =businessRpReportMapper.getRpReportByById(rpReportId,null);
108 94
 
95
+        List<BusinessRpOutbound> outboundList = businessRpOutboundMapper.findByRpReportId(rpReportId,null);
96
+        businessRpReportRecVO.setBusinessRpOutboundList(outboundList);
109 97
 
110
-        return businessRpReportVO;
98
+        List<BusinessRpInbound> inboundList = businessRpInboundMapper.findByRpReportId(rpReportId,null);
99
+        businessRpReportRecVO.setBusinessRpInboundList(inboundList);
100
+
101
+
102
+        return businessRpReportRecVO;
111 103
     }
112 104
 
113 105
     @Override
@@ -233,4 +225,22 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
233 225
 
234 226
         return businessRpReportRecVO;
235 227
     }
228
+    //获取出库质检报告
229
+    @Override
230
+    public List<BusinessQcQualityInspection> getQualityInspectionFindById(String rpReportId, Integer warehouseId, String jylb,Integer inspectionReportId) {
231
+        List<BusinessQcQualityInspection> bQQList =new ArrayList<>();
232
+            bQQList=  businessQcQualityInspectionMapper.getQualityInspectionFindById(rpReportId,warehouseId,jylb,inspectionReportId);
233
+
234
+        return null;
235
+    }
236
+
237
+    @Override
238
+    public List<BusinessQcQualityInspection> getQualityInspectionFindByWarehouseId(String jylb,Integer warehouseId) {
239
+
240
+
241
+        List<BusinessQcQualityInspection> list =businessQcQualityInspectionMapper.getQualityInspectionFindByWarehouseId(jylb,warehouseId);
242
+        return list;
243
+    }
244
+
245
+
236 246
 }