Forráskód Böngészése

【功能完善】【工单上传逻辑处理、物料ZG不再上传ZGSDC】

koul 2 hónapja
szülő
commit
4495868395

+ 2 - 2
src/main/java/com/uas/eis/core/support/SpringDynamicCronTask.java

@@ -51,7 +51,7 @@ public class SpringDynamicCronTask implements SchedulingConfigurer {
                     e.printStackTrace();
                 }
             }, env.getProperty("Task.SyncMakeBasesCron"));
-            taskRegistrar.addCronTask(() -> {
+            /*taskRegistrar.addCronTask(() -> {
                 //业务逻辑
                 try {
                     Method method = scheduleTask.getClass().getMethod(env.getProperty("Task.SyncMakeBaseDetailsMethod"));
@@ -68,7 +68,7 @@ public class SpringDynamicCronTask implements SchedulingConfigurer {
 				}catch (Exception e){
 					e.printStackTrace();
 				}
-			}, env.getProperty("Task.syncMakematerialReplaceCron"));
+			}, env.getProperty("Task.syncMakematerialReplaceCron"));*/
 			taskRegistrar.addCronTask(() -> {
 				//业务逻辑
 				try {

+ 68 - 87
src/main/java/com/uas/eis/service/Impl/ScheduleTaskServiceImpl.java

@@ -46,7 +46,7 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
         try {
             SqlRowList rs = baseDao.queryForRowSet("select id from mes_product where status='W' order by id");
             while (rs.next()){
-                Product product = baseDao.getJdbcTemplate().queryForObject("select case when pr_kh_user='柏英特' or nvl(pr_kh_user,' ')=' ' then 'BYT' else nvl(cu_mescode,cu_code) end pr_kh_user,pr_code ,pr_detail ,replace(PR_SPEC,'''','''''') pr_spec,nvl(pr_unit,'PCS') pr_unit,nvl(pr_cop,'BYT') pr_cop,nvl(pr_version,'0') pr_version,case when nvl(pr_kind,'')='半成品' or nvl(pr_kind,' ')='成品' then  'product' else 'raw' end pr_serial,nvl(pr_validdays,'0') pr_validdays,pr_msdlevel ,pr_kind3 ,pr_f_115 ,pr_f_116 ,pr_f_102,pr_kind,flag,pr_statuscode,pr_status,pr_whcode,pr_kind2,pr_acceptmethod from mes_product left join customer on pr_kh_user=cu_shortname where id=?",
+                Product product = baseDao.getJdbcTemplate().queryForObject("select case when pr_kh_user='柏英特' or nvl(pr_kh_user,' ')=' ' then 'BYT' else nvl(cu_mescode,cu_code) end pr_kh_user,pr_code ,pr_detail ,replace(PR_SPEC,'''','''''') pr_spec,nvl(pr_unit,'PCS') pr_unit,nvl(pr_cop,'BYT') pr_cop,nvl(pr_version,'0') pr_version,case when nvl(pr_kind,'')='半成品' or nvl(pr_kind,' ')='成品' then  'product' else 'raw' end pr_serial,nvl(pr_validdays,'0') pr_validdays,pr_msdlevel ,pr_kind3 ,pr_f_115 ,pr_f_116,pr_kind,flag,pr_statuscode,pr_status,pr_whcode,pr_kind2,pr_acceptmethod,pr_custprodcode from mes_product left join customer on pr_kh_user=cu_shortname where id=?",
                         new BeanPropertyRowMapper<Product>(Product.class), rs.getInt("id"));
                 //获取MES对应仓库
                 String prWhcode = product.getPr_whcode();
@@ -59,30 +59,6 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
                 product.setMesUser(tokenConfig.get("mesUser"));
                 product.setMesPwd(MD5Util.encodeByMD5(tokenConfig.get("mesPwd")));
                 Map<String, Object> map = syncMES(JSON.toJSONString(product, SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncProduct"));
-                if ("ZG".equals(StringUtil.nvl(product.getPr_kh_user(),""))){
-                    product.setPr_kh_user("ZGSDC");
-                    Map<String, Object> map1 =
-                            syncMES(JSON.toJSONString(product, SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncProduct"));
-                    if (map1!=null) {
-                        int code1 = Integer.parseInt(StringUtil.nvl(map1.get("code"), "100"));
-                        if (code1>0) {
-                            int flag = product.getFlag();
-                            if (flag == 1) {
-                                product.setFlag(0);
-                            } else if (flag == 0) {
-                                product.setFlag(1);
-                            }
-                            Map<String, Object> map2 =
-                                    syncMES(JSON.toJSONString(product, SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncProduct"));
-                            if (map2 != null) {
-                                int code2 = Integer.parseInt(StringUtil.nvl(map1.get("code"), "100"));
-                                if (code2 > 0) {
-                                    baseDao.execute("insert into meserrorlog (mel_id,mel_url,mel_error,mel_indate,mel_djcode,mel_type) values (MESERRORLOG_SEQ.NEXTVAL,'" + tokenConfig.get("syncProduct") + "','" + StringUtil.nvl(map.get("msg"), "") + "',sysdate,'" + product.getPr_code() + "','物料资料')");
-                                }
-                            }
-                        }
-                    }
-                }
                 if (map!=null){
                     int code = Integer.parseInt(StringUtil.nvl(map.get("code"), "-1"));
                     if (code==0){
@@ -118,6 +94,7 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
         try {
             SqlRowList rs = baseDao.queryForRowSet("select id,ma_code from mes_make where status='W' order by id");
             while (rs.next()) {
+                boolean syncDetail = false;
                 int count = baseDao.getCount("select count(1) from make where ma_statuscode='FINISH' and ma_code='" + rs.getString("ma_code") + "'");
                 String status = "S";
                 if (count > 0) {
@@ -131,6 +108,7 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
                     int code = Integer.parseInt(StringUtil.nvl(map.get("code"), "-1"));
                     if (code == 0) {
                         baseDao.updateByCondition("mes_make", "status='D'", "status='W' and id=" + rs.getInt("id"));
+                        syncDetail = true;
                     } else {
                         int flag = make.getFlag();
                         if (flag == 1) {
@@ -144,6 +122,7 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
                             int code1 = Integer.parseInt(StringUtil.nvl(map1.get("code"), "-1"));
                             if (code1 == 0) {
                                 baseDao.updateByCondition("mes_makematerial", "status='D'", "status='W' and id=" + rs.getInt("id"));
+                                syncDetail = true;
                             } else {
                                 baseDao.updateByCondition("mes_make", "status='F'", "status='W' and id=" + rs.getInt("id"));
                                 baseDao.execute("insert into meserrorlog (mel_id,mel_url,mel_error,mel_indate,mel_djcode,mel_type) values (MESERRORLOG_SEQ.NEXTVAL,'" + tokenConfig.get("syncMakeBase") + "','" + StringUtil.nvl(map.get("msg"), "") + "',sysdate,'" + make.getMa_code() + "','工单')");
@@ -151,6 +130,9 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
                         }
                     }
                 }
+                if (syncDetail) {
+                    syncMakeBaseDetails(rs.getGeneralInt("erpid"));
+                }
             }
         }catch (Exception e){
                 logger.info("同步工单异常信息:"+e.getMessage());
@@ -159,42 +141,45 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
     }
 
     @Override
-    public void syncMakeBaseDetails() {
+    public void syncMakeBaseDetails(int id) {
         try {
-            SqlRowList rs = baseDao.queryForRowSet("select id,mm_code,mm_detno from mes_makematerial where status='W' order by id");
+            SqlRowList rs = baseDao.queryForRowSet("select id,mm_code,mm_detno,erpid from mes_makematerial where status='W' and mm_maid="+id+" order by id");
             while (rs.next()) {
-                int count = baseDao.getCount("select count(1) from mes_make where status='D' and ma_code='" + rs.getGeneralString("mm_code") + "'");
-                if (count > 0) {
-                    MakeMaterial makeMaterial = baseDao.getJdbcTemplate().queryForObject("select mm_code,erpid,mm_prodcode,pr_detail,replace(PR_SPEC,'''','''''') pr_spec,pr_unit,mm_oneuseqty qty,mm_qty,mm_oneuseqty,'main' type,bo_recorder,to_char(bo_date,'yyyy-MM-dd HH24:mi:ss') bo_date,0 bo_version,nvl(bo_cop,'BYT') bo_cop,mm_prodcode mm_repprodcode,mm_balance,(select nvl(cu_mescode,'BYT') from Product left join customer on pr_kh_user=cu_shortname where pr_code=ma_prodcode) ma_custcode,to_char(mc_indate,'yyyy-MM-dd HH24:mi:ss') mc_indate,mc_recorder,flag,0 rpid from mes_makematerial left join make on ma_id=mm_maid left join Product on mm_prodcode=pr_code left join bom on bo_id=mm_bomid left join (select max(mc_indate) mc_indate,max(mc_recorder) mc_recorder,max(md_mmdetno) md_mmdetno,max(md_makecode) md_makecode from MakeMaterialChangeDet left join MakeMaterialChange on mc_id=md_mcid) on md_makecode=ma_code and md_mmdetno=mm_detno where id=? order by mm_detno", new BeanPropertyRowMapper<MakeMaterial>(MakeMaterial.class), rs.getInt("id"));
-                    makeMaterial.setMesUser(tokenConfig.get("mesUser"));
-                    makeMaterial.setMesPwd(MD5Util.encodeByMD5(tokenConfig.get("mesPwd")));
-                    Map<String, Object> map = syncMES(JSON.toJSONString(makeMaterial, SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncMakeBaseDetail"));
-                    if (map != null) {
-                        int code = Integer.parseInt(StringUtil.nvl(map.get("code"), "-1"));
-                        if (code == 0) {
-                            baseDao.updateByCondition("mes_makematerial", "status='D'", "status='W' and id=" + rs.getInt("id"));
-                        } else {
-                            int flag = makeMaterial.getFlag();
-                            if (flag==1) {
-                                makeMaterial.setFlag(0);
-                            }else if (flag==0) {
-                                makeMaterial.setFlag(1);
-                            }
-                            Map<String, Object> map1 = syncMES(JSON.toJSONString(makeMaterial,
-                                    SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncMakeBaseDetail"));
-                            if (map1 != null) {
-                                int code1 = Integer.parseInt(StringUtil.nvl(map1.get("code"), "-1"));
-                                if (code1 == 0) {
-                                    baseDao.updateByCondition("mes_makematerial", "status='D'", "status='W' and id=" + rs.getInt("id"));
-                                }else {
-                                    baseDao.updateByCondition("mes_makematerial", "status='F'", "status='W' and id=" + rs.getInt("id"));
-                                    baseDao.execute("insert into meserrorlog (mel_id,mel_url,mel_error,mel_indate,mel_djcode,mel_djdetno,mel_type) values(MESERRORLOG_SEQ.NEXTVAL,'" + tokenConfig.get("syncMakeBaseDetail") + "','" + StringUtil.nvl(map.get("msg"), "") + "',sysdate,'" + rs.getGeneralString("mm_code") + "'," + rs.getInt("mm_detno") + ",'工单BOM')");
-                                }
+                boolean syncReplace = false;
+                MakeMaterial makeMaterial = baseDao.getJdbcTemplate().queryForObject("select mm_code,erpid,mm_prodcode,pr_detail,replace(PR_SPEC,'''','''''') pr_spec,pr_unit,mm_oneuseqty qty,mm_qty,mm_oneuseqty,'main' type,bo_recorder,to_char(bo_date,'yyyy-MM-dd HH24:mi:ss') bo_date,0 bo_version,nvl(bo_cop,'BYT') bo_cop,mm_prodcode mm_repprodcode,mm_balance,(select nvl(cu_mescode,'BYT') from Product left join customer on pr_kh_user=cu_shortname where pr_code=ma_prodcode) ma_custcode,to_char(mc_indate,'yyyy-MM-dd HH24:mi:ss') mc_indate,mc_recorder,flag,0 rpid from mes_makematerial left join make on ma_id=mm_maid left join Product on mm_prodcode=pr_code left join bom on bo_id=mm_bomid left join (select max(mc_indate) mc_indate,max(mc_recorder) mc_recorder,max(md_mmdetno) md_mmdetno,max(md_makecode) md_makecode from MakeMaterialChangeDet left join MakeMaterialChange on mc_id=md_mcid) on md_makecode=ma_code and md_mmdetno=mm_detno where id=? order by mm_detno", new BeanPropertyRowMapper<MakeMaterial>(MakeMaterial.class), rs.getInt("id"));
+                makeMaterial.setMesUser(tokenConfig.get("mesUser"));
+                makeMaterial.setMesPwd(MD5Util.encodeByMD5(tokenConfig.get("mesPwd")));
+                Map<String, Object> map = syncMES(JSON.toJSONString(makeMaterial, SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncMakeBaseDetail"));
+                if (map != null) {
+                    int code = Integer.parseInt(StringUtil.nvl(map.get("code"), "-1"));
+                    if (code == 0) {
+                        baseDao.updateByCondition("mes_makematerial", "status='D'", "status='W' and id=" + rs.getInt("id"));
+                        syncReplace = true;
+                    } else {
+                        int flag = makeMaterial.getFlag();
+                        if (flag==1) {
+                            makeMaterial.setFlag(0);
+                        }else if (flag==0) {
+                            makeMaterial.setFlag(1);
+                        }
+                        Map<String, Object> map1 = syncMES(JSON.toJSONString(makeMaterial,
+                                SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncMakeBaseDetail"));
+                        if (map1 != null) {
+                            int code1 = Integer.parseInt(StringUtil.nvl(map1.get("code"), "-1"));
+                            if (code1 == 0) {
+                                baseDao.updateByCondition("mes_makematerial", "status='D'", "status='W' and id=" + rs.getInt("id"));
+                                syncReplace = true;
+                            }else {
+                                baseDao.updateByCondition("mes_makematerial", "status='F'", "status='W' and id=" + rs.getInt("id"));
+                                baseDao.execute("insert into meserrorlog (mel_id,mel_url,mel_error,mel_indate,mel_djcode,mel_djdetno,mel_type) values(MESERRORLOG_SEQ.NEXTVAL,'" + tokenConfig.get("syncMakeBaseDetail") + "','" + StringUtil.nvl(map.get("msg"), "") + "',sysdate,'" + rs.getGeneralString("mm_code") + "'," + rs.getInt("mm_detno") + ",'工单BOM')");
                             }
-
                         }
+
                     }
                 }
+                if (syncReplace) {
+                    syncMakematerialReplace(rs.getGeneralInt("erpid"));
+                }
             }
         }catch (Exception e){
             logger.info("同步工单BOM异常信息:"+e.getMessage());
@@ -203,40 +188,36 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
     }
 
     @Override
-    public void syncMakematerialReplace() {
+    public void syncMakematerialReplace(int id) {
         try {
-            SqlRowList rs = baseDao.queryForRowSet("select id,mp_mmcode, mp_mmdetno,mp_mmid from mes_makematerialreplace where status='W' order by id");
+            SqlRowList rs = baseDao.queryForRowSet("select id,mp_mmcode, mp_mmdetno,mp_mmid from mes_makematerialreplace where status='W' and mp_mmid="+id+" order by id");
             while (rs.next()) {
-            int count =
-                    baseDao.getCount("select count(1) from mes_makematerial where status='D' and " + "erpid=" + rs.getInt("mp_mmid"));
-            if (count > 0) {
-                    MakeMaterial makeMaterial = baseDao.getJdbcTemplate().queryForObject("select mm.mm_code,mm.erpid,mr.mp_prodcode mm_prodcode,pr_detail,replace(PR_SPEC,'''','''''') pr_spec,pr_unit,mm.mm_oneuseqty qty,mr.mp_canuseqty mm_qty,mm.mm_oneuseqty,'alternative' type,bo_recorder,to_char(bo_date,'yyyy-MM-dd HH24:mi:ss') bo_date,0 bo_version,nvl(bo_cop,'BYT') bo_cop,mm.mm_prodcode mm_repprodcode,mm.mm_balance,(select nvl(cu_mescode,'BYT') from Product left join customer on pr_kh_user=cu_shortname where pr_code=ma_prodcode) ma_custcode,to_char(mc_indate,'yyyy-MM-dd HH24:mi:ss') mc_indate,mc_recorder,mr.flag,mr.erpid rpid from mes_makematerialreplace mr left join mes_makematerial mm on mr.mp_mmid=mm.erpid left join make on mm.mm_maid=ma_id left join Product on mr.mp_prodcode=pr_code left join bom on bo_id=mm.mm_bomid left join (select max(mc_indate) mc_indate,max(mc_recorder) mc_recorder,max(md_mmdetno) md_mmdetno,max(md_makecode) md_makecode from MakeMaterialChangeDet left join MakeMaterialChange on mc_id=md_mcid) on md_makecode=ma_code and md_mmdetno=mm.mm_detno where mr.id=?",
-                            new BeanPropertyRowMapper<MakeMaterial>(MakeMaterial.class), rs.getInt("id"));
-                    makeMaterial.setMesUser(tokenConfig.get("mesUser"));
-                    makeMaterial.setMesPwd(MD5Util.encodeByMD5(tokenConfig.get("mesPwd")));
-                    Map<String, Object> map = syncMES(JSON.toJSONString(makeMaterial,
-                            SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncMakeBaseDetail"));
-                    if (map != null) {
-                        int code = Integer.parseInt(StringUtil.nvl(map.get("code"), "-1"));
-                        if (code == 0) {
-                            baseDao.updateByCondition("mes_makematerialreplace", "status='D'", "status='W' and id=" + rs.getInt("id"));
-                        } else {
-                            int flag = makeMaterial.getFlag();
-                            if (flag==1) {
-                                makeMaterial.setFlag(0);
-                            }else if (flag==0) {
-                                makeMaterial.setFlag(1);
-                            }
-                            Map<String, Object> map1 = syncMES(JSON.toJSONString(makeMaterial,
-                                    SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncMakeBaseDetail"));
-                            if (map1 != null) {
-                                int code1 = Integer.parseInt(StringUtil.nvl(map1.get("code"), "-1"));
-                                if (code1 == 0) {
-                                    baseDao.updateByCondition("mes_makematerialreplace", "status='D'", "status='W' and id=" + rs.getInt("id"));
-                                } else {
-                                    baseDao.updateByCondition("mes_makematerialreplace", "status='F'", "status='W' and id=" + rs.getInt("id"));
-                                    baseDao.execute("insert into meserrorlog (mel_id,mel_url,mel_error,mel_indate,mel_djcode,mel_djdetno,mel_type) values(MESERRORLOG_SEQ.NEXTVAL,'" + tokenConfig.get("syncMakeBaseDetail") + "','" + StringUtil.nvl(map.get("msg"), "") + "',sysdate,'" + rs.getGeneralString("mp_mmcode") + "'," + rs.getInt("mp_mmdetno") + ",'工单BOM替代料')");
-                                }
+                MakeMaterial makeMaterial = baseDao.getJdbcTemplate().queryForObject("select mm.mm_code,mm.erpid,mr.mp_prodcode mm_prodcode,pr_detail,replace(PR_SPEC,'''','''''') pr_spec,pr_unit,mm.mm_oneuseqty qty,mr.mp_canuseqty mm_qty,mm.mm_oneuseqty,'alternative' type,bo_recorder,to_char(bo_date,'yyyy-MM-dd HH24:mi:ss') bo_date,0 bo_version,nvl(bo_cop,'BYT') bo_cop,mm.mm_prodcode mm_repprodcode,mm.mm_balance,(select nvl(cu_mescode,'BYT') from Product left join customer on pr_kh_user=cu_shortname where pr_code=ma_prodcode) ma_custcode,to_char(mc_indate,'yyyy-MM-dd HH24:mi:ss') mc_indate,mc_recorder,mr.flag,mr.erpid rpid from mes_makematerialreplace mr left join mes_makematerial mm on mr.mp_mmid=mm.erpid left join make on mm.mm_maid=ma_id left join Product on mr.mp_prodcode=pr_code left join bom on bo_id=mm.mm_bomid left join (select max(mc_indate) mc_indate,max(mc_recorder) mc_recorder,max(md_mmdetno) md_mmdetno,max(md_makecode) md_makecode from MakeMaterialChangeDet left join MakeMaterialChange on mc_id=md_mcid) on md_makecode=ma_code and md_mmdetno=mm.mm_detno where mr.id=?",
+                        new BeanPropertyRowMapper<MakeMaterial>(MakeMaterial.class), rs.getInt("id"));
+                makeMaterial.setMesUser(tokenConfig.get("mesUser"));
+                makeMaterial.setMesPwd(MD5Util.encodeByMD5(tokenConfig.get("mesPwd")));
+                Map<String, Object> map = syncMES(JSON.toJSONString(makeMaterial,
+                        SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncMakeBaseDetail"));
+                if (map != null) {
+                    int code = Integer.parseInt(StringUtil.nvl(map.get("code"), "-1"));
+                    if (code == 0) {
+                        baseDao.updateByCondition("mes_makematerialreplace", "status='D'", "status='W' and id=" + rs.getInt("id"));
+                    } else {
+                        int flag = makeMaterial.getFlag();
+                        if (flag==1) {
+                            makeMaterial.setFlag(0);
+                        }else if (flag==0) {
+                            makeMaterial.setFlag(1);
+                        }
+                        Map<String, Object> map1 = syncMES(JSON.toJSONString(makeMaterial,
+                                SerializerFeature.WriteMapNullValue).replace("null", "\"\""), tokenConfig.get("syncMakeBaseDetail"));
+                        if (map1 != null) {
+                            int code1 = Integer.parseInt(StringUtil.nvl(map1.get("code"), "-1"));
+                            if (code1 == 0) {
+                                baseDao.updateByCondition("mes_makematerialreplace", "status='D'", "status='W' and id=" + rs.getInt("id"));
+                            } else {
+                                baseDao.updateByCondition("mes_makematerialreplace", "status='F'", "status='W' and id=" + rs.getInt("id"));
+                                baseDao.execute("insert into meserrorlog (mel_id,mel_url,mel_error,mel_indate,mel_djcode,mel_djdetno,mel_type) values(MESERRORLOG_SEQ.NEXTVAL,'" + tokenConfig.get("syncMakeBaseDetail") + "','" + StringUtil.nvl(map.get("msg"), "") + "',sysdate,'" + rs.getGeneralString("mp_mmcode") + "'," + rs.getInt("mp_mmdetno") + ",'工单BOM替代料')");
                             }
                         }
                     }

+ 2 - 2
src/main/java/com/uas/eis/service/ScheduleTaskService.java

@@ -20,12 +20,12 @@ public interface ScheduleTaskService {
     /**
      * 同步工单BOM
      */
-    void syncMakeBaseDetails();
+    void syncMakeBaseDetails(int id);
 
     /**
      * 同步替代料
      */
-    void syncMakematerialReplace();
+    void syncMakematerialReplace(int id);
 
     /**
      * 同步客户资料

+ 0 - 22
src/main/java/com/uas/eis/task/ScheduleTask.java

@@ -43,28 +43,6 @@ public class ScheduleTask {
 
     }
 
-    /**
-     * 同步工单BOM
-     */
-    public void syncMakeBaseDetails() {
-        logger.info("同步工单BOM开始");
-        Date date = new Date();
-        scheduleTaskService.syncMakeBaseDetails();
-        logger.info("同步工单BOM:用时" + ((System.currentTimeMillis() - date.getTime()) / 1000));
-
-    }
-
-    /**
-     * 同步替代料
-     */
-    public void syncMakematerialReplace() {
-        logger.info("同步替代料开始");
-        Date date = new Date();
-        scheduleTaskService.syncMakematerialReplace();
-        logger.info("同步替代料:用时" + ((System.currentTimeMillis() - date.getTime()) / 1000));
-
-    }
-
     /**
      * 同步客户资料
      */

+ 1 - 5
src/main/resources/application-prod.yml

@@ -16,11 +16,7 @@ Task:
     SyncProductsMethod: syncProducts
     SyncProductsCron: 0 0/1 * * * ?
     SyncMakeBasesMethod: syncMakeBases
-    SyncMakeBasesCron: 0 0/1 * * * ?
-    SyncMakeBaseDetailsMethod: syncMakeBaseDetails
-    SyncMakeBaseDetailsCron: 0 0/1 * * * ?
-    syncMakematerialReplaceMethod: syncMakematerialReplace
-    syncMakematerialReplaceCron: 0 0/1 * * * ?
+    SyncMakeBasesCron: 0 0/2 * * * ?
     syncCustomerMethod: syncCustomer
     syncCustomerCron: 0 0/1 * * * ?