Przeglądaj źródła

染厂入库单推送调整,计划单调整

huxy 2 tygodni temu
rodzic
commit
e1fc07c21f

+ 9 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.java

@@ -819,8 +819,12 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
 
             SyCostAllocationCostpay syCostAllocationCostpay = syCostAllocationCostpays.get(i);
             //人民币税额算占比
-            System.out.println("账套号  "+syCostAllocationCostpay.getSetNo()+" 支出单号  "+syCostAllocationCostpay.getDisbursementSlipNo()
-                    +"  税额  "+syCostAllocationCostpay.getShuiemoney()+"  占比  "+zhanBi);
+//            System.out.println("账套号  "+syCostAllocationCostpay.getSetNo()+" 支出单号  "+syCostAllocationCostpay.getDisbursementSlipNo()
+//                    +"  税额  "+syCostAllocationCostpay.getShuiemoney()+"  占比  "+zhanBi);
+
+            if(oConvertUtils.isNotEmpty(syCostAllocationCostpay.getDisbursedLocalmoney())){
+                syCostAllocationCostpay.setDisbursedLocalmoney(syCostAllocationCostpay.getDisbursedLocalmoney().setScale(2,BigDecimal.ROUND_HALF_UP));
+            }
             if(syCostAllocationCostpay.getSetNo().equals("101")){//101才计算占比
                 //人民币 税额算占比
                 if(oConvertUtils.isNotEmpty(syCostAllocationCostpay.getShuiemoney())){
@@ -835,6 +839,7 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
                     syCostAllocationCostpay.setDisbursedOriginalmoney(syCostAllocationCostpay.getDisbursedOriginalmoney().multiply(zhanBi).setScale(2,BigDecimal.ROUND_HALF_UP));
                 }
             }
+            System.out.println("账套号  "+syCostAllocationCostpay.getSetNo()+"    不含税人民币    "+syCostAllocationCostpay.getDisbursedLocalmoney());
 
             //费用支出单原币本币汇总 并 赋值给表头(运杂费)
             if(syCostAllocation.getUsdExpense()==null){
@@ -849,13 +854,13 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
             }
 
             if(syCostAllocation.getRmbExpense()==null){
-                syCostAllocation.setRmbExpense(syCostAllocationCostpay.getDisbursedLocalmoney());
+                syCostAllocation.setRmbExpense(syCostAllocationCostpay.getDisbursedLocalmoney().setScale(2,BigDecimal.ROUND_HALF_UP));
             }else {
                 if(syCostAllocation.getRmbExpense()==null){
                     syCostAllocation.setRmbExpense(BigDecimal.ZERO);
                 }
                 if(syCostAllocationCostpay.getDisbursedLocalmoney()!=null){
-                    syCostAllocation.setRmbExpense(syCostAllocation.getRmbExpense().add(syCostAllocationCostpay.getDisbursedLocalmoney()));
+                    syCostAllocation.setRmbExpense(syCostAllocation.getRmbExpense().add(syCostAllocationCostpay.getDisbursedLocalmoney().setScale(2,BigDecimal.ROUND_HALF_UP)));
                 }
             }
         }

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

@@ -93,6 +93,8 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
        long startTime = System.currentTimeMillis();
        IPage<SyCostLossReview> nullList = new Page<>();
        List<String> sumList = new ArrayList<>();
+//       System.out.println("getReadyEndDateB\t"+syCostLossReview.getReadyEndDateB());
+//       System.out.println("getReadyEndDateE\t"+syCostLossReview.getReadyEndDateE());
        if(syCostLossReview.getPlanNo()=="" || syCostLossReview.getPlanNo()==null){
            if(syCostLossReview.getFstatus()!=null && syCostLossReview.getFstatus()!=""
                    ||oConvertUtils.isNotEmpty(syCostLossReview.getFfirstApproveDateB())
@@ -173,8 +175,11 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
                }
            }
                if((syCostLossReview.getRemarks()!=null && syCostLossReview.getRemarks()!="") ||
-                       (syCostLossReview.getPlanMan()!=null && syCostLossReview.getPlanMan()!="")){
-                   List<String> list= syCostLossReviewService.queryCodeByPlanTable(syCostLossReview.getRemarks(),syCostLossReview.getPlanMan());
+                       (syCostLossReview.getPlanMan()!=null && syCostLossReview.getPlanMan()!="")
+                       || oConvertUtils.isNotEmpty(syCostLossReview.getReadyEndDateB())
+                       || oConvertUtils.isNotEmpty(syCostLossReview.getReadyEndDateE())
+                        ){
+                   List<String> list= syCostLossReviewService.queryCodeByPlanTable(syCostLossReview);
                    if(list.size()<1){
                        return Result.OK(nullList);
                    }
@@ -204,8 +209,8 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
        }else {
            sumList=null;
        }
