|
|
@@ -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){
|
|
|
@@ -106,6 +82,30 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ 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"), "-1"));
|
|
|
+ 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() + "','物料资料')");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
logger.info("物料资料异常信息:"+e.getMessage());
|