Browse Source

计划单统计表、分配列表、面损列表中查询条件,单据状态单选又能多选

zengtx 1 year ago
parent
commit
472239e8c3

+ 46 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/controller/SyCostLossReviewController.java

@@ -90,7 +90,12 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
        if(syCostLossReview.getPlanNo()=="" || syCostLossReview.getPlanNo()==null){
            if(syCostLossReview.getFstatus()!=null && syCostLossReview.getFstatus()!="" || oConvertUtils.isNotEmpty(syCostLossReview.getFfirstApproveDateB())){
                //查面损的数据
-               List<String> list= syCostLossReviewService.queryCodeByfstatus(syCostLossReview.getFstatus(),syCostLossReview.getFfirstApproveDateB(),syCostLossReview.getFfirstApproveDateE());
+               List<String> statusList = new ArrayList<>();
+               String statusSplit[] = syCostLossReview.getFstatus().split(",");
+               for(String str:statusSplit){
+                   statusList.add(str);
+               }
+               List<String> list= syCostLossReviewService.queryCodeByfstatus(statusList,syCostLossReview.getFfirstApproveDateB(),syCostLossReview.getFfirstApproveDateE());
                if(list.size()<1){
                    return Result.OK(nullList);
                }
@@ -98,7 +103,12 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
            }
            if(syCostLossReview.getCstatus()!=null && syCostLossReview.getCstatus()!=""){
                //查成本的数据
-               List<String> list= syCostLossReviewService.queryCodeBycstatus(syCostLossReview.getCstatus());
+               List<String> statusList = new ArrayList<>();
+               String statusSplit[] = syCostLossReview.getCstatus().split(",");
+               for(String str:statusSplit){
+                   statusList.add(str);
+               }
+               List<String> list= syCostLossReviewService.queryCodeBycstatus(statusList);
                if(list.size()<1){
                    return Result.OK(nullList);
                }
@@ -210,6 +220,8 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
                sy.setPlanMan(planStatistics.get(0).getPlanMan());
                sy.setRemarks(planStatistics.get(0).getRemarks());
                sy.setId(planStatistics.get(0).getId());
+               //刷成衣结束日期
+               sy.setReadyEndDate(planStatistics.get(0).getReadyEndDate());
            }
 
        }
