|
|
@@ -111,8 +111,12 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
|
|
|
if (code == 0) {
|
|
|
baseDao.updateByCondition("mes_makematerial", "status='D'", "status='W' and id=" + rs.getInt("id"));
|
|
|
} else {
|
|
|
- baseDao.updateByCondition("mes_makematerial", "action='N',flag=0","status='W' and id=" + rs.getInt("id"));
|
|
|
- makeMaterial.setFlag(0);
|
|
|
+ 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) {
|
|
|
@@ -149,8 +153,12 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
|
|
|
if (code == 0) {
|
|
|
baseDao.updateByCondition("mes_makematerialreplace", "status='D'", "status='W' and id=" + rs.getInt("id"));
|
|
|
} else {
|
|
|
- baseDao.updateByCondition("mes_makematerialreplace", "action='N',flag=0","status='W' and id=" + rs.getInt("id"));
|
|
|
- makeMaterial.setFlag(0);
|
|
|
+ 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) {
|