ソースを参照

质检数据录入添加orgId条件

hanqingsong 4 ヶ月 前
コミット
11e2e57068

+ 1 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/reserveLayout/modular/qualityInspectionOrg/controller/QualityInspectionController.java

@@ -42,7 +42,7 @@ public class QualityInspectionController {
42 42
     @ApiOperationSupport(order = 1)
43 43
     @ApiOperation("质检数据录入-分页")
44 44
     @GetMapping("/pageList")
45
-    public CommonResult<Page<BusinessQcQualityInspection>> pageList(QualityInspectionPageParam pageParam) {
45
+    public CommonResult<Page<BusinessQcQualityInspection>> pageList(@Validated QualityInspectionPageParam pageParam) {
46 46
         return CommonResult.data(qualityInspectionService.pageList(pageParam));
47 47
     }
48 48
 

+ 1 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/reserveLayout/modular/qualityInspectionOrg/mapper/QualityInspectionMapper.java

@@ -15,7 +15,7 @@ import java.util.Map;
15 15
  * @create 2024-06-11 17:23
16 16
  */
17 17
 public interface QualityInspectionMapper extends BaseMapper<BusinessQcQualityInspection> {
18
-    Page<BusinessQcQualityInspection> pageList(Page<Object> objectPage, @Param("storehouseName") String storehouseName);
18
+    Page<BusinessQcQualityInspection> pageList(Page<Object> objectPage, @Param("storehouseName") String storehouseName, @Param("orgId") Integer orgId);
19 19
 
20 20
     String selectOnly(Map<String, Object> map);
21 21
 

+ 2 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/reserveLayout/modular/qualityInspectionOrg/mapper/mapping/QualityInspectionMapper.xml

@@ -26,8 +26,9 @@
26 26
         LEFT JOIN depot_qh.basic_enum be ON qqi.grain_variety_id = be.enumId
27 27
         LEFT JOIN depot_qh.basic_enum be1 ON qqi.grain_nature_id = be1.enumId
28 28
         <where>
29
+            qqi.org_id = #{orgId}
29 30
             <if test="storehouseName != null and storehouseName != ''">
30
-                bs.storehouse_name LIKE concat("%",#{storehouseName},"%")
31
+               and bs.storehouse_name LIKE concat("%",#{storehouseName},"%")
31 32
             </if>
32 33
         </where>
33 34
     </select>

+ 6 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/reserveLayout/modular/qualityInspectionOrg/param/QualityInspectionPageParam.java

@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModelProperty;
4 4
 import lombok.Getter;
5 5
 import lombok.Setter;
6 6
 
7
+import javax.validation.constraints.NotNull;
8
+
7 9
 /**
8 10
  * @author qingsong.han
9 11
  * @description:
@@ -21,4 +23,8 @@ public class QualityInspectionPageParam {
21 23
 
22 24
     @ApiModelProperty(value = "仓房名称")
23 25
     private String storehouseName;
26
+
27
+    @ApiModelProperty(value = "机构编码")
28
+    @NotNull(message = "orgId不能为空")
29
+    private Integer orgId;
24 30
 }

+ 1 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/reserveLayout/modular/qualityInspectionOrg/service/impl/QualityInspectionServiceImpl.java

@@ -124,7 +124,7 @@ public class QualityInspectionServiceImpl extends ServiceImpl<QualityInspectionM
124 124
 
125 125
     @Override
126 126
     public Page<BusinessQcQualityInspection> pageList(QualityInspectionPageParam pageParam) {
127
-        return qualityInspectionMapper.pageList(new Page<>(pageParam.getCurrent(), pageParam.getSize()), pageParam.getStorehouseName());
127
+        return qualityInspectionMapper.pageList(new Page<>(pageParam.getCurrent(), pageParam.getSize()), pageParam.getStorehouseName(), pageParam.getOrgId());
128 128
     }
129 129
 
130 130
     @Override