Merge remote-tracking branch 'origin/feature/DM/nflg-bom' into feature/DM/nflg-bom
This commit is contained in:
commit
5f5ffcd78a
|
|
@ -168,6 +168,8 @@ public class EbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("exportBom")
|
@PostMapping("exportBom")
|
||||||
@ApiOperation("工作明细导出")
|
@ApiOperation("工作明细导出")
|
||||||
|
@LogRecord(success = "Ebom-工作明细导出,操作结果:{{#_ret}}", bizNo = "",
|
||||||
|
extra = "{{#bomRowIds.toString()}}" ,type = "Ebom-工作明细导出")
|
||||||
public void exportBom(@RequestBody List<Long> bomRowIds, HttpServletResponse response) throws IOException {
|
public void exportBom(@RequestBody List<Long> bomRowIds, HttpServletResponse response) throws IOException {
|
||||||
VUtils.isTure(CollUtil.isEmpty(bomRowIds)).throwMessage("请选择要导出的物料行");
|
VUtils.isTure(CollUtil.isEmpty(bomRowIds)).throwMessage("请选择要导出的物料行");
|
||||||
bomNewEbomParentService.exportBom(bomRowIds, response);
|
bomNewEbomParentService.exportBom(bomRowIds, response);
|
||||||
|
|
@ -175,6 +177,8 @@ public class EbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("editExportBom")
|
@PostMapping("editExportBom")
|
||||||
@ApiOperation("编辑导出")
|
@ApiOperation("编辑导出")
|
||||||
|
@LogRecord(success = "Ebom-编辑导出,操作结果:{{#_ret}}", bizNo = "",
|
||||||
|
extra = "{{#list.toString()}}" ,type = "Ebom-编辑导出")
|
||||||
public void editExportBom(@RequestBody List<BomNewEbomParentVO> list, HttpServletResponse response) throws IOException {
|
public void editExportBom(@RequestBody List<BomNewEbomParentVO> list, HttpServletResponse response) throws IOException {
|
||||||
VUtils.isTure(CollectionUtil.isEmpty(list)).throwMessage("请选择要导出的物料行");
|
VUtils.isTure(CollectionUtil.isEmpty(list)).throwMessage("请选择要导出的物料行");
|
||||||
bomNewEbomParentService.editExportBom(list, response);
|
bomNewEbomParentService.editExportBom(list, response);
|
||||||
|
|
@ -245,6 +249,8 @@ public class EbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("revertDesign")
|
@PostMapping("revertDesign")
|
||||||
@ApiOperation("退回到设计")
|
@ApiOperation("退回到设计")
|
||||||
|
@LogRecord(success = "Ebom-退回到设计:{{#log}},操作结果:{{#_ret}}", bizNo = "",
|
||||||
|
extra = "{{#dto.rowIdList.toString()}}" ,type = "Ebom-退回到设计")
|
||||||
public ResultVO<Boolean> revertDesign(@RequestBody BomNewEBomRevertDTO dto) throws ExecutionException, InterruptedException {
|
public ResultVO<Boolean> revertDesign(@RequestBody BomNewEBomRevertDTO dto) throws ExecutionException, InterruptedException {
|
||||||
if (CollectionUtil.isEmpty(dto.getRowIdList())) {
|
if (CollectionUtil.isEmpty(dto.getRowIdList())) {
|
||||||
return ResultVO.error(STATE.ParamErr, "请选择要退回的数据");
|
return ResultVO.error(STATE.ParamErr, "请选择要退回的数据");
|
||||||
|
|
@ -259,6 +265,8 @@ public class EbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("reviewDesign")
|
@PostMapping("reviewDesign")
|
||||||
@ApiOperation("设计复核")
|
@ApiOperation("设计复核")
|
||||||
|
@LogRecord(success = "Ebom-设计复核:{{#log}},操作结果:{{#_ret}}", bizNo = "",
|
||||||
|
extra = "{{#dto.rowIdList.toString()}}" ,type = "Ebom-设计复核")
|
||||||
public ResultVO<Boolean> reviewDesign(@RequestBody BomNewEBomRevertDTO dto) throws ExecutionException, InterruptedException {
|
public ResultVO<Boolean> reviewDesign(@RequestBody BomNewEBomRevertDTO dto) throws ExecutionException, InterruptedException {
|
||||||
if (CollectionUtil.isEmpty(dto.getRowIdList())) {
|
if (CollectionUtil.isEmpty(dto.getRowIdList())) {
|
||||||
return ResultVO.error(STATE.ParamErr, "请选择要复核的数据");
|
return ResultVO.error(STATE.ParamErr, "请选择要复核的数据");
|
||||||
|
|
@ -286,6 +294,7 @@ public class EbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("updateProjectType")
|
@PostMapping("updateProjectType")
|
||||||
@ApiOperation("更新项目类型")
|
@ApiOperation("更新项目类型")
|
||||||
|
@LogRecord(success = "Ebom-更新项目类型,操作结果:{{#_ret}}", bizNo = "",type = "Ebom-更新项目类型")
|
||||||
public ResultVO<Boolean> updateProjectType(@RequestBody BomNewEbomProjectTypeDTO dto) {
|
public ResultVO<Boolean> updateProjectType(@RequestBody BomNewEbomProjectTypeDTO dto) {
|
||||||
|
|
||||||
VUtils.isTure(StrUtil.isEmpty(dto.getProjectType())).throwMessage("项目类型不能为空");
|
VUtils.isTure(StrUtil.isEmpty(dto.getProjectType())).throwMessage("项目类型不能为空");
|
||||||
|
|
@ -311,6 +320,7 @@ public class EbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("changeMaterial")
|
@PostMapping("changeMaterial")
|
||||||
@ApiOperation("更新物料行")
|
@ApiOperation("更新物料行")
|
||||||
|
@LogRecord(success = "Ebom-更新物料行,物料编码:{{#dto.parent.materialNo}}-版本:{{dto.parent.currentVersion}},操作结果:{{#_ret}}", bizNo = "",type = "Ebom-更新物料行")
|
||||||
public ResultVO<List<BomNewEbomParentVO>> changeMaterial(@RequestBody BomNewEBomChangeDTO dto) {
|
public ResultVO<List<BomNewEbomParentVO>> changeMaterial(@RequestBody BomNewEBomChangeDTO dto) {
|
||||||
if ( dto.getParent() ==null || CollectionUtil.isEmpty(dto.getDatas()) ) {
|
if ( dto.getParent() ==null || CollectionUtil.isEmpty(dto.getDatas()) ) {
|
||||||
return ResultVO.error(STATE.Error, "选择更新的数据");
|
return ResultVO.error(STATE.Error, "选择更新的数据");
|
||||||
|
|
@ -326,6 +336,7 @@ public class EbomApi extends BaseApi {
|
||||||
|
|
||||||
@GetMapping("delete")
|
@GetMapping("delete")
|
||||||
@ApiOperation("删除物料")
|
@ApiOperation("删除物料")
|
||||||
|
@LogRecord(success = "Ebom-删除物料,物料编码:{{#bom.materialNo}}-版本:{{#bom.currentVersion}},操作结果:{{#_ret}}", bizNo = "{{#bomRowId}}",type = "Ebom-删除物料")
|
||||||
public ResultVO<Boolean> deleteBom(@RequestParam("bomRowId") Long bomRowId ) throws ExecutionException, InterruptedException{
|
public ResultVO<Boolean> deleteBom(@RequestParam("bomRowId") Long bomRowId ) throws ExecutionException, InterruptedException{
|
||||||
bomNewEbomParentService.deleteBom(bomRowId);
|
bomNewEbomParentService.deleteBom(bomRowId);
|
||||||
|
|
||||||
|
|
@ -347,6 +358,7 @@ public class EbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("submit")
|
@PostMapping("submit")
|
||||||
@ApiOperation("提交")
|
@ApiOperation("提交")
|
||||||
|
@LogRecord(success = "Ebom-提交,物料编码:{{#dto.parent.materialNo}}-版本:{{#dto.parent.currentVersion}},操作结果:{{#_ret}}", bizNo = "{{#dto.parent.rowId}}",type = "Ebom-提交")
|
||||||
public ResultVO<Boolean> submit(@RequestBody BomNewEBomParentEditDTO dto) throws ExecutionException, InterruptedException {
|
public ResultVO<Boolean> submit(@RequestBody BomNewEBomParentEditDTO dto) throws ExecutionException, InterruptedException {
|
||||||
return ResultVO.success(bomNewEbomParentService.submit(dto));
|
return ResultVO.success(bomNewEbomParentService.submit(dto));
|
||||||
}
|
}
|
||||||
|
|
@ -354,6 +366,7 @@ public class EbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("intiException")
|
@PostMapping("intiException")
|
||||||
@ApiOperation("初始化错误类型")
|
@ApiOperation("初始化错误类型")
|
||||||
|
@LogRecord(success = "Ebom-初始化错误类型,操作结果:{{#_ret}}", bizNo = "{{#bomRowIds.toString()}}",type = "Ebom-提交")
|
||||||
public ResultVO<Boolean> intiException(@RequestBody List<Long> bomRowIds) throws ExecutionException, InterruptedException {
|
public ResultVO<Boolean> intiException(@RequestBody List<Long> bomRowIds) throws ExecutionException, InterruptedException {
|
||||||
|
|
||||||
bomNewEbomParentService.batchCheckAndSaveEBomException(bomRowIds );
|
bomNewEbomParentService.batchCheckAndSaveEBomException(bomRowIds );
|
||||||
|
|
@ -371,13 +384,12 @@ public class EbomApi extends BaseApi {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
@LogRecord(success = "luo下了一个订单,购买商品「{{#name.toString()}}}」,测试变量「dsfsdf」,下单结果:{{#_ret}}",
|
@LogRecord(success = "luo下了一个订单,购买商品「{{#bom.currentVersion}}}」,测试变量「dsfsdf」,下单结果:{{#_ret}}",
|
||||||
bizNo = "sfsfsa" ,type = "dsfdsf")
|
bizNo = "sfsfsa" ,type = "dsfdsf")
|
||||||
@PostMapping("log")
|
@PostMapping("log")
|
||||||
@ApiOperation("测试日志")
|
@ApiOperation("测试日志")
|
||||||
public boolean createOrder() {
|
public boolean createOrder() {
|
||||||
LogRecordContext.putVariable("name","罗里面");
|
bomNewEbomParentService.createOrder();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.mzt.logapi.starter.annotation.LogRecord;
|
||||||
import com.nflg.product.base.core.api.BaseApi;
|
import com.nflg.product.base.core.api.BaseApi;
|
||||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.bomnew.constant.FactoryCodeEnum;
|
import com.nflg.product.bomnew.constant.FactoryCodeEnum;
|
||||||
|
|
@ -135,6 +136,9 @@ public class MBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("superSaterialStatus")
|
@PostMapping("superSaterialStatus")
|
||||||
@ApiOperation("设置超级物料")
|
@ApiOperation("设置超级物料")
|
||||||
|
@LogRecord(success = "Mbom-设置超级物料,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#dto.toString()}}",
|
||||||
|
bizNo = "{{#dto.rowId}}" ,type = "Mbom-设置超级物料")
|
||||||
public ResultVO<Boolean> superSaterialStatus(
|
public ResultVO<Boolean> superSaterialStatus(
|
||||||
@RequestBody BomNewMbomSuperStatusDTO dto) {
|
@RequestBody BomNewMbomSuperStatusDTO dto) {
|
||||||
if (Objects.isNull(dto.getRowId() )) {
|
if (Objects.isNull(dto.getRowId() )) {
|
||||||
|
|
@ -160,6 +164,9 @@ public class MBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("applyBack")
|
@PostMapping("applyBack")
|
||||||
@ApiOperation("申请退回")
|
@ApiOperation("申请退回")
|
||||||
|
@LogRecord(success = "Mbom-申请退回,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#dto.toString()}}",
|
||||||
|
bizNo = "" ,type = "Mbom-申请退回")
|
||||||
public ResultVO<Boolean> applyBack(@RequestBody BomNewMbomApplyBackMaterialDTO dto){
|
public ResultVO<Boolean> applyBack(@RequestBody BomNewMbomApplyBackMaterialDTO dto){
|
||||||
VUtils.isTure(CollectionUtil.isEmpty(dto.getRowIds())).throwMessage("选择行数据操作");
|
VUtils.isTure(CollectionUtil.isEmpty(dto.getRowIds())).throwMessage("选择行数据操作");
|
||||||
bomNewMbomBackMaterialService.applyBack(dto);
|
bomNewMbomBackMaterialService.applyBack(dto);
|
||||||
|
|
@ -168,6 +175,9 @@ public class MBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("rejectBack")
|
@PostMapping("rejectBack")
|
||||||
@ApiOperation("申请驳回")
|
@ApiOperation("申请驳回")
|
||||||
|
@LogRecord(success = "Mbom-申请驳回,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#rowIds.toString()}}",
|
||||||
|
bizNo = "{{#rowIds.toString()}}" ,type = "Mbom-申请驳回")
|
||||||
public ResultVO<Boolean> rejectBack(@RequestBody List<Long> rowIds){
|
public ResultVO<Boolean> rejectBack(@RequestBody List<Long> rowIds){
|
||||||
|
|
||||||
VUtils.isTure(CollectionUtil.isEmpty(rowIds)).throwMessage("选择行数据操作");
|
VUtils.isTure(CollectionUtil.isEmpty(rowIds)).throwMessage("选择行数据操作");
|
||||||
|
|
@ -177,6 +187,9 @@ public class MBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("deleteBack")
|
@PostMapping("deleteBack")
|
||||||
@ApiOperation("删除申请")
|
@ApiOperation("删除申请")
|
||||||
|
@LogRecord(success = "Mbom-删除申请,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#rowIds.toString()}}",
|
||||||
|
bizNo = "{{#rowIds.toString()}}" ,type = "Mbom-删除申请")
|
||||||
public ResultVO<Boolean> deleteBack(@RequestBody List<Long> rowIds){
|
public ResultVO<Boolean> deleteBack(@RequestBody List<Long> rowIds){
|
||||||
|
|
||||||
VUtils.isTure(CollectionUtil.isEmpty(rowIds)).throwMessage("选择行数据操作");
|
VUtils.isTure(CollectionUtil.isEmpty(rowIds)).throwMessage("选择行数据操作");
|
||||||
|
|
@ -189,6 +202,10 @@ public class MBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("confirmBack")
|
@PostMapping("confirmBack")
|
||||||
@ApiOperation("确认退回")
|
@ApiOperation("确认退回")
|
||||||
|
@LogRecord(success = "Mbom-确认退回,操作结果:{{#_ret}}",
|
||||||
|
|
||||||
|
extra = "{{#rowIds.toString()}}",
|
||||||
|
bizNo = "{{#rowIds.toString()}}" ,type = "Mbom-确认退回")
|
||||||
public ResultVO<Boolean> confirmBack(@RequestBody List<Long> rowIds){
|
public ResultVO<Boolean> confirmBack(@RequestBody List<Long> rowIds){
|
||||||
|
|
||||||
VUtils.isTure(CollectionUtil.isEmpty(rowIds)).throwMessage("选择行数据操作");
|
VUtils.isTure(CollectionUtil.isEmpty(rowIds)).throwMessage("选择行数据操作");
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.mzt.logapi.starter.annotation.LogRecord;
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.bomnew.constant.OptionalBomConstant;
|
import com.nflg.product.bomnew.constant.OptionalBomConstant;
|
||||||
|
|
@ -88,6 +89,9 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("updateDevice")
|
@PostMapping("updateDevice")
|
||||||
@ApiOperation("编辑机型")
|
@ApiOperation("编辑机型")
|
||||||
|
@LogRecord(success = "移动破-编辑机型,设备编号{{#dto.deviceNo}},操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#dto.toString()}}",
|
||||||
|
bizNo = "{{#dto.rowId}}" ,type = "移动破-编辑机型")
|
||||||
public ResultVO<Boolean> updateDevice(@RequestBody OptionalEbomMainDTO dto) {
|
public ResultVO<Boolean> updateDevice(@RequestBody OptionalEbomMainDTO dto) {
|
||||||
|
|
||||||
if(dto.getRowId()==null ){
|
if(dto.getRowId()==null ){
|
||||||
|
|
@ -125,6 +129,10 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
@PutMapping("updateStatus")
|
@PutMapping("updateStatus")
|
||||||
@ApiOperation("更改设备状态")
|
@ApiOperation("更改设备状态")
|
||||||
|
@LogRecord(success = "移动破-更改设备状态,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#input.toString()}}",
|
||||||
|
bizNo = "{{#input.rowId}}" ,type = "移动破-更改设备状态")
|
||||||
|
|
||||||
//@ApiParam("机型id") @RequestParam("rowId") Long rowId, @ApiParam("状态(0 为隐藏 1显示)") @RequestParam("status") Integer status
|
//@ApiParam("机型id") @RequestParam("rowId") Long rowId, @ApiParam("状态(0 为隐藏 1显示)") @RequestParam("status") Integer status
|
||||||
public ResultVO<Boolean> updateStatus(@RequestBody OptionalEbomUpdateDTO input ) {
|
public ResultVO<Boolean> updateStatus(@RequestBody OptionalEbomUpdateDTO input ) {
|
||||||
if(input.getRowId()==null || input.getStatus() ==null){
|
if(input.getRowId()==null || input.getStatus() ==null){
|
||||||
|
|
@ -145,6 +153,8 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
@DeleteMapping("deleteDevice")
|
@DeleteMapping("deleteDevice")
|
||||||
@ApiOperation("删除设备")
|
@ApiOperation("删除设备")
|
||||||
|
@LogRecord(success = "移动破-删除设备,操作结果:{{#_ret}}",
|
||||||
|
bizNo = "{{#rowIds}}" ,type = "移动破-删除设备")
|
||||||
public ResultVO<Boolean> deleteDevice(@RequestBody List<Long> rowIds) {
|
public ResultVO<Boolean> deleteDevice(@RequestBody List<Long> rowIds) {
|
||||||
if ( CollectionUtil.isEmpty(rowIds)) {
|
if ( CollectionUtil.isEmpty(rowIds)) {
|
||||||
return ResultVO.error(STATE.ParamErr, "选择待删除数据");
|
return ResultVO.error(STATE.ParamErr, "选择待删除数据");
|
||||||
|
|
@ -170,6 +180,11 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
@PutMapping("updateOptionRemark")
|
@PutMapping("updateOptionRemark")
|
||||||
@ApiOperation("更改选项备注")
|
@ApiOperation("更改选项备注")
|
||||||
|
|
||||||
|
@LogRecord(success = "移动破-更改选项备注,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#input.toString()}}",
|
||||||
|
bizNo = "{{#input.rowId}}" ,type = "移动破-更改选项备注")
|
||||||
|
|
||||||
public ResultVO<Boolean> updateOptionRemark(@RequestBody OptionalEbomSubmitEditDTO.OptionalEbomImportChildSubmitDTO input) {
|
public ResultVO<Boolean> updateOptionRemark(@RequestBody OptionalEbomSubmitEditDTO.OptionalEbomImportChildSubmitDTO input) {
|
||||||
if(input.getRowId()==null ){
|
if(input.getRowId()==null ){
|
||||||
return ResultVO.error(STATE.ParamErr, "操作数据为空");
|
return ResultVO.error(STATE.ParamErr, "操作数据为空");
|
||||||
|
|
@ -182,6 +197,9 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
@PutMapping("updateOptionStatus")
|
@PutMapping("updateOptionStatus")
|
||||||
@ApiOperation("更改选项状态")
|
@ApiOperation("更改选项状态")
|
||||||
|
@LogRecord(success = "移动破-更改选项状态,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#input.toString()}}",
|
||||||
|
bizNo = "{{#input.rowId}}" ,type = "移动破-更改选项状态")
|
||||||
public ResultVO<Boolean> updateOptionStatus(@RequestBody OptionalEbomUpdateDTO input) {
|
public ResultVO<Boolean> updateOptionStatus(@RequestBody OptionalEbomUpdateDTO input) {
|
||||||
if(input.getRowId()==null || input.getStatus() ==null){
|
if(input.getRowId()==null || input.getStatus() ==null){
|
||||||
return ResultVO.error(STATE.ParamErr, "操作数据为空");
|
return ResultVO.error(STATE.ParamErr, "操作数据为空");
|
||||||
|
|
@ -200,7 +218,10 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("deleteOption")
|
@DeleteMapping("deleteOption")
|
||||||
@ApiOperation("删除选配数据")
|
@ApiOperation("删除选项数据")
|
||||||
|
@LogRecord(success = "移动破-删除选项数据,操作结果:{{#_ret}}",
|
||||||
|
|
||||||
|
bizNo = "{{#rowIds}}" ,type = "移动破-删除选项数据")
|
||||||
public ResultVO<Boolean> deleteOption(@RequestBody List<Long> rowIds) {
|
public ResultVO<Boolean> deleteOption(@RequestBody List<Long> rowIds) {
|
||||||
|
|
||||||
if ( CollectionUtil.isEmpty(rowIds)) {
|
if ( CollectionUtil.isEmpty(rowIds)) {
|
||||||
|
|
@ -216,6 +237,9 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("optionAdd")
|
@PostMapping("optionAdd")
|
||||||
@ApiOperation("添加选项数据")
|
@ApiOperation("添加选项数据")
|
||||||
|
@LogRecord(success = "移动破-添加选项数据,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#bom.toString()}}",
|
||||||
|
bizNo = "" ,type = "移动破-添加选项数据")
|
||||||
public ResultVO<Boolean> optionAdd(@RequestBody OptionalEbomImportChildAddDTO dto) {
|
public ResultVO<Boolean> optionAdd(@RequestBody OptionalEbomImportChildAddDTO dto) {
|
||||||
if (dto == null) {
|
if (dto == null) {
|
||||||
return ResultVO.error("添加数据空");
|
return ResultVO.error("添加数据空");
|
||||||
|
|
@ -257,7 +281,7 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("ebomEditTree")
|
@PostMapping("ebomEditTree")
|
||||||
@ApiOperation("编辑机型下选配")
|
@ApiOperation("获取机型下选项")
|
||||||
public ResultVO<OptionalEbomConfigAggregVO> ebomEditTree(@RequestBody OptionalEbomImportChildQuery query) {
|
public ResultVO<OptionalEbomConfigAggregVO> ebomEditTree(@RequestBody OptionalEbomImportChildQuery query) {
|
||||||
|
|
||||||
if(query.getRootRowId()==null ){
|
if(query.getRootRowId()==null ){
|
||||||
|
|
@ -270,7 +294,10 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
|
|
||||||
@PutMapping("submitEditTree")
|
@PutMapping("submitEditTree")
|
||||||
@ApiOperation("提交设置标配")
|
@ApiOperation("编辑机型下选项")
|
||||||
|
@LogRecord(success = "移动破-编辑机型下选项,机型id-{{#dto.deviceInfo.rowId}} ,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#dto.toString()}}",
|
||||||
|
bizNo = "{{#dto.deviceInfo.rowId}}" ,type = "移动破-编辑机型下选项")
|
||||||
public ResultVO<Boolean> submitEditTree(@RequestBody OptionalEbomSubmitEditDTO dto) {
|
public ResultVO<Boolean> submitEditTree(@RequestBody OptionalEbomSubmitEditDTO dto) {
|
||||||
return ResultVO.success(aggregOptionConfigService.submitEbomEditTree(dto));
|
return ResultVO.success(aggregOptionConfigService.submitEbomEditTree(dto));
|
||||||
}
|
}
|
||||||
|
|
@ -288,6 +315,9 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
@DeleteMapping("deleteTmp")
|
@DeleteMapping("deleteTmp")
|
||||||
@ApiOperation("删除暂存")
|
@ApiOperation("删除暂存")
|
||||||
|
@LogRecord(success = "移动破-删除暂存,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#rowIds.toString()}}",
|
||||||
|
bizNo = "{{#rowIds.toString()}}" ,type = "移动破-删除暂存")
|
||||||
public ResultVO<Boolean> deleteTmp(@RequestBody List<Long> rowIds) {
|
public ResultVO<Boolean> deleteTmp(@RequestBody List<Long> rowIds) {
|
||||||
|
|
||||||
if(CollectionUtil.isEmpty(rowIds)){
|
if(CollectionUtil.isEmpty(rowIds)){
|
||||||
|
|
@ -308,7 +338,11 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping ("submitTmpOptionTree")
|
@PostMapping ("submitTmpOptionTree")
|
||||||
@ApiOperation("变更暂存数据")
|
@ApiOperation("移动破-变更暂存数据")
|
||||||
|
@LogRecord(success = "移动破-变更暂存数据,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#dto.toString()}}",
|
||||||
|
bizNo = "{{#dto.rowId}}" ,type = "移动破-变更暂存数据")
|
||||||
|
|
||||||
public ResultVO<Boolean> submitTmpOptionTree(@RequestBody OptionalEbomConfigDTO dto) {
|
public ResultVO<Boolean> submitTmpOptionTree(@RequestBody OptionalEbomConfigDTO dto) {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -320,7 +354,10 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
|
|
||||||
@PostMapping ("createTmpOptionTree")
|
@PostMapping ("createTmpOptionTree")
|
||||||
@ApiOperation("提交暂存数据,rowId设备id")
|
@ApiOperation("移动破-提交暂存数据,rowId设备id")
|
||||||
|
@LogRecord(success = "生成暂存数据,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#dto.toString()}}",
|
||||||
|
bizNo = "{{#bom.rowId}}" ,type = "移动破-生成暂存数据")
|
||||||
public ResultVO<OptionalEbomConfigVO> createTmpOptionTree(@RequestBody OptionalEbomConfigDTO dto) {
|
public ResultVO<OptionalEbomConfigVO> createTmpOptionTree(@RequestBody OptionalEbomConfigDTO dto) {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -362,6 +399,9 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
*/
|
*/
|
||||||
@PostMapping("publish")
|
@PostMapping("publish")
|
||||||
@ApiOperation("发布生成")
|
@ApiOperation("发布生成")
|
||||||
|
@LogRecord(success = "移动破-发布生成,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#dto.toString()}}",
|
||||||
|
bizNo = "{{#dto.rowId}}" ,type = "移动破-发布生成")
|
||||||
public ResultVO<String> publish(@RequestBody OptionalEbomPublishAddDTO dto) {
|
public ResultVO<String> publish(@RequestBody OptionalEbomPublishAddDTO dto) {
|
||||||
|
|
||||||
if(Objects.isNull(dto.getRowId())){
|
if(Objects.isNull(dto.getRowId())){
|
||||||
|
|
@ -382,6 +422,8 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
@GetMapping("exportPreview")
|
@GetMapping("exportPreview")
|
||||||
@ApiOperation("预览导出")
|
@ApiOperation("预览导出")
|
||||||
|
@LogRecord(success = "移动破-预览导出,操作结果:{{#_ret}}", bizNo = "",
|
||||||
|
extra = "{{#rowId}}" ,type = "移动破-预览导出")
|
||||||
public void exportPreview(HttpServletResponse response,@ApiParam("暂存id") @RequestParam("rowId") Long rowId) throws Exception {
|
public void exportPreview(HttpServletResponse response,@ApiParam("暂存id") @RequestParam("rowId") Long rowId) throws Exception {
|
||||||
OptionalEbomConfigTmpAggregVO voObj= aggregOptionConfigService.publishPreviewTree(rowId);
|
OptionalEbomConfigTmpAggregVO voObj= aggregOptionConfigService.publishPreviewTree(rowId);
|
||||||
String fileName= StrUtil.format("{}预览导出{}",voObj.getDeviceInfo().getDeviceName(),System.currentTimeMillis());
|
String fileName= StrUtil.format("{}预览导出{}",voObj.getDeviceInfo().getDeviceName(),System.currentTimeMillis());
|
||||||
|
|
@ -395,6 +437,8 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
@GetMapping("exportProducePreview")
|
@GetMapping("exportProducePreview")
|
||||||
@ApiOperation("生产预览导出")
|
@ApiOperation("生产预览导出")
|
||||||
|
@LogRecord(success = "移动破-生产预览导出,操作结果:{{#_ret}}", bizNo = "",
|
||||||
|
extra = "{{#rowId}}" ,type = "移动破-生产预览导出")
|
||||||
public void exportProducePreview(HttpServletResponse response,@ApiParam("暂存id") @RequestParam("rowId") Long rowId) throws Exception {
|
public void exportProducePreview(HttpServletResponse response,@ApiParam("暂存id") @RequestParam("rowId") Long rowId) throws Exception {
|
||||||
OptionalEbomConfigTmpAggregVO voObj= aggregOptionConfigService.publishPreviewTree(rowId);
|
OptionalEbomConfigTmpAggregVO voObj= aggregOptionConfigService.publishPreviewTree(rowId);
|
||||||
String fileName= StrUtil.format("{}生产预览导出{}",voObj.getDeviceInfo().getDeviceName(),System.currentTimeMillis());
|
String fileName= StrUtil.format("{}生产预览导出{}",voObj.getDeviceInfo().getDeviceName(),System.currentTimeMillis());
|
||||||
|
|
@ -407,6 +451,8 @@ public class OptionalEbomApi extends BaseApi {
|
||||||
|
|
||||||
@GetMapping("exportDeviceMaterial")
|
@GetMapping("exportDeviceMaterial")
|
||||||
@ApiOperation("设备物料导出")
|
@ApiOperation("设备物料导出")
|
||||||
|
@LogRecord(success = "移动破-设备物料导出,操作结果:{{#_ret}}", bizNo = "",
|
||||||
|
extra = "{{#rowId}}" ,type = "移动破-设备物料导出")
|
||||||
public void exportDeviceMaterial(HttpServletResponse response,@ApiParam("设备id") @RequestParam("rowId") Long rowId) throws Exception {
|
public void exportDeviceMaterial(HttpServletResponse response,@ApiParam("设备id") @RequestParam("rowId") Long rowId) throws Exception {
|
||||||
OptionalEbomImportChildQuery query=new OptionalEbomImportChildQuery();
|
OptionalEbomImportChildQuery query=new OptionalEbomImportChildQuery();
|
||||||
query.setRootRowId(rowId);
|
query.setRootRowId(rowId);
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.crypto.digest.MD5;
|
import cn.hutool.crypto.digest.MD5;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.mzt.logapi.starter.annotation.LogRecord;
|
||||||
import com.nflg.product.base.core.api.BaseApi;
|
import com.nflg.product.base.core.api.BaseApi;
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
|
|
@ -106,6 +107,10 @@ public class OptionalMbomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("delete")
|
@PostMapping("delete")
|
||||||
@ApiOperation("删除物料")
|
@ApiOperation("删除物料")
|
||||||
|
|
||||||
|
@LogRecord(success = "移动破-删除物料,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#rowIds.toString()}}",
|
||||||
|
bizNo = "{{#rowIds.toString()}}" ,type = "移动破-删除物料")
|
||||||
public ResultVO<Boolean > deleteMaterial(@RequestBody List<Long> rowIds ) {
|
public ResultVO<Boolean > deleteMaterial(@RequestBody List<Long> rowIds ) {
|
||||||
|
|
||||||
if(CollectionUtil.isEmpty(rowIds)){
|
if(CollectionUtil.isEmpty(rowIds)){
|
||||||
|
|
@ -119,6 +124,10 @@ public class OptionalMbomApi extends BaseApi {
|
||||||
}
|
}
|
||||||
@PostMapping("add")
|
@PostMapping("add")
|
||||||
@ApiOperation("添加物料")
|
@ApiOperation("添加物料")
|
||||||
|
@LogRecord(success = "移动破-添加物料,操作结果:{{#_ret}}",
|
||||||
|
extra = "{{#bom.toString()}}",
|
||||||
|
bizNo = "" ,type = "移动破-添加物料")
|
||||||
|
|
||||||
public ResultVO<Boolean > addMaterial(@RequestBody OptionalMbomMaterialAddDTO dto ) {
|
public ResultVO<Boolean > addMaterial(@RequestBody OptionalMbomMaterialAddDTO dto ) {
|
||||||
if(Objects.isNull(dto.getRowId())){
|
if(Objects.isNull(dto.getRowId())){
|
||||||
throw new NflgBusinessException(STATE.Error, "rowId不能为空" );
|
throw new NflgBusinessException(STATE.Error, "rowId不能为空" );
|
||||||
|
|
@ -150,6 +159,8 @@ public class OptionalMbomApi extends BaseApi {
|
||||||
|
|
||||||
@GetMapping("importSap")
|
@GetMapping("importSap")
|
||||||
@ApiOperation("导入sap")
|
@ApiOperation("导入sap")
|
||||||
|
@LogRecord(success = "移动破-导入sap,操作结果:{{#_ret}}", bizNo = "",
|
||||||
|
extra = "{{#rowId}}" ,type = "移动破-导入sap")
|
||||||
public ResultVO<Boolean > importSap(@ApiParam("行Id") @RequestParam("rowId") Long rowId) {
|
public ResultVO<Boolean > importSap(@ApiParam("行Id") @RequestParam("rowId") Long rowId) {
|
||||||
|
|
||||||
if(Objects.isNull(rowId)){
|
if(Objects.isNull(rowId)){
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package com.nflg.product.bomnew.api.user;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.mzt.logapi.context.LogRecordContext;
|
||||||
|
import com.mzt.logapi.starter.annotation.LogRecord;
|
||||||
import com.nflg.product.base.core.api.BaseApi;
|
import com.nflg.product.base.core.api.BaseApi;
|
||||||
import com.nflg.product.bomnew.constant.EBomConstant;
|
import com.nflg.product.bomnew.constant.EBomConstant;
|
||||||
import com.nflg.product.bomnew.constant.PBomEditStatusEnum;
|
import com.nflg.product.bomnew.constant.PBomEditStatusEnum;
|
||||||
|
|
@ -31,6 +33,7 @@ import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -78,12 +81,14 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("exportWorkDetailsListByPage")
|
@PostMapping("exportWorkDetailsListByPage")
|
||||||
@ApiOperation("导出工作列表--导出")
|
@ApiOperation("导出工作列表--导出")
|
||||||
|
@LogRecord(success = "PBom-导出工作列表,操作结果:{{#_ret}}", bizNo = "",type = "PBom-导出工作列表")
|
||||||
public void exportWorkDownLoad(@RequestBody BomNewPbomParentQuery query ,HttpServletResponse response) throws IOException {
|
public void exportWorkDownLoad(@RequestBody BomNewPbomParentQuery query ,HttpServletResponse response) throws IOException {
|
||||||
bomNewPbomParentService.workDetailsExcel(query,response);
|
bomNewPbomParentService.workDetailsExcel(query,response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("releaseListDownLoad")
|
@PostMapping("releaseListDownLoad")
|
||||||
@ApiOperation("PBom已发布工作列表--导出")
|
@ApiOperation("PBom已发布工作列表--导出")
|
||||||
|
@LogRecord(success = "PBom-导出已发布工作列表,操作结果:{{#_ret}}", bizNo = "",type = "PBom-已发布工作列表")
|
||||||
public void releaseListDownLoad(@RequestBody BomNewPbomParentQuery query ,HttpServletResponse response) throws IOException {
|
public void releaseListDownLoad(@RequestBody BomNewPbomParentQuery query ,HttpServletResponse response) throws IOException {
|
||||||
bomNewPbomParentService.releaseListExcel(query,response);
|
bomNewPbomParentService.releaseListExcel(query,response);
|
||||||
}
|
}
|
||||||
|
|
@ -96,6 +101,7 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("editStaging")
|
@PostMapping("editStaging")
|
||||||
@ApiOperation("编辑-暂存")
|
@ApiOperation("编辑-暂存")
|
||||||
|
@LogRecord(success = "PBom-编辑-暂存,物料编码:{{#bom.materialNo}}-版本:{{#bom.currentVersion}},操作结果:{{#_ret}}", bizNo = "{{#param.bomRowId}}",type = "PBom-编辑-暂存")
|
||||||
public ResultVO<Boolean> editStaging(@Valid @RequestBody EditPBomParamDTO param){
|
public ResultVO<Boolean> editStaging(@Valid @RequestBody EditPBomParamDTO param){
|
||||||
bomNewPbomParentService.editSave(param,PBomEditStatusEnum.HANDLER_TEMP);
|
bomNewPbomParentService.editSave(param,PBomEditStatusEnum.HANDLER_TEMP);
|
||||||
return ResultVO.success(true);
|
return ResultVO.success(true);
|
||||||
|
|
@ -103,6 +109,7 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("editSubmit")
|
@PostMapping("editSubmit")
|
||||||
@ApiOperation("编辑-提交")
|
@ApiOperation("编辑-提交")
|
||||||
|
@LogRecord(success = "PBom-编辑-提交,物料编码:{{#bom.materialNo}}-版本:{{#bom.currentVersion}},操作结果:{{#_ret}}", bizNo = "{{#param.bomRowId}}",type = "PBom-编辑-提交")
|
||||||
public ResultVO<Boolean> editSubmit(@Valid @RequestBody EditPBomParamDTO param){
|
public ResultVO<Boolean> editSubmit(@Valid @RequestBody EditPBomParamDTO param){
|
||||||
//检查物料编码是否存在
|
//检查物料编码是否存在
|
||||||
bomNewPbomParentService.checkMaterialNo(param.getChildList());
|
bomNewPbomParentService.checkMaterialNo(param.getChildList());
|
||||||
|
|
@ -115,6 +122,7 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("editDel")
|
@PostMapping("editDel")
|
||||||
@ApiOperation("编辑-删除")
|
@ApiOperation("编辑-删除")
|
||||||
|
@LogRecord(success = "PBom-编辑-删除,物料编码:{{#bom.materialNo}}-版本:{{#bom.currentVersion}},操作结果:{{#_ret}}", bizNo = "{{#param.bomRowId}}",type = "PBom-编辑-删除")
|
||||||
public ResultVO<Boolean> editDel(@Valid @RequestBody EditPBomDelDTO param){
|
public ResultVO<Boolean> editDel(@Valid @RequestBody EditPBomDelDTO param){
|
||||||
VUtils.isTure(CollUtil.isEmpty(param.getRowIdList())).throwMessage("请选择要删除的数据行");
|
VUtils.isTure(CollUtil.isEmpty(param.getRowIdList())).throwMessage("请选择要删除的数据行");
|
||||||
bomNewPbomParentService.editDel(param);
|
bomNewPbomParentService.editDel(param);
|
||||||
|
|
@ -123,6 +131,7 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("setVirtualPart")
|
@PostMapping("setVirtualPart")
|
||||||
@ApiOperation("编辑-设置虚拟件")
|
@ApiOperation("编辑-设置虚拟件")
|
||||||
|
@LogRecord(success = "PBom-编辑-设置虚拟件,操作结果:{{#_ret}}", bizNo = "{{#rowIdList.toString()}}",type = "PBom-编辑-设置虚拟件")
|
||||||
public ResultVO<Boolean> setVirtualPart(@RequestBody List<Long> rowIdList){
|
public ResultVO<Boolean> setVirtualPart(@RequestBody List<Long> rowIdList){
|
||||||
VUtils.isTure(CollUtil.isEmpty(rowIdList)).throwMessage("请选择要设置虚拟件的行");
|
VUtils.isTure(CollUtil.isEmpty(rowIdList)).throwMessage("请选择要设置虚拟件的行");
|
||||||
|
|
||||||
|
|
@ -160,6 +169,7 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("createTechnologyPackage")
|
@PostMapping("createTechnologyPackage")
|
||||||
@ApiOperation("编辑-创建虚拟包")
|
@ApiOperation("编辑-创建虚拟包")
|
||||||
|
@LogRecord(success = "PBom-编辑-创建虚拟包,物料编码:{{#packageParam.materialName}},图号:{{#packageParam.drawingNo}},操作结果:{{#_ret}}", bizNo = "{{#packageParam.bomRowId}}",type = "PBom-编辑-创建虚拟包")
|
||||||
public ResultVO<BaseMaterialVO> createTechnologyPackage(@Valid @RequestBody TechnologyPackageParam packageParam) throws IOException {
|
public ResultVO<BaseMaterialVO> createTechnologyPackage(@Valid @RequestBody TechnologyPackageParam packageParam) throws IOException {
|
||||||
|
|
||||||
return ResultVO.success( bomNewPbomParentService.createTechnologyPackage(packageParam));
|
return ResultVO.success( bomNewPbomParentService.createTechnologyPackage(packageParam));
|
||||||
|
|
@ -195,6 +205,7 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("saveAllocationFactory")
|
@PostMapping("saveAllocationFactory")
|
||||||
@ApiOperation("分工厂-保存")
|
@ApiOperation("分工厂-保存")
|
||||||
|
@LogRecord(success = "PBom-分工厂-保存。操作结果:{{#_ret}}", bizNo = "",type = "PBom-分工厂-保存")
|
||||||
public ResultVO<Boolean> saveAllocationFactory(@Valid @RequestBody List<SaveAllocationFactoryDTO> params){
|
public ResultVO<Boolean> saveAllocationFactory(@Valid @RequestBody List<SaveAllocationFactoryDTO> params){
|
||||||
|
|
||||||
return ResultVO.success(bomNewPbomParentService.saveAllocationFactory(params));
|
return ResultVO.success(bomNewPbomParentService.saveAllocationFactory(params));
|
||||||
|
|
@ -202,15 +213,20 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("allocationFactoryForRel")
|
@PostMapping("allocationFactoryForRel")
|
||||||
@ApiOperation("分工厂-规则匹配")
|
@ApiOperation("分工厂-规则匹配")
|
||||||
|
@LogRecord(success = "PBom-分工厂-规则匹配,物料编码:{{#bom.materialNo}}-版本:{{#bom.currentVersion}}-规则编码:{{#params.ruleGroupCode}} 操作结果:{{#_ret}}", bizNo = "{{#params.bomRowId}}",type = "PBom-分工厂-规则匹配")
|
||||||
public ResultVO<Boolean> allocationFactoryForRel(@Valid @RequestBody AllocationFactoryForRelDTO params) throws ExecutionException, InterruptedException {
|
public ResultVO<Boolean> allocationFactoryForRel(@Valid @RequestBody AllocationFactoryForRelDTO params) throws ExecutionException, InterruptedException {
|
||||||
|
BomNewPbomParentEntity bom = bomNewPbomParentService.getBaseMapper().selectById(params.getBomRowId());
|
||||||
|
LogRecordContext.putVariable("bom",bom);
|
||||||
|
|
||||||
return ResultVO.success(bomNewPbomParentService.allocationFactoryForRel(params));
|
return ResultVO.success(bomNewPbomParentService.allocationFactoryForRel(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("convertToMBom")
|
@GetMapping("convertToMBom")
|
||||||
@ApiOperation("转MBom")
|
@ApiOperation("转MBom")
|
||||||
|
@LogRecord(success = "PBom-转MBom,物料编码:{{#bom.materialNo}}-版本:{{#bom.currentVersion}} 操作结果:{{#_ret}}", bizNo = "{{#bomRowId}}",type = "PBom-转MBom")
|
||||||
public ResultVO<Boolean> convertToMBom(@RequestParam("bomRowId") Long bomRowId) throws ExecutionException, InterruptedException {
|
public ResultVO<Boolean> convertToMBom(@RequestParam("bomRowId") Long bomRowId) throws ExecutionException, InterruptedException {
|
||||||
BomNewPbomParentEntity parent = bomNewPbomParentService.getById(bomRowId);
|
BomNewPbomParentEntity parent = bomNewPbomParentService.getById(bomRowId);
|
||||||
|
LogRecordContext.putVariable("bom",parent);
|
||||||
VUtils.isTure(!parent.getMaterialNo().startsWith("31")).throwMessage("只有31开头的物料才可以发布");
|
VUtils.isTure(!parent.getMaterialNo().startsWith("31")).throwMessage("只有31开头的物料才可以发布");
|
||||||
VUtils.isTure(parent.getStatus()< PBomStatusEnum.PUBLISH.getValue()).throwMessage("只有已发布的BOM才能生成MBom");
|
VUtils.isTure(parent.getStatus()< PBomStatusEnum.PUBLISH.getValue()).throwMessage("只有已发布的BOM才能生成MBom");
|
||||||
//
|
//
|
||||||
|
|
@ -221,6 +237,7 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@GetMapping("realesePbom")
|
@GetMapping("realesePbom")
|
||||||
@ApiOperation("发布Pbom")
|
@ApiOperation("发布Pbom")
|
||||||
|
@LogRecord(success = "发布PBom,物料编码:{{#bom.materialNo}}-版本:{{#bom.currentVersion}} 操作结果:{{#_ret}}", bizNo = "{{#bomRowId}}",type = "发布PBom")
|
||||||
public ResultVO<Boolean> realesePbom(@RequestParam("bomRowId") Long bomRowId) {
|
public ResultVO<Boolean> realesePbom(@RequestParam("bomRowId") Long bomRowId) {
|
||||||
|
|
||||||
return ResultVO.success(bomNewPbomParentService.realesePbom(bomRowId));
|
return ResultVO.success(bomNewPbomParentService.realesePbom(bomRowId));
|
||||||
|
|
@ -237,6 +254,7 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@GetMapping("upgrade")
|
@GetMapping("upgrade")
|
||||||
@ApiOperation("发起变更")
|
@ApiOperation("发起变更")
|
||||||
|
@LogRecord(success = "PBom发起变更,物料编码:{{#bom.materialNo}}-版本:{{#bom.currentVersion}} 操作结果:{{#_ret}}", bizNo = "{{#bomRowId}}",type = "发起变更")
|
||||||
public ResultVO<Boolean> upgrade(@RequestParam("bomRowId") Long bomRowId) {
|
public ResultVO<Boolean> upgrade(@RequestParam("bomRowId") Long bomRowId) {
|
||||||
try {
|
try {
|
||||||
bomNewPbomParentService.upgrade(bomRowId);
|
bomNewPbomParentService.upgrade(bomRowId);
|
||||||
|
|
|
||||||
|
|
@ -1,61 +1,80 @@
|
||||||
package com.nflg.product.bomnew.service;
|
package com.nflg.product.bomnew.service;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.lang.TypeReference;
|
import cn.hutool.core.lang.TypeReference;
|
||||||
import cn.hutool.core.thread.ThreadUtil;
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
|
||||||
import cn.hutool.core.util.NumberUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
|
||||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
|
||||||
import com.nflg.product.bomnew.constant.*;
|
|
||||||
import com.nflg.product.bomnew.mapper.master.BomNewEbomParentFormalMapper;
|
import com.nflg.product.bomnew.mapper.master.BomNewEbomParentFormalMapper;
|
||||||
import com.nflg.product.bomnew.mapper.master.BomNewEbomParentMapper;
|
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
|
||||||
import com.nflg.product.bomnew.pojo.dto.*;
|
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildFormalEntity;
|
||||||
import com.nflg.product.bomnew.pojo.entity.*;
|
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentEntity;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewEbomMaterialQuery;
|
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentFormalEntity;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewEbomParentQuery;
|
|
||||||
import com.nflg.product.bomnew.pojo.vo.*;
|
|
||||||
import com.nflg.product.bomnew.service.domain.EBom.*;
|
|
||||||
import com.nflg.product.bomnew.util.*;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import nflg.product.common.constant.STATE;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.ttzero.excel.entity.ListSheet;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import java.util.ArrayList;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import java.util.List;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
|
||||||
import java.util.concurrent.ForkJoinPool;
|
|
||||||
import java.util.concurrent.ForkJoinTask;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class BomNewEbomParentFormalService extends ServiceImpl<BomNewEbomParentFormalMapper, BomNewEbomParentFormalEntity> {
|
public class BomNewEbomParentFormalService extends ServiceImpl<BomNewEbomParentFormalMapper, BomNewEbomParentFormalEntity> {
|
||||||
|
|
||||||
|
|
||||||
|
public void copyEbomFormal(Long eBomRowId) {
|
||||||
|
|
||||||
|
|
||||||
|
List<Long> bomListId = new ArrayList<>();
|
||||||
|
bomListId.add(eBomRowId);
|
||||||
|
List<BomNewEbomParentFormalEntity> parentFormalList = new ArrayList<>();
|
||||||
|
List<BomNewEbomChildFormalEntity> childFormalList = new ArrayList<>();
|
||||||
|
|
||||||
|
while (!bomListId.isEmpty()) {
|
||||||
|
QueryWrapper<BomNewEbomParentEntity> queryWrapper1 = new QueryWrapper<>();
|
||||||
|
queryWrapper1.lambda().in(BomNewEbomParentEntity::getRowId, bomListId);
|
||||||
|
|
||||||
|
List<BomNewEbomParentEntity> parentEntityList = SpringUtil.getBean(BomNewEbomParentService.class).list(queryWrapper1);
|
||||||
|
if (CollUtil.isEmpty(parentEntityList)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
parentFormalList.addAll(Convert.convert(new TypeReference<List<BomNewEbomParentFormalEntity>>() {
|
||||||
|
}, parentEntityList));
|
||||||
|
|
||||||
|
//查询子级
|
||||||
|
QueryWrapper<BomNewEbomChildEntity> queryWrapper2 = new QueryWrapper<>();
|
||||||
|
queryWrapper2.lambda().in(BomNewEbomChildEntity::getParentRowId, bomListId);
|
||||||
|
|
||||||
|
List<BomNewEbomChildEntity> childEntityList = SpringUtil.getBean(BomNewEbomChildService.class).list(queryWrapper2);
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(childEntityList)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
childFormalList.addAll(Convert.convert(new TypeReference<List<BomNewEbomChildFormalEntity>>() {
|
||||||
|
}, childEntityList));
|
||||||
|
|
||||||
|
bomListId.clear();
|
||||||
|
|
||||||
|
List<Long> nextBomId = childEntityList.stream().filter(u -> u.getBomVersionRowId() != null && u.getBomVersionRowId() > 0).map(BomNewEbomChildEntity::getBomVersionRowId).collect(Collectors.toList());
|
||||||
|
if (CollUtil.isNotEmpty(nextBomId)) {
|
||||||
|
bomListId.addAll(nextBomId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollUtil.isNotEmpty(parentFormalList)) {
|
||||||
|
this.saveOrUpdateBatch(parentFormalList);
|
||||||
|
// System.out.println(JSON.toJSONString( parentFormalList));
|
||||||
|
}
|
||||||
|
if (CollUtil.isNotEmpty(childFormalList)) {
|
||||||
|
// System.out.println(JSON.toJSONString( childFormalList));
|
||||||
|
SpringUtil.getBean(BomNewEbomChildFormalService.class).saveOrUpdateBatch(childFormalList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -748,6 +748,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
if(CollUtil.isNotEmpty(bomChildren)) {
|
if(CollUtil.isNotEmpty(bomChildren)) {
|
||||||
ebomChildService.updateBatchById(bomChildren);
|
ebomChildService.updateBatchById(bomChildren);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpringUtil.getBean(BomNewEbomParentFormalService.class).copyEbomFormal(bomRowId);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1039,12 +1042,12 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
|
|
||||||
List<BomNewEbomParentEntity> bomNewEbomParentEntityList = this.lambdaQuery().in(BomNewEbomParentEntity::getRowId, rowIds).eq(BomNewEbomParentEntity::getRootIs, 1).list();
|
List<BomNewEbomParentEntity> bomNewEbomParentEntityList = this.lambdaQuery().in(BomNewEbomParentEntity::getRowId, rowIds).eq(BomNewEbomParentEntity::getRootIs, 1).list();
|
||||||
|
|
||||||
|
|
||||||
if (CollUtil.isEmpty(bomNewEbomParentEntityList)) {
|
if (CollUtil.isEmpty(bomNewEbomParentEntityList)) {
|
||||||
// throw new NflgBusinessException(STATE.BusinessError, "下级BOM无法进行退回");
|
// throw new NflgBusinessException(STATE.BusinessError, "下级BOM无法进行退回");
|
||||||
VUtils.isTure(true).throwMessage("下级BOM无法进行退回");
|
VUtils.isTure(true).throwMessage("下级BOM无法进行退回");
|
||||||
}
|
}
|
||||||
|
Set<String> materialNoAndVersion = bomNewEbomParentEntityList.stream().map(u -> StrUtil.join("-", u.getMaterialNo(), u.getCurrentVersion())).collect(Collectors.toSet());
|
||||||
|
LogRecordContext.putVariable("log",materialNoAndVersion);
|
||||||
|
|
||||||
if (rowIds.size() != bomNewEbomParentEntityList.size()) {
|
if (rowIds.size() != bomNewEbomParentEntityList.size()) {
|
||||||
|
|
||||||
|
|
@ -1150,6 +1153,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
// return ResultVO.error("下级BOM无法进行复核");
|
// return ResultVO.error("下级BOM无法进行复核");
|
||||||
VUtils.isTure(true).throwMessage("下级BOM无法进行复核");
|
VUtils.isTure(true).throwMessage("下级BOM无法进行复核");
|
||||||
}
|
}
|
||||||
|
Set<String> materialNoAndVersion = bomNewEbomParentEntityList.stream().map(u -> StrUtil.join("-", u.getMaterialNo(), u.getCurrentVersion())).collect(Collectors.toSet());
|
||||||
|
LogRecordContext.putVariable("log",materialNoAndVersion);
|
||||||
|
|
||||||
if (rowIds.size() != bomNewEbomParentEntityList.size()) {
|
if (rowIds.size() != bomNewEbomParentEntityList.size()) {
|
||||||
VUtils.isTure(true).throwMessage("数据中包含有下级BOM无法进行复核");
|
VUtils.isTure(true).throwMessage("数据中包含有下级BOM无法进行复核");
|
||||||
|
|
@ -1391,6 +1396,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
public Boolean deleteBom(Long bomRowId) throws ExecutionException, InterruptedException {
|
public Boolean deleteBom(Long bomRowId) throws ExecutionException, InterruptedException {
|
||||||
|
|
||||||
BomNewEbomParentEntity parentEntity = this.getBaseMapper().selectById(bomRowId);
|
BomNewEbomParentEntity parentEntity = this.getBaseMapper().selectById(bomRowId);
|
||||||
|
LogRecordContext.putVariable("bom",parentEntity);
|
||||||
|
|
||||||
VUtils.isTure(Objects.isNull(parentEntity)).throwMessage("该节点不存在,请检查参数是否正确");
|
VUtils.isTure(Objects.isNull(parentEntity)).throwMessage("该节点不存在,请检查参数是否正确");
|
||||||
|
|
||||||
|
|
@ -1733,4 +1739,12 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void createOrder(){
|
||||||
|
BomNewEbomParentEntity ent=new BomNewEbomParentEntity();
|
||||||
|
ent.setDrawingNo("testDrawingNo");
|
||||||
|
ent.setCurrentVersion("V001");
|
||||||
|
LogRecordContext.putVariable("bom",ent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,53 +3,80 @@ package com.nflg.product.bomnew.service;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.lang.TypeReference;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
|
||||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
|
||||||
import com.nflg.product.bomnew.constant.*;
|
|
||||||
import com.nflg.product.bomnew.mapper.master.BomNewPbomParentFormalMapper;
|
import com.nflg.product.bomnew.mapper.master.BomNewPbomParentFormalMapper;
|
||||||
import com.nflg.product.bomnew.mapper.master.BomNewPbomParentMapper;
|
import com.nflg.product.bomnew.pojo.entity.BomNewPbomChildEntity;
|
||||||
import com.nflg.product.bomnew.pojo.dto.*;
|
import com.nflg.product.bomnew.pojo.entity.BomNewPbomChildFormalEntity;
|
||||||
import com.nflg.product.bomnew.pojo.dto.sap.impart2.ImportSapParamDTO;
|
import com.nflg.product.bomnew.pojo.entity.BomNewPbomParentEntity;
|
||||||
import com.nflg.product.bomnew.pojo.entity.*;
|
import com.nflg.product.bomnew.pojo.entity.BomNewPbomParentFormalEntity;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewPbomParentQuery;
|
|
||||||
import com.nflg.product.bomnew.pojo.vo.*;
|
|
||||||
import com.nflg.product.bomnew.service.domain.PBom.*;
|
|
||||||
import com.nflg.product.bomnew.service.domain.Sap;
|
|
||||||
import com.nflg.product.bomnew.util.*;
|
|
||||||
import nflg.product.common.constant.STATE;
|
|
||||||
import nflg.product.common.vo.ResultVO;
|
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.ttzero.excel.entity.Workbook;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import java.util.ArrayList;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import java.util.List;
|
||||||
import java.io.IOException;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
|
||||||
import java.util.concurrent.ForkJoinPool;
|
|
||||||
import java.util.concurrent.ForkJoinTask;
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class BomNewPbomParentFormalService extends ServiceImpl<BomNewPbomParentFormalMapper , BomNewPbomParentFormalEntity> {
|
public class BomNewPbomParentFormalService extends ServiceImpl<BomNewPbomParentFormalMapper, BomNewPbomParentFormalEntity> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拷贝pbom已发布数
|
||||||
|
*/
|
||||||
|
public void copyPbomFormal(Long pBomRowId) {
|
||||||
|
|
||||||
|
List<Long> bomListId = new ArrayList<>();
|
||||||
|
bomListId.add(pBomRowId);
|
||||||
|
List<BomNewPbomParentFormalEntity> parentFormalList = new ArrayList<>();
|
||||||
|
List<BomNewPbomChildFormalEntity> childFormalList = new ArrayList<>();
|
||||||
|
|
||||||
|
while (!bomListId.isEmpty()) {
|
||||||
|
QueryWrapper<BomNewPbomParentEntity> queryWrapper1 = new QueryWrapper<>();
|
||||||
|
queryWrapper1.lambda().in(BomNewPbomParentEntity::getRowId, bomListId);
|
||||||
|
|
||||||
|
List<BomNewPbomParentEntity> parentEntityList = SpringUtil.getBean(BomNewPbomParentService.class).list(queryWrapper1);
|
||||||
|
if (CollUtil.isEmpty(parentEntityList)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
parentFormalList.addAll(Convert.convert(new TypeReference<List<BomNewPbomParentFormalEntity>>() {
|
||||||
|
}, parentEntityList));
|
||||||
|
|
||||||
|
//查询子级
|
||||||
|
QueryWrapper<BomNewPbomChildEntity> queryWrapper2 = new QueryWrapper<>();
|
||||||
|
queryWrapper2.lambda().in(BomNewPbomChildEntity::getParentRowId, bomListId);
|
||||||
|
|
||||||
|
List<BomNewPbomChildEntity> childEntityList = SpringUtil.getBean(BomNewPbomChildService.class).list(queryWrapper2);
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(childEntityList)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
childFormalList.addAll(Convert.convert(new TypeReference<List<BomNewPbomChildFormalEntity>>() {
|
||||||
|
}, childEntityList));
|
||||||
|
|
||||||
|
bomListId.clear();
|
||||||
|
|
||||||
|
List<Long> nextBomId = childEntityList.stream().filter(u -> u.getBomVersionRowId() != null && u.getBomVersionRowId() > 0).map(BomNewPbomChildEntity::getBomVersionRowId).collect(Collectors.toList());
|
||||||
|
if (CollUtil.isNotEmpty(nextBomId)) {
|
||||||
|
bomListId.addAll(nextBomId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(CollUtil.isNotEmpty(parentFormalList)){
|
||||||
|
this.saveOrUpdateBatch(parentFormalList);
|
||||||
|
// System.out.println(JSON.toJSONString( parentFormalList));
|
||||||
|
}
|
||||||
|
if(CollUtil.isNotEmpty(childFormalList)){
|
||||||
|
// System.out.println(JSON.toJSONString( childFormalList));
|
||||||
|
SpringUtil.getBean(BomNewPbomChildFormalService.class).saveOrUpdateBatch(childFormalList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
import com.mzt.logapi.context.LogRecordContext;
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.bomnew.constant.*;
|
import com.nflg.product.bomnew.constant.*;
|
||||||
|
|
@ -311,7 +312,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
public void editSave(EditPBomParamDTO paramDTO, PBomEditStatusEnum editStatus) {
|
public void editSave(EditPBomParamDTO paramDTO, PBomEditStatusEnum editStatus) {
|
||||||
BomNewPbomParentEntity parent = this.getById(paramDTO.getBomRowId());
|
BomNewPbomParentEntity parent = this.getById(paramDTO.getBomRowId());
|
||||||
VUtils.isTure(Objects.isNull(parent)).throwMessage("参数错误,该BOM不存在");
|
VUtils.isTure(Objects.isNull(parent)).throwMessage("参数错误,该BOM不存在");
|
||||||
|
LogRecordContext.putVariable("bom",parent);
|
||||||
List<BomNewPbomChildEntity> childList = Convert.toList(BomNewPbomChildEntity.class, paramDTO.getChildList());
|
List<BomNewPbomChildEntity> childList = Convert.toList(BomNewPbomChildEntity.class, paramDTO.getChildList());
|
||||||
childList.forEach(u -> {
|
childList.forEach(u -> {
|
||||||
u.setParentRowId(paramDTO.getBomRowId());
|
u.setParentRowId(paramDTO.getBomRowId());
|
||||||
|
|
@ -354,7 +355,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
BomNewPbomParentEntity parent = this.getById(paramDTO.getBomRowId());
|
BomNewPbomParentEntity parent = this.getById(paramDTO.getBomRowId());
|
||||||
VUtils.isTure(Objects.isNull(parent)).throwMessage("参数bomRowId错误,该BOM不存在");
|
VUtils.isTure(Objects.isNull(parent)).throwMessage("参数bomRowId错误,该BOM不存在");
|
||||||
BomNewPbomParentVO parentVO = Convert.convert(BomNewPbomParentVO.class, parent);
|
BomNewPbomParentVO parentVO = Convert.convert(BomNewPbomParentVO.class, parent);
|
||||||
|
LogRecordContext.putVariable("bom",parent);
|
||||||
materialMainService.intiMaterialInfo(ImmutableList.of(parentVO));
|
materialMainService.intiMaterialInfo(ImmutableList.of(parentVO));
|
||||||
|
|
||||||
List<BomNewPbomChildEntity> childList = pbomChildService.getBaseMapper().selectBatchIds(paramDTO.getRowIdList());
|
List<BomNewPbomChildEntity> childList = pbomChildService.getBaseMapper().selectBatchIds(paramDTO.getRowIdList());
|
||||||
|
|
@ -853,6 +854,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean realesePbom(Long bomRowId) {
|
public boolean realesePbom(Long bomRowId) {
|
||||||
BomNewPbomParentEntity parent = this.getById(bomRowId);
|
BomNewPbomParentEntity parent = this.getById(bomRowId);
|
||||||
|
LogRecordContext.putVariable("bom",parent);
|
||||||
try {
|
try {
|
||||||
List<BomNewPbomParentVO> allBom = getAllBom(bomRowId, 0);
|
List<BomNewPbomParentVO> allBom = getAllBom(bomRowId, 0);
|
||||||
|
|
||||||
|
|
@ -878,7 +880,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
pbomChildService.updateBatchById(pBomChildren);
|
pbomChildService.updateBatchById(pBomChildren);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpringUtil.getBean(BomNewPbomParentFormalService.class).copyPbomFormal(bomRowId);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new NflgBusinessException(STATE.BusinessError, "发布Pbom失败:" + ex.getMessage());
|
throw new NflgBusinessException(STATE.BusinessError, "发布Pbom失败:" + ex.getMessage());
|
||||||
}
|
}
|
||||||
|
|
@ -919,6 +921,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
public void upgrade(Long bomRowId) throws ExecutionException, InterruptedException {
|
public void upgrade(Long bomRowId) throws ExecutionException, InterruptedException {
|
||||||
BomNewPbomParentEntity parent = this.getById(bomRowId);
|
BomNewPbomParentEntity parent = this.getById(bomRowId);
|
||||||
VUtils.isTure(parent.getStatus() < PBomStatusEnum.PUBLISH.getValue()).throwMessage("只有已发布的BOM,才能发起变更");
|
VUtils.isTure(parent.getStatus() < PBomStatusEnum.PUBLISH.getValue()).throwMessage("只有已发布的BOM,才能发起变更");
|
||||||
|
LogRecordContext.putVariable("bom",parent);
|
||||||
PBomUpgrade upgrade = new PBomUpgrade(parent, getAllBom(bomRowId, 0));
|
PBomUpgrade upgrade = new PBomUpgrade(parent, getAllBom(bomRowId, 0));
|
||||||
upgrade.upgrade();
|
upgrade.upgrade();
|
||||||
if (CollUtil.isNotEmpty(upgrade.getParentResult())) {
|
if (CollUtil.isNotEmpty(upgrade.getParentResult())) {
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.mzt.logapi.context.LogRecordContext;
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.base.core.vo.PageVO;
|
import com.nflg.product.base.core.vo.PageVO;
|
||||||
|
|
@ -117,7 +118,7 @@ public class OptionalEbomConfigService extends ServiceImpl<OptionalEbomConfigMap
|
||||||
|
|
||||||
OptionalEbomConfigVO optionalEbomConfigVO = Convert.convert(new TypeReference<OptionalEbomConfigVO>() {
|
OptionalEbomConfigVO optionalEbomConfigVO = Convert.convert(new TypeReference<OptionalEbomConfigVO>() {
|
||||||
}, optionalEbomConfigEntity);
|
}, optionalEbomConfigEntity);
|
||||||
|
LogRecordContext.putVariable("bom",optionalEbomConfigVO);
|
||||||
return optionalEbomConfigVO;
|
return optionalEbomConfigVO;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.mzt.logapi.context.LogRecordContext;
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.bomnew.constant.OptionalBomConstant;
|
import com.nflg.product.bomnew.constant.OptionalBomConstant;
|
||||||
|
|
@ -130,6 +131,9 @@ public class OptionalEbomImportChildService extends ServiceImpl<OptionalEbomImpo
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogRecordContext.putVariable("bom",optionList);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.mzt.logapi.context.LogRecordContext;
|
||||||
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
import com.nflg.product.base.core.conmon.util.SessionUtil;
|
||||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.base.core.vo.PageVO;
|
import com.nflg.product.base.core.vo.PageVO;
|
||||||
|
|
@ -354,6 +355,9 @@ public ResultVO<Boolean> importSap(Long rowId){
|
||||||
|
|
||||||
this.saveOrUpdateBatch(entityList);
|
this.saveOrUpdateBatch(entityList);
|
||||||
|
|
||||||
|
LogRecordContext.putVariable("bom",entityList);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue