koul пре 4 година
родитељ
комит
bbf080fed8

+ 12 - 12
src/main/java/com/uas/eis/entity/Make.java

@@ -38,9 +38,9 @@ public class Make {
     @JSONField(name = "createdUser")
     private String ma_recorder;
     @JSONField(name = "version")
-    private int ma_version;
+    private String ma_version;
     @JSONField(name = "finterid")
-    private String erpid;
+    private int erpid;
     @JSONField(name = "fWorkShop")
     private String wc_id;
     @JSONField(name = "fCostOBJID")
@@ -56,6 +56,14 @@ public class Make {
     @JSONField(name = "flag")
     private int flag;
 
+    public int getErpid() {
+        return erpid;
+    }
+
+    public void setErpid(int erpid) {
+        this.erpid = erpid;
+    }
+
     public String getMesUser() {
         return mesUser;
     }
@@ -192,22 +200,14 @@ public class Make {
         this.ma_recorder = ma_recorder;
     }
 
-    public int getMa_version() {
+    public String getMa_version() {
         return ma_version;
     }
 
-    public void setMa_version(int ma_version) {
+    public void setMa_version(String ma_version) {
         this.ma_version = ma_version;
     }
 
-    public String getErpid() {
-        return erpid;
-    }
-
-    public void setErpid(String erpid) {
-        this.erpid = erpid;
-    }
-
     public String getWc_id() {
         return wc_id;
     }

+ 1 - 1
src/main/java/com/uas/eis/service/Impl/ERPServiceImpl.java

@@ -49,7 +49,7 @@ public class ERPServiceImpl implements ERPService {
     @Override
     public ApiResult<String> syncMakeBase(String data) {
         Map<Object, Object> store = BaseUtil.parseFormStoreToMap(data);
-        Make make = baseDao.getJdbcTemplate().queryForObject("select ma_code,ma_prodcode,ma_qty,ma_custcode,pr_unit,pr_detail,pr_spec,ma_salecode,to_char(ma_planbegindate,'yyyy-MM-dd') ma_planbegindate,to_char(ma_planenddate,'yyyy-MM-dd') ma_planenddate,nvl(ma_cop,'BYT') ma_cop,'S' status,to_char(ma_date,'yyyy-MM-dd HH24:mi:ss') ma_date,ma_recorder,nvl(ma_version,0) ma_version,ma_id,wc_id,pr_id,to_char(ma_modifydate,'yyyy-MM-dd HH24:mi:ss') ma_modifydate,ma_modifier from make left join product on ma_prodcode=pr_code left join workcenter on ma_wccode=wc_code where ma_id=?",
+        Make make = baseDao.getJdbcTemplate().queryForObject("select ma_code,ma_prodcode,ma_qty,ma_custcode,pr_unit,pr_detail,pr_spec,ma_salecode,to_char(ma_planbegindate,'yyyy-MM-dd') ma_planbegindate,to_char(ma_planenddate,'yyyy-MM-dd') ma_planenddate,nvl(ma_cop,'BYT') ma_cop,'S' status,to_char(ma_date,'yyyy-MM-dd HH24:mi:ss') ma_date,ma_recorder,nvl(ma_version,0) ma_version,erpid,wc_id,pr_id,to_char(ma_modifydate,'yyyy-MM-dd HH24:mi:ss') ma_modifydate,ma_modifier from make left join product on ma_prodcode=pr_code left join workcenter on ma_wccode=wc_code where ma_id=?",
                 new BeanPropertyRowMapper<Make>(Make.class),store.get("ma_id"));
         make.setFlag(Integer.parseInt(StringUtil.nvl(store.get("flag"),"-1")));
         make.setMesPwd(MD5Util.encodeByMD5(tokenConfig.get("mesPwd")));

+ 1 - 2
src/main/java/com/uas/eis/service/Impl/ScheduleTaskServiceImpl.java

@@ -65,8 +65,7 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
     public void syncMakeBases() {
         SqlRowList rs = baseDao.queryForRowSet("select id from mes_make where status='W' order by id");
         while (rs.next()){
-            Make make = baseDao.getJdbcTemplate().queryForObject("select id,ma_code,ma_prodcode,ma_qty,ma_custcode,pr_unit,pr_detail,pr_spec,ma_salecode,to_char(ma_planbegindate,'yyyy-MM-dd') ma_planbegindate,to_char(ma_planenddate,'yyyy-MM-dd') ma_planenddate,nvl(ma_cop,'BYT') ma_cop,'S' status,to_char(ma_date,'yyyy-MM-dd HH24:mi:ss') ma_date,ma_recorder,nvl(ma_version,0) ma_version,erpid,wc_id,pr_id,to_char(ma_modifydate,'yyyy-MM-dd HH24:mi:ss') ma_modifydate,ma_modifier,flag from mes_make left join product on ma_prodcode=pr_code left join workcenter on ma_wccode=wc_code where id=?",
-                    new BeanPropertyRowMapper<Make>(Make.class),rs.getInt("id"));
+            Make make = baseDao.getJdbcTemplate().queryForObject("select ma_code,ma_prodcode,ma_qty,ma_custcode,pr_unit,pr_detail,pr_spec,ma_salecode,to_char(ma_planbegindate,'yyyy-MM-dd') ma_planbegindate,to_char(ma_planenddate,'yyyy-MM-dd') ma_planenddate,nvl(ma_cop,'BYT') ma_cop,'S' status,to_char(ma_date,'yyyy-MM-dd HH24:mi:ss') ma_date,ma_recorder,nvl(ma_version,0) ma_version,erpid,wc_id,pr_id,to_char(ma_modifydate,'yyyy-MM-dd HH24:mi:ss') ma_modifydate,ma_modifier,flag from mes_make left join product on ma_prodcode=pr_code left join workcenter on ma_wccode=wc_code where id=?",new BeanPropertyRowMapper<Make>(Make.class),rs.getInt("id"));
             make.setMesPwd(MD5Util.encodeByMD5(tokenConfig.get("mesPwd")));
             make.setMesUser(tokenConfig.get("mesUser"));
             Map<String, Object> map = syncMES(JSON.toJSONString(make, SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncMakeBase"));