浏览代码

2021/07/22 -LRL

lirl 3 年之前
父节点
当前提交
f76f7a11e9

+ 9 - 5
src/main/java/com/steerinfo/ems/emsprodplanmonth/controller/EmsProdplanMonthController.java

@@ -7,6 +7,7 @@ import com.steerinfo.ems.emsprodplanround.service.IEmsProdplanRoundService;
 import com.steerinfo.ems.emsprodplanyear.model.EmsProdplanYear;
 import com.steerinfo.ems.trmworkproc.mapper.TRmWorkprocMapper;
 import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
+import com.steerinfo.ems.trmworkproc.service.ITRmWorkprocService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
@@ -63,6 +64,13 @@ public class EmsProdplanMonthController extends BaseRESTfulController {
     //@RequiresPermissions("emsprodplanmonth:view")
     @GetMapping(value = "/")
     public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        if(parmas.containsKey("workprocid") && parmas.get("workprocid") != null && !"".equals(parmas.get("workprocid").toString())){
+        String  workprocid =  parmas.get("workprocid").toString();
+        if(!workprocid.startsWith(",")){
+            workprocid = "'"+workprocid.replaceAll(",", "','").replaceAll(",", "','")+"'";
+        }
+            parmas.put("workprocid",workprocid);
+        }
         PageList<EmsProdplanMonth> list = emsProdplanMonthService.queryForPage(parmas, pageNum, pageSize);
         return success(list);
     }