-       System.out.println("sumList.size    "+sumList.size());
-       System.out.println("sumList    "+sumList);
+//       System.out.println("sumList.size    "+sumList.size());
+//       System.out.println("sumList    "+sumList);
        IPage<SyCostLossReview> pageList;
        pageList = syCostLossReviewMapper.querylist(syCostLossReview,sumList,page,new ArrayList<>());
        if(sumList != null && sumList.size()!=0&& oConvertUtils.isNotEmpty(sumList)&&oConvertUtils.isEmpty(syCostLossReview.getDverifyDateB())){
@@ -225,7 +230,6 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
        Map<String, SyCostLossReview> map2 = list2.stream()
                .collect(Collectors.toMap(SyCostLossReview::getPlanNo, c2 -> c2));
        long endTime2 = System.currentTimeMillis();
-       System.out.println("map2   \n"+map2.get("SYL8330"));
        System.out.println("生成时间:" + (endTime2 - startTime) + "ms");
 
 //       //赋值面损审批数据2
@@ -240,10 +244,8 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
 //       System.out.println("sumListsumList\t"+sumList);
        List<SyCostLossReview> list3 = syCostLossReviewService.querySyFabricLossByCode2();
        long endTime3 = System.currentTimeMillis();
-       System.out.println("生成时间:" + (endTime3 - startTime) + "ms");
        Map<String, SyCostLossReview> map3 = list3.stream()
                .collect(Collectors.toMap(SyCostLossReview::getPlanNo, c3 -> c3));
-       System.out.println("map3   \n"+map3.get("SYL8330"));
        //赋值计划统计单保存的数据
        QueryWrapper wrapper = new QueryWrapper();
        List<SyPlanStatistics> planStatistics =syPlanStatisticsService.list(wrapper);
@@ -257,12 +259,12 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
                .map(c1 -> {
                    SyCostLossReview c2 = map2.get(c1.getPlanNo());
                    if (c2 != null) {
-                       c1.setFsubmitDate(c2.getFsubmitDate());
-                       c1.setFfirstApproveDate(c2.getFfirstApproveDate());
-                       c1.setFfinalApproveDate(c2.getFfinalApproveDate());
-                       c1.setFrejectDate(c2.getFrejectDate());
-                       c1.setFstatus(c2.getFstatus());
-                       c1.setMsPlanMan(c2.getMsPlanMan());
+                       c1.setFsubmitDate(c2.getFsubmitDate());//交单日期
+                       c1.setFfirstApproveDate(c2.getFfirstApproveDate());//审核结束日期
+                       c1.setFfinalApproveDate(c2.getFfinalApproveDate());//核纱结束日期
+                       c1.setFrejectDate(c2.getFrejectDate());//返单日期
+                       c1.setFstatus(c2.getFstatus());//面损表单据状态
+                       c1.setMsPlanMan(c2.getMsPlanMan());//对单人
                    }
                    return c1;
                })
@@ -292,6 +294,10 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
                        c1.setId(c2.getId());
                        //刷成衣结束日期
                        c1.setReadyEndDate(c2.getReadyEndDate());
+                       //成衣通知时间
+                       c1.setReadyNoticeDate(c2.getReadyNoticeDate());
+                       //计划单类型
+                       c1.setPlanNumType(c2.getPlanNumType());
                    }
                    return c1;
                })

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