@@ -228,7 +240,17 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
                                         @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
                                         HttpServletRequest req){
        Page<FabricLossReview> page = new Page<FabricLossReview>(pageNo, pageSize);
-       IPage<FabricLossReview> pageList = syCostLossReviewService.querySyFabricLossReport(sy,page);
+        List<String> statusList = new ArrayList<>();
+        String stuta = sy.getStatus();
+        if(oConvertUtils.isNotEmpty(stuta)){
+
+            String statusSplit[] = stuta.split(",");
+            for(String str:statusSplit){
+                statusList.add(str);
+            }
+
+        }
+       IPage<FabricLossReview> pageList = syCostLossReviewService.querySyFabricLossReport(statusList,sy,page);
         for(FabricLossReview li:pageList.getRecords()){
             //查询指派人
             String name = syCostLossReviewMapper.querySyApprovalAssignedBy(li.getCCode());
@@ -250,7 +272,17 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
                                          @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
                                          HttpServletRequest req){
         Page<CostAllocationReview> page = new Page<CostAllocationReview>(pageNo, pageSize);
-        IPage<CostAllocationReview> pageList = syCostLossReviewService.queryCostAllocation(sy,page);
+        List<String> statusList = new ArrayList<>();
+        String stuta = sy.getStatus();
+        if(oConvertUtils.isNotEmpty(stuta)){
+
+            String statusSplit[] = stuta.split(",");
+            for(String str:statusSplit){
+                statusList.add(str);
+            }
+
+        }
+        IPage<CostAllocationReview> pageList = syCostLossReviewService.queryCostAllocation(statusList,sy,page);
 
         for(CostAllocationReview li:pageList.getRecords()){
             //查询指派人
@@ -442,7 +474,16 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
                           @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
                           HttpServletRequest req, HttpServletResponse response) throws IOException {
         Page<CostAllocationReview> page = new Page<CostAllocationReview>(pageNo, -1);
-        IPage<CostAllocationReview> pageList = syCostLossReviewService.queryCostAllocation(sy,page);
+        List<String> statusList = new ArrayList<>();
+        String stuta = sy.getStatus();
+        if(oConvertUtils.isNotEmpty(stuta)){
+            String statusSplit[] = stuta.split(",");
+            for(String str:statusSplit){
+                statusList.add(str);
+            }
+
+        }
+        IPage<CostAllocationReview> pageList = syCostLossReviewService.queryCostAllocation(statusList,sy,page);
         //获取模板输入流
         InputStream inStream = new FileInputStream("D:\\单证模板\\成本分配列表.xlsx");
         //通过poi创建表对象

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/entity/SyCostLossReview.java

@@ -52,6 +52,8 @@ public class SyCostLossReview {
 	private String frejectDate;
 
 	private String ffirstApproveDate;
+	//刷成衣结束日期
+	private String readyEndDate;
 
     //面损表审批状态
 	private String stuta;

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/mapper/SyCostLossReviewMapper.java

@@ -29,8 +29,8 @@ public interface SyCostLossReviewMapper extends BaseMapper<SyCostLossReview> {
     @DS("multi-one")
     List<String> queryMakerByplanNo(@Param("planNo")String planNo);
 
-    IPage<FabricLossReview> querySyFabricLossReport(@Param("sy")FabricLossReview sy, Page<FabricLossReview> page);
-    IPage<CostAllocationReview> queryCostAllocation(@Param("sy")CostAllocationReview sy, Page<CostAllocationReview> page);
+    IPage<FabricLossReview> querySyFabricLossReport(@Param("status") List<String> status,@Param("sy")FabricLossReview sy, Page<FabricLossReview> page);
+    IPage<CostAllocationReview> queryCostAllocation(@Param("status") List<String> status,@Param("sy")CostAllocationReview sy, Page<CostAllocationReview> page);
 
     SyCostLossReview querySyFabricLossByCode(@Param("planCode")String planCode);
     SyCostLossReview queryCostAllocationByCode(@Param("planCode")String planCode);
@@ -38,8 +38,8 @@ public interface SyCostLossReviewMapper extends BaseMapper<SyCostLossReview> {
     @DS("multi-one")
     List<String> queryCodeBymaker(@Param("maker")String maker);
 
-    List<String> queryCodeByfstatus(@Param("status")String status,@Param("ffirstApproveDateB")String ffirstApproveDateB,@Param("ffirstApproveDateE")String ffirstApproveDateE);
-    List<String> queryCodeBycstatus(@Param("status")String status);
+    List<String> queryCodeByfstatus(@Param("status")List<String> status,@Param("ffirstApproveDateB")String ffirstApproveDateB,@Param("ffirstApproveDateE")String ffirstApproveDateE);
+    List<String> queryCodeBycstatus(@Param("status")List<String> status);
     List<String> queryCodeByPlanTable(@Param("remarks")String remarks,@Param("planMan")String planMan);
 
 

+ 17 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/mapper/xml/SyCostLossReviewMapper.xml

@@ -246,7 +246,10 @@
             AND JSON_EXTRACT( a.content, '$.makingPeople' ) LIKE CONCAT('%',#{sy.makingPeople},'%')
         </if>
         <if test="sy.status != null and sy.status !=''">
-            AND a.status = #{sy.status}
+            AND a.status in
+            <foreach collection="status" item="value" index="index" open="(" separator="," close=")">
+                #{value}
+            </foreach>
         </if>
         <if test='sy.rejectDate != null and sy.rejectDate !="" and sy.rejectDate == "1"'>
             AND b.stuta = '驳回'
@@ -344,7 +347,10 @@
             AND b.stuta = '驳回'
         </if>
         <if test="sy.status != null and sy.status !=''">
-            AND a.status = #{sy.status}
+            AND a.status in
+            <foreach collection="status" item="value" index="index" open="(" separator="," close=")">
+                #{value}
+            </foreach>
         </if>
         group by a.plan_num
 
@@ -424,7 +430,11 @@
         from sy_fabric_loss_report
         where 1=1
         <if test='status !="" and status != null'>
-            and status=#{status}
+            and status in
+            <foreach collection="status" item="value" index="index" open="(" separator="," close=")">
+                #{value}
+            </foreach>
+
         </if>
         <if test='ffirstApproveDateB !="" and ffirstApproveDateB != null'>
             and first_approve_date between #{ffirstApproveDateB} and #{ffirstApproveDateE}
@@ -434,7 +444,10 @@
     <select id="queryCodeBycstatus" resultType="String">
         select plan_num as cCode
         from sy_cost_json
-        where status=#{status}
+        where status in
+        <foreach collection="status" item="value" index="index" open="(" separator="," close=")">
+        #{value}
+        </foreach>
     </select>
     <select id="queryCodeByPlanTable" resultType="String">
         select plan_num as cCode from sy_plan_statistics

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/service/ISyCostLossReviewService.java

@@ -20,13 +20,13 @@ import java.util.List;
 public interface ISyCostLossReviewService extends IService<SyCostLossReview> {
      IPage<SyCostLossReview> querylist(SyCostLossReview syCostLossReview,List<String> list, Page<SyCostLossReview> page,List<String> planlist);
      List<String> queryMakerByplanNo(String planNo);
-     IPage<FabricLossReview> querySyFabricLossReport(FabricLossReview sy, Page<FabricLossReview> page);
-     IPage<CostAllocationReview> queryCostAllocation(CostAllocationReview sy, Page<CostAllocationReview> page);
+     IPage<FabricLossReview> querySyFabricLossReport(List<String> status,FabricLossReview sy, Page<FabricLossReview> page);
+     IPage<CostAllocationReview> queryCostAllocation(List<String> status,CostAllocationReview sy, Page<CostAllocationReview> page);
      SyCostLossReview querySyFabricLossByCode(String planCode);
      SyCostLossReview queryCostAllocationByCode(String planCode);
      List<String> queryCodeBymaker(String maker);
-     List<String> queryCodeByfstatus(String status,String ffirstApproveDateB,String ffirstApproveDateE);
-     List<String> queryCodeBycstatus(String status);
+     List<String> queryCodeByfstatus(List<String> status,String ffirstApproveDateB,String ffirstApproveDateE);
+     List<String> queryCodeBycstatus(List<String> status);
      List<String> queryCodeByPlanTable(String remarks,String planMan);
 
 

+ 6 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/service/impl/SyCostLossReviewServiceImpl.java

@@ -49,13 +49,13 @@ public class SyCostLossReviewServiceImpl extends ServiceImpl<SyCostLossReviewMap
     }
 
     @Override
-    public IPage<FabricLossReview> querySyFabricLossReport(FabricLossReview sy, Page<FabricLossReview> page) {
-        return syCostLossReviewMapper.querySyFabricLossReport(sy, page);
+    public IPage<FabricLossReview> querySyFabricLossReport(List<String> status,FabricLossReview sy, Page<FabricLossReview> page) {
+        return syCostLossReviewMapper.querySyFabricLossReport(status,sy, page);
     }
 
     @Override
-    public IPage<CostAllocationReview> queryCostAllocation(CostAllocationReview sy, Page<CostAllocationReview> page) {
-        return syCostLossReviewMapper.queryCostAllocation(sy, page);
+    public IPage<CostAllocationReview> queryCostAllocation(List<String> status,CostAllocationReview sy, Page<CostAllocationReview> page) {
+        return syCostLossReviewMapper.queryCostAllocation(status,sy, page);
     }
 
     @Override
@@ -74,12 +74,12 @@ public class SyCostLossReviewServiceImpl extends ServiceImpl<SyCostLossReviewMap
     }
 
     @Override
-    public List<String> queryCodeByfstatus(String status,String ffirstApproveDateB,String ffirstApproveDateE) {
+    public List<String> queryCodeByfstatus(List<String> status,String ffirstApproveDateB,String ffirstApproveDateE) {
         return syCostLossReviewMapper.queryCodeByfstatus(status,ffirstApproveDateB,ffirstApproveDateE);
     }
 
     @Override
-    public List<String> queryCodeBycstatus(String status) {
+    public List<String> queryCodeBycstatus(List<String> status) {
         return syCostLossReviewMapper.queryCodeBycstatus(status);
     }
 

+ 4 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/syPlanStatistics/entity/SyPlanStatistics.java

@@ -66,4 +66,8 @@ public class SyPlanStatistics implements Serializable {
 	@Excel(name = "删除标识", width = 15)
     @ApiModelProperty(value = "删除标识")
     private Integer delFlag;
+    /**刷成衣结束日期*/
+    @Excel(name = "刷成衣结束日期", width = 15)
+    @ApiModelProperty(value = "刷成衣结束日期")
+	private String readyEndDate;
 }