@@ -195,9 +203,8 @@ public class EmsProdplanMonthController extends BaseRESTfulController {
                 map.put("parentid",m.getId());
                 List query = emsProdplanRoundService.query(map);
                 if(query.size()>0){
-                    return  failed(null,"该工序在当前月已有轮次计划,无法删除"+m.getId());
+                    return  failed(null,"序号为'"+m.getSqno()+"'在当前月已有轮次计划,无法删除");
                 }
-
                 EmsProdplanMonth tv = emsProdplanMonthService.getById(m.getId());
                 if (tv == null){
                     return failed(null, "数据已经删除,请重新查询数据");
@@ -225,9 +232,6 @@ public class EmsProdplanMonthController extends BaseRESTfulController {
     })
     @GetMapping(value = "/getDates")
     public RESTfulResult getDates(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
-         if(parmas.get("workprocid") != null && parmas.get("workprocid") != ""){
-             parmas.put("type","");
-         }
         PageList dateLc = emsProdplanMonthService.getDateLc(parmas, pageNum, pageSize);
         return success(dateLc);
     }

+ 2 - 0
src/main/java/com/steerinfo/ems/emsprodplanmonth/mapper/EmsProdplanMonthMapper.java

@@ -1,6 +1,8 @@
 package com.steerinfo.ems.emsprodplanmonth.mapper;
 
 import com.steerinfo.ems.emsprodplanmonth.model.EmsProdplanMonth;
+import com.steerinfo.framework.datasource.DataSourceKey;
+import com.steerinfo.framework.datasource.TargetDataSource;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import java.util.HashMap;
 import java.util.List;

+ 2 - 2
src/main/java/com/steerinfo/ems/emsprodplanmonth/mapper/EmsProdplanMonthMapper.xml

@@ -44,7 +44,7 @@
       </if>
 
       <if test="workprocid != null and workprocid != ''">
-        and WORKPROCID in  (#{workprocid})
+        and WORKPROCID in  (${workprocid})
       </if>
       <if test="weightMonth != null">
         and WEIGHT_MONTH = #{weightMonth}
@@ -77,7 +77,7 @@
        and  trunc(MAY) = to_date(#{may},'yyyy-mm')
       </if>
     </where>
-    ORDER  BY WORKPROCID
+    ORDER  BY SQNO
   </sql>
   <sql id="whereLike">
     <where> 

+ 16 - 13
src/main/java/com/steerinfo/ems/emsprodplanmonth/model/EmsProdplanMonth.java

@@ -1,9 +1,13 @@
 package com.steerinfo.ems.emsprodplanmonth.model;
 
 import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
 import java.util.Date;
 
 @ApiModel(value="月计划编制表")
@@ -37,13 +41,13 @@ public class EmsProdplanMonth implements IBasePO<String> {
      * 目标计划量(月)(WEIGHT_MONTH,DECIMAL,0)
      */
     @ApiModelProperty(value="目标计划量(月)",required=false)
-    private Long weightMonth;
+    private BigDecimal weightMonth;
 
     /**
      * 目标计划量(日)(WEIGHT_DAY,DECIMAL,0)
      */
     @ApiModelProperty(value="目标计划量(日)",required=false)
-    private Long weightDay;
+    private BigDecimal weightDay;
 
     /**
      * 单位名称(UNIT,VARCHAR,10)
@@ -91,9 +95,9 @@ public class EmsProdplanMonth implements IBasePO<String> {
     private String state;
 
     @ApiModelProperty(value = "已下发量",required = false)
-    private Long yxf_weight;
+    private BigDecimal yxf_weight;
     @ApiModelProperty(value = "可下发量",required = false)
-    private Long kxf_weight;
+    private BigDecimal kxf_weight;
     @ApiModelProperty(value = "序号",required = false)
     private Long sqno;
 
@@ -105,23 +109,22 @@ public class EmsProdplanMonth implements IBasePO<String> {
         this.sqno = sqno;
     }
 
-    public Long getYxf_weight() {
+    public BigDecimal getYxf_weight() {
         return yxf_weight;
     }
 
-    public void setYxf_weight(Long yxf_weight) {
+    public void setYxf_weight(BigDecimal yxf_weight) {
         this.yxf_weight = yxf_weight;
     }
 
-    public Long getKxf_weight() {
+    public BigDecimal getKxf_weight() {
         return kxf_weight;
     }
 
-    public void setKxf_weight(Long kxf_weight) {
+    public void setKxf_weight(BigDecimal kxf_weight) {
         this.kxf_weight = kxf_weight;
     }
 
-
     public String getState() {
         return state;
     }
@@ -193,19 +196,19 @@ public class EmsProdplanMonth implements IBasePO<String> {
         this.may = may;
     }
 
-    public Long getWeightMonth() {
+    public BigDecimal getWeightMonth() {
         return weightMonth;
     }
 
-    public void setWeightMonth(Long weightMonth) {
+    public void setWeightMonth(BigDecimal weightMonth) {
         this.weightMonth = weightMonth;
     }
 
-    public Long getWeightDay() {
+    public BigDecimal getWeightDay() {
         return weightDay;
     }
 
-    public void setWeightDay(Long weightDay) {
+    public void setWeightDay(BigDecimal weightDay) {
         this.weightDay = weightDay;
     }
 

+ 2 - 0
src/main/java/com/steerinfo/ems/emsprodplanmonth/service/IEmsProdplanMonthService.java

@@ -1,5 +1,7 @@
 package com.steerinfo.ems.emsprodplanmonth.service;
 
+import com.steerinfo.framework.datasource.DataSourceKey;
+import com.steerinfo.framework.datasource.TargetDataSource;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.ems.emsprodplanmonth.model.EmsProdplanMonth;
 import com.steerinfo.framework.service.pagehelper.PageList;

+ 3 - 0
src/main/java/com/steerinfo/ems/emsprodplanmonth/service/impl/EmsProdplanMonthServiceImpl.java

@@ -1,6 +1,8 @@
 package com.steerinfo.ems.emsprodplanmonth.service.impl;
 
 import com.github.pagehelper.Page;
+import com.steerinfo.framework.datasource.DataSourceKey;
+import com.steerinfo.framework.datasource.TargetDataSource;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.steerinfo.ems.emsprodplanmonth.model.EmsProdplanMonth;
@@ -49,6 +51,7 @@ public class EmsProdplanMonthServiceImpl extends BaseServiceImpl<EmsProdplanMont
         return pageInfo;
     }
 
+
     @Override
     public PageList<Map<String, Object>> getDateLc(HashMap<String, Object> parmas, Integer pageNum, Integer pageSize) {
         PageHelper.startPage(pageNum,pageSize);