diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseAttachInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseAttachInfoController.java index b206ca4..b354940 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseAttachInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseAttachInfoController.java @@ -3,6 +3,8 @@ package com.hw.mes.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -78,6 +80,7 @@ public class MesBaseAttachInfoController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBaseAttachInfo mesBaseAttachInfo) { + mesBaseAttachInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseAttachInfoService.insertMesBaseAttachInfo(mesBaseAttachInfo)); } @@ -89,6 +92,7 @@ public class MesBaseAttachInfoController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBaseAttachInfo mesBaseAttachInfo) { + mesBaseAttachInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseAttachInfoService.updateMesBaseAttachInfo(mesBaseAttachInfo)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java index cdf84c2..fa96b2e 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java @@ -4,6 +4,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.hw.common.security.annotation.InnerAuth; +import com.hw.common.security.utils.SecurityUtils; import com.hw.mes.api.domain.MesBaseBarcodeInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -79,6 +80,7 @@ public class MesBaseBarcodeInfoController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBaseBarcodeInfo mesBaseBarcodeInfo) { + mesBaseBarcodeInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseBarcodeInfoService.insertMesBaseBarcodeInfo(mesBaseBarcodeInfo)); } @@ -90,6 +92,7 @@ public class MesBaseBarcodeInfoController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBaseBarcodeInfo mesBaseBarcodeInfo) { + mesBaseBarcodeInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseBarcodeInfoService.updateMesBaseBarcodeInfo(mesBaseBarcodeInfo)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseMaterialTypeController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseMaterialTypeController.java index ab0ea7b..73ff7cf 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseMaterialTypeController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseMaterialTypeController.java @@ -3,6 +3,8 @@ package com.hw.mes.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -76,6 +78,7 @@ public class MesBaseMaterialTypeController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBaseMaterialType mesBaseMaterialType) { + mesBaseMaterialType.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseMaterialTypeService.insertMesBaseMaterialType(mesBaseMaterialType)); } @@ -87,6 +90,7 @@ public class MesBaseMaterialTypeController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBaseMaterialType mesBaseMaterialType) { + mesBaseMaterialType.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseMaterialTypeService.updateMesBaseMaterialType(mesBaseMaterialType)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBasePalletInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBasePalletInfoController.java index 3e36f8a..856dc27 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBasePalletInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBasePalletInfoController.java @@ -3,6 +3,8 @@ package com.hw.mes.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -78,6 +80,7 @@ public class MesBasePalletInfoController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBasePalletInfo mesBasePalletInfo) { + mesBasePalletInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBasePalletInfoService.insertMesBasePalletInfo(mesBasePalletInfo)); } @@ -89,6 +92,7 @@ public class MesBasePalletInfoController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBasePalletInfo mesBasePalletInfo) { + mesBasePalletInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBasePalletInfoService.updateMesBasePalletInfo(mesBasePalletInfo)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProcessInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProcessInfoController.java index e564717..cdcd5fc 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProcessInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProcessInfoController.java @@ -3,6 +3,8 @@ package com.hw.mes.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -98,6 +100,7 @@ public class MesBaseProcessInfoController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBaseProcessInfo mesBaseProcessInfo) { + mesBaseProcessInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseProcessInfoService.insertMesBaseProcessInfo(mesBaseProcessInfo)); } @@ -109,6 +112,7 @@ public class MesBaseProcessInfoController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBaseProcessInfo mesBaseProcessInfo) { + mesBaseProcessInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseProcessInfoService.updateMesBaseProcessInfo(mesBaseProcessInfo)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProdlineInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProdlineInfoController.java index a4d479f..b75940d 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProdlineInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProdlineInfoController.java @@ -3,6 +3,8 @@ package com.hw.mes.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -88,6 +90,7 @@ public class MesBaseProdlineInfoController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBaseProdlineInfo mesBaseProdlineInfo) { + mesBaseProdlineInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseProdlineInfoService.insertMesBaseProdlineInfo(mesBaseProdlineInfo)); } @@ -99,6 +102,7 @@ public class MesBaseProdlineInfoController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBaseProdlineInfo mesBaseProdlineInfo) { + mesBaseProdlineInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseProdlineInfoService.updateMesBaseProdlineInfo(mesBaseProdlineInfo)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseRouteController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseRouteController.java index e72d00a..15542af 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseRouteController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseRouteController.java @@ -3,6 +3,8 @@ package com.hw.mes.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -88,6 +90,7 @@ public class MesBaseRouteController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBaseRoute mesBaseRoute) { + mesBaseRoute.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseRouteService.insertMesBaseRoute(mesBaseRoute)); } @@ -99,6 +102,7 @@ public class MesBaseRouteController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBaseRoute mesBaseRoute) { + mesBaseRoute.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseRouteService.updateMesBaseRoute(mesBaseRoute)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseRouteProcessController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseRouteProcessController.java index 30a3298..4e7462a 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseRouteProcessController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseRouteProcessController.java @@ -3,6 +3,8 @@ package com.hw.mes.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -78,6 +80,7 @@ public class MesBaseRouteProcessController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBaseRouteProcess mesBaseRouteProcess) { + mesBaseRouteProcess.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseRouteProcessService.insertMesBaseRouteProcess(mesBaseRouteProcess)); } @@ -89,6 +92,7 @@ public class MesBaseRouteProcessController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBaseRouteProcess mesBaseRouteProcess) { + mesBaseRouteProcess.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseRouteProcessService.updateMesBaseRouteProcess(mesBaseRouteProcess)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java index 952d66f..aafd0c4 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java @@ -2,6 +2,8 @@ package com.hw.mes.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -77,6 +79,7 @@ public class MesBaseStationInfoController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBaseStationInfo mesBaseStationInfo) { + mesBaseStationInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseStationInfoService.insertMesBaseStationInfo(mesBaseStationInfo)); } @@ -88,6 +91,7 @@ public class MesBaseStationInfoController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBaseStationInfo mesBaseStationInfo) { + mesBaseStationInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseStationInfoService.updateMesBaseStationInfo(mesBaseStationInfo)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseSupplierInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseSupplierInfoController.java index 32e759d..95f884a 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseSupplierInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseSupplierInfoController.java @@ -3,6 +3,8 @@ package com.hw.mes.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -78,6 +80,7 @@ public class MesBaseSupplierInfoController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBaseSupplierInfo mesBaseSupplierInfo) { + mesBaseSupplierInfo.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseSupplierInfoService.insertMesBaseSupplierInfo(mesBaseSupplierInfo)); } @@ -89,6 +92,7 @@ public class MesBaseSupplierInfoController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBaseSupplierInfo mesBaseSupplierInfo) { + mesBaseSupplierInfo.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBaseSupplierInfoService.updateMesBaseSupplierInfo(mesBaseSupplierInfo)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBindBarcodeController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBindBarcodeController.java index e86e482..2705a6b 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBindBarcodeController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBindBarcodeController.java @@ -3,6 +3,8 @@ package com.hw.mes.controller; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -78,6 +80,7 @@ public class MesBindBarcodeController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesBindBarcode mesBindBarcode) { + mesBindBarcode.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBindBarcodeService.insertMesBindBarcode(mesBindBarcode)); } @@ -89,6 +92,7 @@ public class MesBindBarcodeController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesBindBarcode mesBindBarcode) { + mesBindBarcode.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesBindBarcodeService.updateMesBindBarcode(mesBindBarcode)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesMaterialBomController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesMaterialBomController.java index 1418d6a..1e2b174 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesMaterialBomController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesMaterialBomController.java @@ -2,6 +2,8 @@ package com.hw.mes.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.hw.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -75,6 +77,7 @@ public class MesMaterialBomController extends BaseController @PostMapping public AjaxResult add(@RequestBody MesMaterialBom mesMaterialBom) { + mesMaterialBom.setCreateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesMaterialBomService.insertMesMaterialBom(mesMaterialBom)); } @@ -86,6 +89,7 @@ public class MesMaterialBomController extends BaseController @PutMapping public AjaxResult edit(@RequestBody MesMaterialBom mesMaterialBom) { + mesMaterialBom.setUpdateBy(SecurityUtils.getLoginUser().getUsername()); return toAjax(mesMaterialBomService.updateMesMaterialBom(mesMaterialBom)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessInfo.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessInfo.java index 905ff0d..3f33c5c 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessInfo.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessInfo.java @@ -40,9 +40,9 @@ public class MesBaseProcessInfo extends BaseEntity { private String processType; /** - * 单位生产时间 + * 标准工时(分钟) */ - @Excel(name = "单位生产时间") + @Excel(name = "标准工时(分钟)") private Long productionTime; /** diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialTypeServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialTypeServiceImpl.java index 7887d79..9145873 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialTypeServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialTypeServiceImpl.java @@ -2,12 +2,15 @@ package com.hw.mes.service.impl; import java.util.List; import com.hw.common.core.utils.DateUtils; +import com.hw.common.core.utils.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hw.mes.mapper.MesBaseMaterialTypeMapper; import com.hw.mes.domain.MesBaseMaterialType; import com.hw.mes.service.IMesBaseMaterialTypeService; +import static java.awt.SystemColor.info; + /** * 物料类型信息Service业务层处理 * @@ -54,6 +57,12 @@ public class MesBaseMaterialTypeServiceImpl implements IMesBaseMaterialTypeServi public int insertMesBaseMaterialType(MesBaseMaterialType mesBaseMaterialType) { mesBaseMaterialType.setCreateTime(DateUtils.getNowDate()); + MesBaseMaterialType info = mesBaseMaterialTypeMapper.selectMesBaseMaterialTypeByMatrialTypeId(mesBaseMaterialType.getParentId()); + if (StringUtils.isNull(info)){ + mesBaseMaterialType.setAncestors(mesBaseMaterialType.getParentId().toString()); + }else { + mesBaseMaterialType.setAncestors(info.getAncestors() + "," + mesBaseMaterialType.getParentId()); + } return mesBaseMaterialTypeMapper.insertMesBaseMaterialType(mesBaseMaterialType); } @@ -67,6 +76,12 @@ public class MesBaseMaterialTypeServiceImpl implements IMesBaseMaterialTypeServi public int updateMesBaseMaterialType(MesBaseMaterialType mesBaseMaterialType) { mesBaseMaterialType.setUpdateTime(DateUtils.getNowDate()); + MesBaseMaterialType info = mesBaseMaterialTypeMapper.selectMesBaseMaterialTypeByMatrialTypeId(mesBaseMaterialType.getParentId()); + if (StringUtils.isNull(info)){ + mesBaseMaterialType.setAncestors(mesBaseMaterialType.getParentId().toString()); + }else { + mesBaseMaterialType.setAncestors(info.getAncestors() + "," + mesBaseMaterialType.getParentId()); + } return mesBaseMaterialTypeMapper.updateMesBaseMaterialType(mesBaseMaterialType); } diff --git a/hw-ui/src/views/mes/baseFactoryInfo/index.vue b/hw-ui/src/views/mes/baseFactoryInfo/index.vue index b22a21d..ea148df 100644 --- a/hw-ui/src/views/mes/baseFactoryInfo/index.vue +++ b/hw-ui/src/views/mes/baseFactoryInfo/index.vue @@ -95,6 +95,18 @@ + + + + + + + +