代码更新

This commit is contained in:
2022-12-13 16:02:49 +08:00
parent 0afeceec80
commit aa3c30c252
6 changed files with 141 additions and 2 deletions

View File

@@ -74,4 +74,12 @@ public class RawfoilworkorderController {
rawfoilworkorderService.compelEnd(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("称重")
@ApiOperation("称重")
@PostMapping("/confirm")
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
rawfoilworkorderService.confirm(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@@ -78,4 +78,11 @@ public interface RawfoilworkorderService {
* @param whereJson /
*/
void compelEnd(JSONObject whereJson);
/**
* 称重
*
* @param whereJson /
*/
void confirm(JSONObject whereJson);
}

View File

@@ -208,4 +208,19 @@ public class RawfoilworkorderServiceImpl implements RawfoilworkorderService {
tab.update(json);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void confirm(JSONObject whereJson) {
WQLObject tab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder");
String productin_qty = whereJson.getString("productin_qty");
JSONObject jsonRaw = tab.query("workorder_id = '" + whereJson.getString("workorder_id") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(productin_qty)) {
jsonRaw.put("productin_qty",0);
} else {
jsonRaw.put("productin_qty",whereJson.getDoubleValue("productin_qty"));
}
tab.update(jsonRaw);
}
}