hanqingsong vor 1 Jahr
Ursprung
Commit
66bc4e2539

+ 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
 }

+ 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