物料用量计算

This commit is contained in:
hy2250089 2020-01-02 16:36:57 +08:00
parent 5bece0b46d
commit d73f450488
2 changed files with 18 additions and 31 deletions

View File

@ -232,6 +232,7 @@ public class ProductProcessServiceImpl extends AbstractService<ProductProcess, I
processMaterials.setStatus(ProduceManageConstant.STATUS_AVAILABLE); processMaterials.setStatus(ProduceManageConstant.STATUS_AVAILABLE);
processMaterials.setProcessId(process.getId()); processMaterials.setProcessId(process.getId());
processMaterials.setCode(ProduceManagePublicMethod.creatUniqueCode("SCWL")); processMaterials.setCode(ProduceManagePublicMethod.creatUniqueCode("SCWL"));
processMaterials.setDosage(productProcess.getPiNum()*processMaterials.getDosage());
processMaterials.setCompanyId(currentUser.getCompanyId()); processMaterials.setCompanyId(currentUser.getCompanyId());
processMaterialsList.add(processMaterials); processMaterialsList.add(processMaterials);
} }

View File

@ -121,33 +121,6 @@ public class MtAloneProcessController {
return ResultGenerator.genSuccessResult(pageInfo); return ResultGenerator.genSuccessResult(pageInfo);
} }
/**
* hy正在用
* 点击加工处理页面中工序列表最后一列查看或处理按钮
* 由工序id获取该工序详情及包含的物料信息
* @param params
* @param currentUser
* @return
*/
//@ApiOperation(value = "根据工序id查询工序详情及物料信息", notes = "根据工序id查询工序详情及物料信息")
//@ApiImplicitParams({
// @ApiImplicitParam(name = "processId", value = "工序id", paramType = "query", dataType = "int", required = true),
// @ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false)
//
//})
//@OperateLog(description = "根据工序id查询工序详情及物料信息", type = "查询")
//@GetMapping("/query/process/detail")
//public Result queryProcessDetail(MtAloneProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
// if(currentUser==null){
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
// }
//
// params.setCompanyId(currentUser.getCompanyId());
// PageHelper.startPage(params.getPageNum(), params.getPageSize());
// ProcessAndMaterialsBom processAndMaterialsBom = mtAloneProcessService.queryProcessDetail(params);
// return ResultGenerator.genSuccessResult(processAndMaterialsBom);
//}
/** /**
* hy正在用 * hy正在用
* 点击加工处理页面中工序列表最后一列查看或处理按钮 * 点击加工处理页面中工序列表最后一列查看或处理按钮
@ -175,7 +148,7 @@ public class MtAloneProcessController {
} }
/** /**
* hy正在 * hy
* 工序处理完毕时点击提交同时更新工序信息保存物料信息更新物料库存信息 * 工序处理完毕时点击提交同时更新工序信息保存物料信息更新物料库存信息
* @param processAndProcMat * @param processAndProcMat
* @param currentUser * @param currentUser
@ -188,11 +161,24 @@ public class MtAloneProcessController {
@OperateLog(description = "工序及物料信息保存", type = "更新、保存") @OperateLog(description = "工序及物料信息保存", type = "更新、保存")
@PostMapping("/saveProcAndProcMat") @PostMapping("/saveProcAndProcMat")
public Result saveProcAndProcMat(@RequestBody ProcessAndProcMat processAndProcMat, @ApiIgnore @User CurrentUser currentUser) { public Result saveProcAndProcMat(@RequestBody ProcessAndProcMat processAndProcMat, @ApiIgnore @User CurrentUser currentUser) {
//if(currentUser==null){ if(currentUser==null){
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null ); return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
//} }
mtAloneProcessService.saveProcAndProcMat(processAndProcMat, currentUser); mtAloneProcessService.saveProcAndProcMat(processAndProcMat, currentUser);
return ResultGenerator.genSuccessResult(); return ResultGenerator.genSuccessResult();
} }
//@ApiOperation(value = "工序详情更新", notes = "工序详情更新")
//@ApiImplicitParams({
// @ApiImplicitParam(name = "processAndProcMat", value = "工序及物料", paramType = "body", dataType = "ProcessAndProcMat", required = true)
//})
//@OperateLog(description = "工序详情更新", type = "更新")
//@PostMapping("/update")
//public Result updateProcess(@RequestBody MtAloneProcess mtAloneProcess) {
// mtAloneProcess.setUpdateTime(new Date());
// mtAloneProcessService.update(mtAloneProcess);
// return ResultGenerator.genSuccessResult();
//}
} }