@@ -59,6 +59,9 @@ public class SyCostLossReview {
 	private String ffirstApproveDate;
 	//刷成衣结束日期
 	private String readyEndDate;
+	//查询条件刷成衣结束日期
+	private String readyEndDateB;
+	private String readyEndDateE;
 
     //面损表审批状态
 	private String stuta;
@@ -101,5 +104,11 @@ public class SyCostLossReview {
 	private String dverifyDateB;
 	private String dverifyDateE;
 
+	//成衣通知时间
+	private String readyNoticeDate;
+
+	//计划单类型
+	private String planNumType;
+
 	List<String> sumList;
 }

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

@@ -43,7 +43,7 @@ public interface SyCostLossReviewMapper extends BaseMapper<SyCostLossReview> {
     List<String> queryCodeByfstatus(@Param("status")List<String> status,@Param("e")SyCostLossReview syCostLossReview);
 
     List<String> queryCodeBycstatus(@Param("status")List<String> status,@Param("e")SyCostLossReview syCostLossReview);
-    List<String> queryCodeByPlanTable(@Param("remarks")String remarks,@Param("planMan")String planMan);
+    List<String> queryCodeByPlanTable(@Param("e")SyCostLossReview syCostLossReview);
 
 
     //面损表列表修改审批状态

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

@@ -703,12 +703,15 @@ GROUP BY planNo;
     <select id="queryCodeByPlanTable" resultType="String">
         select plan_num as cCode from sy_plan_statistics
         where del_flag = 0
-        <if test="remarks!=null and remarks!=''">
+        <if test="e.remarks!=null and e.remarks!=''">
             and remarks LIKE CONCAT('%',#{remarks},'%')
         </if>
-        <if test="planMan!=null and planMan!=''">
+        <if test="e.planMan!=null and e.planMan!=''">
             and plan_man = #{planMan}
         </if>
+        <if test='e.readyEndDateB !="" and e.readyEndDateE != null'>
+            and ready_end_date between #{e.readyEndDateB} and #{e.readyEndDateE}
+        </if>
     </select>
 
 <!--    面损表列表取消提交-->

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

@@ -30,7 +30,7 @@ public interface ISyCostLossReviewService extends IService<SyCostLossReview> {
      List<String> queryCodeBymaker(String maker);
      List<String> queryCodeByfstatus(List<String> status,SyCostLossReview syCostLossReview);
      List<String> queryCodeBycstatus(List<String> status,SyCostLossReview syCostLossReview);
-     List<String> queryCodeByPlanTable(String remarks,String planMan);
+     List<String> queryCodeByPlanTable(SyCostLossReview syCostLossReview);
 
 
 

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

@@ -96,8 +96,8 @@ public class SyCostLossReviewServiceImpl extends ServiceImpl<SyCostLossReviewMap
     }
 
     @Override
-    public List<String> queryCodeByPlanTable(String remarks, String planMan) {
-        return syCostLossReviewMapper.queryCodeByPlanTable(remarks, planMan);
+    public List<String> queryCodeByPlanTable(SyCostLossReview syCostLossReview) {
+        return syCostLossReviewMapper.queryCodeByPlanTable(syCostLossReview);
     }
 
 

+ 9 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splfi/service/impl/SyPackingListFabricServiceImpl.java

@@ -1602,7 +1602,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 					if(item.getInventoryCcode()!=null&&item.getInventoryCcode().indexOf("040")>-1&&mapt.get("account").equals("103")
 							&&item.getAfterHeavy()!=null&&item.getAfterHeavy().doubleValue()>0
 							/*&&!moDetailsIds.contains(item.getOmpoIdItem())*/){//103账套中物料分类为040的印花面料
-						List<Map<String,Object>> orderDataItem3 =syPackingListFabricMapper.getOM_MOMaterials(item.getOmpoIdItem(),item.getInventoryCode());//委外订单子表
+//						List<Map<String,Object>> orderDataItem3 =syPackingListFabricMapper.getOM_MOMaterials(item.getOmpoIdItem(),item.getInventoryCode());//委外订单子表
 						moDetailsIds.add(item.getOmpoIdItem());//同一个id只会进来一次
 						Map<String,Object> mapStr1=syPackingListFabricMapper.getOM_MOMain(item.getOmpoIdItem(),item.getInventoryCode());//供应商编码,存货编码
 						////System.out.println("mapStr1\n"+mapStr1);
@@ -1628,10 +1628,10 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 							mapItems7.add(mapItem7);
 							String cSOCode=syPackingListFabricMapper.getSO_SOMain(mapStr1.get("isosid").toString());
 							map7.put("CWHCODE",mapStr1.get("cVenDefine2"));
-							map2.put("CWHCODE",mapStr1.get("cVenDefine2"));//仓库编码
 							map7.put("CVENCODE",mapStr1.get("cVenCode"));
 							map7.put("cOrderCode",cSOCode);
-							for (Map<String,Object> stringObjectMap : orderDataItem3){
+//							map2.put("CWHCODE",mapStr1.get("cVenDefine2"));//仓库编码
+							/*for (Map<String,Object> stringObjectMap : orderDataItem3){
 								JSONObject mapItem2=new JSONObject();
 								getcFree(mapItem2,stringObjectMap);
 								mapItem2.put("ALLCAUTOIDCOL","MOMaterialsID");//订单明细ID对应字段名(固定MOMaterialsID) MOMaterialsID
@@ -1641,7 +1641,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 								mapItem2.put("CBATCH",item.getDyelotNumber());//批号
 								mapItem2.put("CBATCHPROPERTY2",item.getWidth());//门幅
 								mapItems2.add(mapItem2);
-							}
+							}*/
 						}
 
 					}
@@ -1885,12 +1885,12 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 
 		mapt.put("number","two");//销售订单id
 		if(mapList2!=null&&mapList2.size()>0){
-			text(mapList2,"材料出库单");
-			text(mapList7,"染厂采购入库单");
+//			text(mapList2,"材料出库单");
+//			text(mapList7,"印厂采购入库单");
 		}
 		String isSucceed=null;
 		//try{
-			if(mapList2!=null&&mapList2.size()>0&&main.getIsSucceed()!=null&&main.getIsSucceed().indexOf("-7-")>0&&ycIsPush){//印花
+			/*if(mapList2!=null&&mapList2.size()>0&&main.getIsSucceed()!=null&&main.getIsSucceed().indexOf("-7-")>0&&ycIsPush){//印花
 				redisUtil.set("pushsno006", pushsno006);//材料出库单
 				JSONArray resturn2 = InterfaceConnUtils.doPost(mapList2,"materialout_import");//材料出库单
 				isSucceed=result(main,resturn2,"材料出库单",((Map) mapList2.get(0)).get("CACCID").toString(),"2");//材料出库单
@@ -1900,7 +1900,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			else if(mapList2!=null&&mapList2.size()>0&&main.getIsSucceed()==null){
 				redisUtil.set("pushsno001", pushsno007);//染厂采购入库单
 				JSONArray resturn7 = InterfaceConnUtils.doPost(mapList7,"purchasein_import");//采购入库单
-				isSucceed=result(main,resturn7,"厂采购入库单",((Map) mapList.get(0)).get("CACCID").toString(),"7");//采购入库单
+				isSucceed=result(main,resturn7,"厂采购入库单",((Map) mapList.get(0)).get("CACCID").toString(),"7");//采购入库单
 				pushsno001=org.jeecg.modules.system.util.oConvertUtils.addOne(pushsno001);
 				isSucceed(main,isSucceed);
 				//this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn7.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
@@ -1910,7 +1910,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 				isSucceed=result(main,resturn2,"材料出库单",((Map) mapList2.get(0)).get("CACCID").toString(),"2");//材料出库单
 				isSucceed(main,isSucceed);
 				//this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn2.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
-			}
+			}*/
 //		}catch (Exception e){
 //			e.printStackTrace();
 //		}

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

@@ -70,4 +70,14 @@ public class SyPlanStatistics implements Serializable {
     @Excel(name = "刷成衣结束日期", width = 15)
     @ApiModelProperty(value = "刷成衣结束日期")
 	private String readyEndDate;
+
+    /**成衣通知时间*/
+    @Excel(name = "刷成衣结束日期", width = 15)
+    @ApiModelProperty(value = "刷成衣结束日期")
+    private String readyNoticeDate;
+
+    /**计划单类型*/
+    @Excel(name = "计划单类型", width = 15)
+    @ApiModelProperty(value = "计划单类型")
+    private String planNumType;
 }