ソースを参照

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

gdd 1 年間 前
コミット
9ce0e3b9dd

+ 1 - 1
src/main/java/com/chinaitop/depot/qualityControl/mapper/BusinessQcQualityInspectionItemMapper.xml

@@ -197,7 +197,7 @@
197 197
       FROM
198 198
         business_qc_quality_inspection_item itm
199 199
           LEFT JOIN depot_qh.basic_enum ee ON ee.enumId = itm.inspection_item_id
200
-      where itm.qc_quality_inspection_id =14
200
+      where itm.qc_quality_inspection_id =#{id}
201 201
 
202 202
 
203 203
 

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

@@ -33,7 +33,7 @@ public interface BusinessQcQualityInspectionMapper {
33 33
 
34 34
     int updateByPrimaryKey(BusinessQcQualityInspection record);
35 35
 
36
-    String selectOnly(Map<String, Object> map);
36
+    String selectOnly();
37 37
 
38 38
     List<BusinessQcQualityInspection> getPageList(BusinessQcQualityInspectionPage pageParam);
39 39
 

+ 2 - 12
src/main/java/com/chinaitop/depot/qualityControl/mapper/BusinessQcQualityInspectionMapper.xml

@@ -760,17 +760,6 @@
760 760
         zjbgdh
761 761
     FROM
762 762
         business_qc_quality_inspection
763
-    <where>
764
-      <if test="orgId != null and orgId != ''">
765
-        org_id = #{orgId}
766
-      </if>
767
-      <if test="basicStorehouseId != null and basicStorehouseId != ''">
768
-        and basic_storehouse_id = #{basicStorehouseId}
769
-      </if>
770
-      <if test="warehouseId != null and warehouseId != ''">
771
-        and warehouse_id = #{warehouseId}
772
-      </if>
773
-    </where>
774 763
     ORDER BY createdate DESC
775 764
     LIMIT 1
776 765
   </select>
@@ -787,7 +776,8 @@
787 776
         qqi.grain_variety_id grainVarietyId,
788 777
         be.enumname grainVarietyName,
789 778
         qqi.grain_nature_id grainNatureId,
790
-        be1.enumname grainNatureName
779
+        be1.enumname grainNatureName,
780
+        qqi.jylb
791 781
     FROM
792 782
         business_qc_quality_inspection qqi
793 783
     LEFT JOIN org_info oi ON qqi.org_id = oi.org_id

+ 5 - 5
src/main/java/com/chinaitop/depot/qualityControl/service/impl/QualityInspectionServiceImpl.java

@@ -81,11 +81,11 @@ public class QualityInspectionServiceImpl implements QualityInspectionService {
81 81
     // // 生成质检报告单(检验类别+检验日期(yyyyMMdd)+4位顺序号组成)
82 82
     private synchronized String GetZjbgdh(BusinessQcQualityInspection saveParam) {
83 83
         // 查询最后一个顺序号
84
-        Map<String, Object> map = new HashMap<>();
85
-        map.put("orgId", saveParam.getOrgId());
86
-        map.put("basicStorehouseId", saveParam.getBasicStorehouseId());
87
-        map.put("warehouseId", saveParam.getWarehouseId());
88
-        String xh = qualityInspectionMapper.selectOnly(map);
84
+//        Map<String, Object> map = new HashMap<>();
85
+//        map.put("orgId", saveParam.getOrgId());
86
+//        map.put("basicStorehouseId", saveParam.getBasicStorehouseId());
87
+//        map.put("warehouseId", saveParam.getWarehouseId());
88
+        String xh = qualityInspectionMapper.selectOnly();
89 89
         // 初始化
90 90
         int num = 1;
91 91
         if (!StringUtils.isEmpty(xh)) {

+ 3 - 3
src/main/java/com/chinaitop/depot/storage/controller/ClearanceConfirmationController.java

@@ -60,7 +60,7 @@ public class ClearanceConfirmationController {
60 60
     })
61 61
     public PageInfo<ClearanceConfirmation> getCleConList(Integer pageNum, Integer pageSize,
62 62
                                                      String storeName,
63
-                                                     String ajmc, Integer orgId) {
63
+                                                     Integer warehouseId, Integer orgId) {
64 64
         Map<String, Object> modelMap = new HashMap<String, Object>();
65 65
         if (pageNum != null && pageSize != null) {
66 66
             PageHelper.startPage(pageNum, pageSize);
@@ -71,8 +71,8 @@ public class ClearanceConfirmationController {
71 71
             if (null != storeName && !"".equals(storeName)) {
72 72
                 modelMap.put("storehouseName", storeName);
73 73
             }
74
-            if (null != ajmc && !"".equals(ajmc)) {
75
-                modelMap.put("ajmc", ajmc);
74
+            if (null != warehouseId && !"".equals(warehouseId)) {
75
+                modelMap.put("warehouseId", warehouseId);
76 76
             }
77 77
             /* 只能查询当前单位的数据  */
78 78
             if (null != orgId) {

+ 22 - 5
src/main/java/com/chinaitop/depot/storage/mapper/ClearanceConfirmationMapper.xml

@@ -21,8 +21,11 @@
21 21
     <result column="updatename" jdbcType="VARCHAR" property="updatename" />
22 22
     <result column="createdate" jdbcType="TIMESTAMP" property="createdate" />
23 23
     <result column="updatedate" jdbcType="TIMESTAMP" property="updatedate" />
24
+    <result column="warehouse_id" jdbcType="INTEGER" property="warehouseId" />
25
+    
24 26
 
25 27
     <result column="storehouse_name" jdbcType="VARCHAR" property="storehouseName" />
28
+    <result column="warehouse_name" jdbcType="VARCHAR" property="warehouseName" /> 
26 29
     <result column="tyajbm" jdbcType="VARCHAR" property="tyajbm" />
27 30
     <result column="ajmc" jdbcType="VARCHAR" property="ajmc" />
28 31
   </resultMap>
@@ -89,7 +92,7 @@
89 92
   <sql id="Base_Column_List">
90 93
     cc.id id,cc.cqqrdh cqqrdh,cc.ywrq ywrq,cc.tyajbm tyajbm,cc.bgy bgy,cc.sfqs sfqs,cc.sfxd sfxd,cc.jcyxf jcyxf,cc.qtsx qtsx,cc.sqr,cc.bmsh bmsh,cc.dwldsh dwldsh,
91 94
 cc.bz bz,cc.czbz czbz,cc.zhgxsj zhgxsj,cc.createname createname,cc.createdate createdate,
92
-cc.updatename updatename,cc.updatedate updatedate
95
+cc.updatename updatename,cc.updatedate updatedate,cc.warehouse_id 
93 96
   </sql>
94 97
 
95 98
 
@@ -111,12 +114,15 @@ cc.updatename updatename,cc.updatedate updatedate
111 114
     <if test="orgId != null">
112 115
       AND AB.org_id = #{orgId,jdbcType=INTEGER}
113 116
     </if>
117
+    <if test="warehouseId != null">
118
+      AND cc.warehouse_id = #{warehouseId,jdbcType=INTEGER}
119
+    </if>
114 120
     AND (cc.czbz = 'i' OR cc.czbz = 'u')
115 121
     order by cc.id desc
116 122
   </select>
117 123
 
118 124
   <select id="findByCleCon" parameterType="java.lang.Integer" resultMap="BaseResultMap">
119
-    select
125
+    <!-- select
120 126
     <include refid="Base_Column_List" />
121 127
     ,AB.storehouse_name  storehouseName, AB.ajmc ajmc
122 128
     from clearance_confirmation cc
@@ -125,6 +131,14 @@ cc.updatename updatename,cc.updatedate updatedate
125 131
     FROM basic_unit_aisle Bu
126 132
     LEFT JOIN basic_storehouse Bs ON Bu.basic_storehouse_id = Bs.storehouse_id
127 133
     ) AB ON cc.tyajbm = AB.tyajbm
134
+    where cc.id = #{id,jdbcType=INTEGER} -->
135
+    
136
+    select
137
+    <include refid="Base_Column_List" />
138
+    ,Bs.storehouse_name ,w.warehouse_name 
139
+    from clearance_confirmation cc
140
+    INNER JOIN basic_warehouse w ON w.warehouse_id = cc.warehouse_id
141
+    INNER JOIN basic_storehouse Bs ON w.storehouse_id = Bs.storehouse_id
128 142
     where cc.id = #{id,jdbcType=INTEGER}
129 143
   </select>
130 144
 
@@ -159,6 +173,7 @@ cc.updatename updatename,cc.updatedate updatedate
159 173
         END AS temperatureMeasureType,
160 174
       Bs.design_capacity designCapacity,
161 175
       Bs.draftType,
176
+      Bs.storehouse_type storehouseType,
162 177
       Bs.keeping_way keepingWay
163 178
     FROM
164 179
       basic_storehouse Bs
@@ -178,7 +193,7 @@ cc.updatename updatename,cc.updatedate updatedate
178 193
   <insert id="insert" keyProperty="id" useGeneratedKeys="true"  parameterType="com.chinaitop.depot.storage.model.ClearanceConfirmation">
179 194
     insert into clearance_confirmation (id,cqqrdh,ywrq,tyajbm,bgy,sfqs,sfxd,jcyxf,qtsx,sqr,bmsh,dwldsh,
180 195
                                   bz,czbz,zhgxsj,createname,createdate,
181
-                                  updatename,updatedate)
196
+                                  updatename,updatedate,warehouse_id)
182 197
     values (
183 198
              #{id,jdbcType=INTEGER},
184 199
             #{cqqrdh,jdbcType=VARCHAR},
@@ -198,7 +213,8 @@ cc.updatename updatename,cc.updatedate updatedate
198 213
             #{createname,jdbcType=VARCHAR},
199 214
             #{createdate,jdbcType=TIMESTAMP},
200 215
             #{updatename,jdbcType=VARCHAR},
201
-            #{updatedate,jdbcType=TIMESTAMP})
216
+            #{updatedate,jdbcType=TIMESTAMP},
217
+            #{warehouseId,jdbcType=INTEGER})
202 218
   </insert>
203 219
 
204 220
   <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.storage.model.ClearanceConfirmation">
@@ -221,7 +237,8 @@ cc.updatename updatename,cc.updatedate updatedate
221 237
     createname=#{createname,jdbcType=VARCHAR},
222 238
     createdate=#{createdate,jdbcType=TIMESTAMP},
223 239
     updatename=#{updatename,jdbcType=VARCHAR},
224
-    updatedate=#{updatedate,jdbcType=TIMESTAMP}
240
+    updatedate=#{updatedate,jdbcType=TIMESTAMP},
241
+    warehouse_id = #{warehouseId,jdbcType=INTEGER}
225 242
   where id = #{id,jdbcType=INTEGER}
226 243
   </update>
227 244
 </mapper>

+ 2 - 2
src/main/java/com/chinaitop/depot/storage/mapper/StorageKcglJkqyqDefaultMapper.xml

@@ -359,8 +359,8 @@
359 359
 	  plan.execute_type,
360 360
 	  jkqyq.is_Upload
361 361
 	  FROM depot_qh.storage_overhead_set overhead 
362
-	  LEFT JOIN crk_qh.data_kcgl_fcbgz_default fcbgz ON overhead.lsxz = fcbgz.hwxz
363
-	  LEFT JOIN crk_qh.data_kcgl_xckc_default xckc ON fcbgz.DataID = xckc.DataID
362
+	  LEFT JOIN data_kcgl_fcbgz_default fcbgz ON overhead.lsxz = fcbgz.hwxz
363
+	  LEFT JOIN data_kcgl_xckc_default xckc ON fcbgz.DataID = xckc.DataID
364 364
 	  LEFT JOIN depot_qh.business_delivery_storage_notice notice ON xckc.tzdh = notice.bill_number
365 365
 	  LEFT JOIN depot_qh.business_plan plan ON notice.plan_number = plan.plan_number
366 366
 	  LEFT JOIN depot_qh.storage_kcgl_jkqyq_apply_default jkqyq ON fcbgz.ch = jkqyq.ch  

+ 15 - 12
src/main/java/com/chinaitop/depot/storage/mapper/WarehouseSealingRecordMapper.xml

@@ -151,7 +151,7 @@
151 151
       o.org_id,
152 152
       cc.fcqrdh,
153 153
       cc.id,
154
-      Bs.storehouse_name ,
154
+      Bs.storehouse_name,
155 155
       cc.basic_storehouse_id,
156 156
       bua.ajmc,
157 157
       cc.basic_unit_aisle_id,
@@ -200,26 +200,28 @@
200 200
       AND (cc.czbz = 'i' OR cc.czbz = 'u')
201 201
   </select>
202 202
     <select id="findStorehouseList" parameterType="java.lang.Integer" resultType="com.chinaitop.depot.storage.model.StorageStorehouseBusiness">
203
-      SELECT
203
+      SELECT DISTINCT
204 204
         bs.storehouse_id storehouseId,
205 205
         bs.storehouse_name storehouseName
206 206
       FROM
207 207
         business_qc_quality_inspection bqqi
208 208
           LEFT JOIN basic_storehouse bs ON bs.storehouse_id = bqqi.basic_storehouse_id
209 209
       WHERE
210
+        bs.del_flag=1 and
210 211
       bqqi.org_id=#{orgId} and bqqi.jylb='01'
211 212
       ORDER BY bqqi.id desc
212 213
 
213 214
     </select>
214 215
   <select id="findWareHouse" parameterType="java.lang.Integer" resultType="com.chinaitop.depot.storage.model.vo.WareHouseVO">
215 216
     SELECT
217
+      DISTINCT
216 218
       bw.warehouse_name warehouseName,
217 219
       bw.warehouse_id warehouseId,
218 220
       bw.aisle_id ajid,
219 221
       bua.ajmc
220
-    FROM
221
-      basic_warehouse bw
222
-        LEFT JOIN basic_unit_aisle bua ON bw.aisle_id = bua.id
222
+    from data_kcgl_kcsw_default kc
223
+           LEFT JOIN  basic_warehouse bw on kc.hwh = bw.warehouse_id and  bw.del_flag=1
224
+           LEFT JOIN basic_unit_aisle bua ON bw.aisle_id = bua.id
223 225
     WHERE
224 226
      bw.storehouse_id=#{storehouseId}
225 227
   </select>
@@ -227,9 +229,9 @@
227 229
     select
228 230
       kc.UnitID orgId,
229 231
       bw.dutystoreman   bgy,
230
-      kc.mxpz	grainVarietyId,
232
+      kc.pz	grainVarietyId,
231 233
       kc.hwxz	grainNatureId,
232
-      kc.kcsl lssl,
234
+      ROUND(kc.kcsl / 1000, 3) lssl,
233 235
       kc.dj	grainGradeId,
234 236
       kc.gb	producerId,
235 237
       kc.cjsj	rcrq,
@@ -240,8 +242,8 @@
240 242
       dj.enumname as "grainGradeName",
241 243
       shnd.enumname as shnd
242 244
     from data_kcgl_kcsw_default kc
243
-           LEFT JOIN  basic_warehouse bw on kc.hwh = bw.warehouse_id
244
-           LEFT JOIN depot_qh.basic_enum pz on pz.enumId = kc.mxpz
245
+           LEFT JOIN  basic_warehouse bw on kc.hwh = bw.warehouse_id and  bw.del_flag=1
246
+           LEFT JOIN depot_qh.basic_enum pz on pz.enumId = kc.pz
245 247
            LEFT JOIN depot_qh.basic_enum xz on xz.enumId = kc.hwxz
246 248
            LEFT JOIN depot_qh.basic_enum dj on dj.enumId = kc.dj
247 249
            LEFT JOIN depot_qh.basic_enum cd on cd.enumId = kc.gb
@@ -265,7 +267,7 @@
265 267
   <insert id="insert" keyProperty="id" useGeneratedKeys="true"  parameterType="com.chinaitop.depot.storage.model.WarehouseSealingRecord">
266 268
     insert into warehouse_sealing_record (id,fcqrdh,ywrq,basic_storehouse_id,basic_unit_aisle_id,warehouse_id,bgy,grain_variety_id,grain_nature_id,lssl,grain_grade_id,grain_area_id,shnd,
267 269
                                         sqr,bmsh, dwldsh,bz,czbz,zhgxsj,createname,createdate,
268
-                                       updatename,updatedate,glfs,status)
270
+                                       updatename,updatedate,glfs,status,rcsj)
269 271
     values (
270 272
              #{id,jdbcType=INTEGER},
271 273
             #{fcqrdh,jdbcType=VARCHAR},
@@ -289,7 +291,7 @@
289 291
             #{createname,jdbcType=VARCHAR},
290 292
             #{createdate,jdbcType=TIMESTAMP},
291 293
             #{updatename,jdbcType=VARCHAR},
292
-            #{updatedate,jdbcType=TIMESTAMP},#{glfs,jdbcType=VARCHAR},#{status,jdbcType=VARCHAR})
294
+            #{updatedate,jdbcType=TIMESTAMP},#{glfs,jdbcType=VARCHAR},#{status,jdbcType=VARCHAR},#{rcsj,jdbcType=TIMESTAMP})
293 295
   </insert>
294 296
 
295 297
   <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.storage.model.WarehouseSealingRecord">
@@ -320,7 +322,8 @@
320 322
       updatename=#{updatename,jdbcType=VARCHAR},
321 323
       updatedate=#{updatedate,jdbcType=TIMESTAMP},
322 324
       glfs= #{glfs,jdbcType=VARCHAR},
323
-      status=#{status,jdbcType=VARCHAR}
325
+      status=#{status,jdbcType=VARCHAR},
326
+      rcsj=#{rcsj,jdbcType=TIMESTAMP}
324 327
   where id = #{id,jdbcType=INTEGER}
325 328
   </update>
326 329
 </mapper>

+ 22 - 1
src/main/java/com/chinaitop/depot/storage/model/ClearanceConfirmation.java

@@ -20,6 +20,8 @@ public class ClearanceConfirmation {
20 20
     private Date updatedate;
21 21
 
22 22
     private String cqqrdh; //出清单确认单号
23
+    
24
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
23 25
     private Date ywrq;      //业务日期,格式:yyyy-MM-dd
24 26
     private String tyajbm; //统一廒间编码
25 27
     private String bgy;    //保管员
@@ -31,9 +33,28 @@ public class ClearanceConfirmation {
31 33
     private String bmsh;  //部门审核
32 34
     private String dwldsh;  //单位领导审核
33 35
     private String bz;      //备注
36
+    private String warehouseId;//货位id
37
+    private String warehouseName;//货位名称
38
+    
34 39
 
35 40
 
36
-    private String storehouseName;
41
+    public String getWarehouseName() {
42
+		return warehouseName;
43
+	}
44
+
45
+	public void setWarehouseName(String warehouseName) {
46
+		this.warehouseName = warehouseName;
47
+	}
48
+
49
+	public String getWarehouseId() {
50
+		return warehouseId;
51
+	}
52
+
53
+	public void setWarehouseId(String warehouseId) {
54
+		this.warehouseId = warehouseId;
55
+	}
56
+
57
+	private String storehouseName;
37 58
     private String ajmc; //廒间名称
38 59
 
39 60
     public String getStorehouseName() {

+ 1 - 1
src/main/java/com/chinaitop/depot/storage/service/impl/GrainSituationCardServiceImpl.java

@@ -133,7 +133,7 @@ public class GrainSituationCardServiceImpl implements GrainSituationCardService
133 133
         List<BusinessQcQualityInspection> list =businessQcQualityInspectionMapper.getQualityInspectionFindByWarehouseId(map);
134 134
         for (BusinessQcQualityInspection b:list) {
135 135
             //查询质检明细
136
-            List<Map<String,Object>> itm =businessQcQualityInspectionItemMapper.findByqualityId(businessQcQualityInspection.getId()+"");
136
+            List<Map<String,Object>> itm =businessQcQualityInspectionItemMapper.findByqualityId(b.getId()+"");
137 137
             Map<Integer, List<String>> transformedData =    cat(itm);
138 138
 
139 139
             b.setMaps(transformedData);

+ 9 - 3
src/main/java/com/chinaitop/depot/storage/service/impl/WarehouseSealingRecordServiceImpl.java

@@ -84,13 +84,14 @@ public class WarehouseSealingRecordServiceImpl implements WarehouseSealingRecord
84 84
             WareHouseVO wareHouseVO= WarehouseSealingRecordMapper.selectTyhwbm(WarehouseSealingRecord.getWarehouseId());
85 85
             if(wareHouseVO!=null){
86 86
                 WarehouseSealingRecord warehouseSealingRecord=  WarehouseSealingRecordMapper.selectFcqrd(WarehouseSealingRecord.getWarehouseId());
87
-                if(warehouseSealingRecord!=null){
87
+               if(warehouseSealingRecord!=null){
88 88
 //                    if(warehouseSealingRecord.getStatus()==1){
89 89
 //                        modelMap.put("message", "该货位已经生成粮情卡");
90 90
 //                        return modelMap;
91 91
 //
92 92
 //                    }
93 93
                     String fcqrd =warehouseSealingRecord.getFcqrdh();
94
+
94 95
                     int startIndex =fcqrd.length() - 11; // 假设20240909开始的位置是从字符串末尾数第15个字符开始
95 96
                     // 要截取的结束位置
96 97
                     int endIndex = fcqrd.length() - 3; // 假设20240909结束的位置是从字符串末尾数第9个字符结束
@@ -99,11 +100,12 @@ public class WarehouseSealingRecordServiceImpl implements WarehouseSealingRecord
99 100
                     String extractedDate = fcqrd.substring(startIndex, endIndex);
100 101
                     // 当前时间
101 102
 
102
-
103 103
                     // 将字符串转换为日期对象
104 104
                     String specificDateStr = extractedDate;
105 105
                     DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
106 106
                     LocalDate specificDateObj = LocalDate.parse(specificDateStr, formatter);
107
+                   LocalDate today = LocalDate.now();
108
+
107 109
                     if (formattedDate.equals(extractedDate)){
108 110
                         // 使用正则表达式提取后三位数字
109 111
                         Pattern pattern = Pattern.compile("(\\d{3})$");
@@ -217,6 +219,7 @@ public class WarehouseSealingRecordServiceImpl implements WarehouseSealingRecord
217 219
             Integer keepingWay =null;
218 220
             Integer draftType =null;
219 221
             Integer temperatureMeasureType=null;
222
+            Integer storehouseType=null;
220 223
 
221 224
                     if(stoMap != null && !stoMap.isEmpty()){
222 225
                         if(stoMap.get("designCapacity")!=null){
@@ -232,8 +235,11 @@ public class WarehouseSealingRecordServiceImpl implements WarehouseSealingRecord
232 235
                         if(stoMap.get("temperatureMeasureType")!=null){
233 236
                             temperatureMeasureType =(Integer)(stoMap.get("temperatureMeasureType"));
234 237
                         }
238
+                        if(stoMap.get("storehouseType")!=null){
239
+                            storehouseType =(Integer)(stoMap.get("storehouseType"));
240
+                        }
235 241
                     }
236
-
242
+            grainSituationCard.setStorehouseType(storehouseType);
237 243
             grainSituationCard.setKeepingWay(keepingWay);
238 244
             grainSituationCard.setDesignCapacity(designCapacity);
239 245
             grainSituationCard.setDrafttype(draftType);