代码更新
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,4 +78,11 @@ public interface RawfoilworkorderService {
|
||||
* @param whereJson /
|
||||
*/
|
||||
void compelEnd(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 称重
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void confirm(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user