diff --git a/op-common/op-common-core/src/main/java/com/op/common/core/domain/ExcelCol.java b/op-common/op-common-core/src/main/java/com/op/common/core/domain/ExcelCol.java new file mode 100644 index 00000000..b9087a38 --- /dev/null +++ b/op-common/op-common-core/src/main/java/com/op/common/core/domain/ExcelCol.java @@ -0,0 +1,49 @@ +package com.op.common.core.domain; + +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 附件对象 base_file + * + * @author Open Platform + * @date 2023-07-10 + */ +public class ExcelCol extends BaseEntity { + private static final long serialVersionUID = 1L; + private String title;//表头名称 + private String field;//内容名称(与数据库传回的参数字段对应) + private int width;//单元格宽度 + + public ExcelCol(String title, String field, int width) { + this.title = title; + this.field = field; + this.width = width; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } +} diff --git a/op-common/op-common-core/src/main/java/com/op/common/core/utils/poi/ExcelMapUtil.java b/op-common/op-common-core/src/main/java/com/op/common/core/utils/poi/ExcelMapUtil.java new file mode 100644 index 00000000..62af9527 --- /dev/null +++ b/op-common/op-common-core/src/main/java/com/op/common/core/utils/poi/ExcelMapUtil.java @@ -0,0 +1,118 @@ +package com.op.common.core.utils.poi; + +import com.alibaba.fastjson2.JSONObject; +import com.op.common.core.domain.ExcelCol; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; +import org.springframework.util.StringUtils; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; + +/** + * Excel相关处理 + * + * @author OP + */ +public class ExcelMapUtil { + //下载 + public static SXSSFWorkbook initWorkbook(String sheetName , String title , List excelCol , List data){ + SXSSFWorkbook workbook = new SXSSFWorkbook(); + int colSize = excelCol.size(); + + //创建Sheet(工作簿) + Sheet sheet = null; + if (!StringUtils.hasText(sheetName)){ + sheet = workbook.createSheet(); + }else{ + sheet = workbook.createSheet(sheetName); + } +// //创建主标题行(第一行) +// Row sheetTitleRow = sheet.createRow(0); +// Cell titleCell = sheetTitleRow.createCell(0);//创建第一行第一个单元格 +// titleCell.setCellValue(title);//传值 +// titleCell.setCellStyle(getHeaderFont(sheet.getWorkbook()));//设置样式 +// //主标题行合并单元格 +// CellRangeAddress cellAddresses = new CellRangeAddress(0, 0, 0, colSize - 1); +// sheet.addMergedRegion(cellAddresses); + //创建表头行(第二行) + Row sheetHeadRow = sheet.createRow(0);//1 + //遍历表头名称,创建表头单元格 + for(int i = 0 ; i < colSize ; i++){ + sheet.setColumnWidth(i,(excelCol.get(i).getWidth())*256);//宽度单位是字符的256分之一 + Cell headCell = sheetHeadRow.createCell(i); + headCell.setCellValue(excelCol.get(i).getTitle());//传值 + headCell.setCellStyle(getHeaderFont(sheet.getWorkbook()));//设置样式 + } + + //将data中的值填充到excel + int rowNum = sheet.getLastRowNum()+1; + Iterator iterator = data.iterator(); + //遍历数据 + for (;iterator.hasNext();){ + Row dataRow = sheet.createRow(rowNum);//创建行 + T obj = iterator.next();//获取当前行对应的数据 + JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(obj)); + for (int i = 0 ; i < colSize ; i++ ){ + Cell dataCell = dataRow.createCell(i); + dataCell.setCellStyle(getDataFont(workbook)); + if(i>=2){ + dataCell.setCellValue(getValueNum(jsonObject.get(excelCol.get(i).getField()))); + }else{ + dataCell.setCellValue(getValue(jsonObject.get(excelCol.get(i).getField()))); + } + + } + iterator.remove(); + rowNum++; + } + return workbook; + } + + //标题样式 + public static CellStyle getHeaderFont(Workbook workbook){ + Font font = workbook.createFont(); + font.setFontHeightInPoints((short) 16);//字体大小 + font.setBold(true);//加粗 + CellStyle cellStyle = workbook.createCellStyle(); + cellStyle.setFont(font); + cellStyle.setAlignment(HorizontalAlignment.CENTER_SELECTION);//设置水平居中 + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//设置垂直居中 + return cellStyle; + } + + //内容样式 + public static CellStyle getDataFont(Workbook workbook){ + Font font = workbook.createFont(); + font.setFontHeightInPoints((short) 12);//字体大小 + font.setBold(false);//不加粗 + CellStyle cellStyle = workbook.createCellStyle(); + cellStyle.setFont(font); + cellStyle.setAlignment(HorizontalAlignment.CENTER_SELECTION);//设置水平居中 + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//设置垂直居中 + return cellStyle; + } + + //处理数据 + public static String getValue(Object object){ + if (object==null){ + return ""; + }else { + return object.toString(); + } + } + //处理数据 + public static Integer getValueNum(Object object){ + if (object==null){ + return 0; + }else { + return Integer.parseInt(object.toString()); + } + } +} diff --git a/op-modules/op-device/push-device.bat b/op-modules/op-device/push-device.bat new file mode 100644 index 00000000..20d4d5b7 --- /dev/null +++ b/op-modules/op-device/push-device.bat @@ -0,0 +1,40 @@ +@echo off +echo --------------------------------Զǰ޸-------------------------------------- +set jarName=op-modules-device.jar +set profile=dev +set imageURI=192.168.202.36:30002/op-lanju/op-device +rem echo ȡǰַ +for /f "tokens=1,2,3 delims=/- " %%a in ("%date%") do @set D=%%a%%b%%c +rem echo ȡǰʱַ +for /f "tokens=1,2 delims=:." %%a in ("%time%") do @set T=%%a%%b +rem echo 統ǰСʱС10ո滻Ϊ0 +set T=%T: =0% +rem echo ʾʱַ +set imageVersion=%D%%T% +::Ϣ +echo jar:%jarName% +echo :%profile% +echo ַ:%imageURI% +echo 汾:%imageVersion% + +echo --------------------------------mvn package...-------------------------------- +::call mvn clean package -Dmaven.test.skip=true + +cd .\target +SET df=Dockerfile +if exist %df% ( + del /f /s /q .\Dockerfile +) +echo --------------------------------Dockerfile-------------------------------- +echo FROM 192.168.202.36:30002/library/openjdk:8u131-jdk-alpine >> Dockerfile +echo COPY %jarName% /application.jar >> Dockerfile +echo RUN echo "Asia/Shanghai" ^> /etc/timezone >> Dockerfile +echo CMD ["java", "-jar", "-Dspring.profiles.active=%profile%", "application.jar"] >> Dockerfile +dir +echo --------------------------------docker login...------------------------------- +docker login 192.168.202.36:30002 -u deploy -p Deploy@2023 +echo --------------------------------docker build...------------------------------- +docker build -t %imageURI%:%imageVersion% . +echo --------------------------------docker push...-------------------------------- +docker push %imageURI%:%imageVersion% +@pause \ No newline at end of file diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/SparePartsInOutStorageController.java b/op-modules/op-device/src/main/java/com/op/device/controller/SparePartsInOutStorageController.java new file mode 100644 index 00000000..f9f5f329 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/controller/SparePartsInOutStorageController.java @@ -0,0 +1,97 @@ +package com.op.device.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.op.common.log.annotation.Log; +import com.op.common.log.enums.BusinessType; +import com.op.common.security.annotation.RequiresPermissions; +import com.op.device.domain.SparePartsInStorage; +import com.op.device.service.ISparePartsInOutStorageService; +import com.op.common.core.web.controller.BaseController; +import com.op.common.core.web.domain.AjaxResult; +import com.op.common.core.utils.poi.ExcelUtil; +import com.op.common.core.web.page.TableDataInfo; + +/** + * 备品备件出入库Controller + * + * @author Open Platform + * @date 2023-10-17 + */ +@RestController +@RequestMapping("/sparepartsInOutStorage") +public class SparePartsInOutStorageController extends BaseController { + @Autowired + private ISparePartsInOutStorageService sparePartsInOutStorageService; + + /** + * 查询备品备件出入库列表 + */ + @RequiresPermissions("device:sparepartsInOutStorage:list") + @GetMapping("/list") + public TableDataInfo list(SparePartsInStorage sparePartsInStorage) { + startPage(); + List list = sparePartsInOutStorageService.selectSparePartsInStorageList(sparePartsInStorage); + return getDataTable(list); + } + + /** + * 导出备品备件出入库列表 + */ + @RequiresPermissions("device:sparepartsInOutStorage:export") + @Log(title = "备品备件出入库", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SparePartsInStorage sparePartsInStorage) { + List list = sparePartsInOutStorageService.selectSparePartsInStorageList(sparePartsInStorage); + ExcelUtil util = new ExcelUtil(SparePartsInStorage.class); + util.exportExcel(response, list, "备品备件出入库数据"); + } + + /** + * 获取备品备件出入库详细信息 + */ + @RequiresPermissions("device:sparepartsInOutStorage:query") + @GetMapping(value = "/{rawOrderInSnId}") + public AjaxResult getInfo(@PathVariable("rawOrderInSnId") String rawOrderInSnId) { + return success(sparePartsInOutStorageService.selectSparePartsInStorageByRawOrderInSnId(rawOrderInSnId)); + } + + /** + * 新增备品备件出入库 + */ + @RequiresPermissions("device:sparepartsInOutStorage:add") + @Log(title = "备品备件出入库", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SparePartsInStorage sparePartsInStorage) { + return toAjax(sparePartsInOutStorageService.insertSparePartsInStorage(sparePartsInStorage)); + } + + /** + * 修改备品备件出入库 + */ + @RequiresPermissions("device:sparepartsInOutStorage:edit") + @Log(title = "备品备件出入库", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SparePartsInStorage sparePartsInStorage) { + return toAjax(sparePartsInOutStorageService.updateSparePartsInStorage(sparePartsInStorage)); + } + + /** + * 删除备品备件出入库 + */ + @RequiresPermissions("device:sparepartsInOutStorage:remove") + @Log(title = "备品备件出入库", businessType = BusinessType.DELETE) + @DeleteMapping("/{rawOrderInSnIds}") + public AjaxResult remove(@PathVariable String[] rawOrderInSnIds) { + return toAjax(sparePartsInOutStorageService.deleteSparePartsInStorageByRawOrderInSnIds(rawOrderInSnIds)); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/controller/SparePartsLedgerController.java b/op-modules/op-device/src/main/java/com/op/device/controller/SparePartsLedgerController.java new file mode 100644 index 00000000..74e3aaeb --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/controller/SparePartsLedgerController.java @@ -0,0 +1,97 @@ +package com.op.device.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.op.common.log.annotation.Log; +import com.op.common.log.enums.BusinessType; +import com.op.common.security.annotation.RequiresPermissions; +import com.op.device.domain.SparePartsLedger; +import com.op.device.service.ISparePartsLedgerService; +import com.op.common.core.web.controller.BaseController; +import com.op.common.core.web.domain.AjaxResult; +import com.op.common.core.utils.poi.ExcelUtil; +import com.op.common.core.web.page.TableDataInfo; + +/** + * 备品备件台账管理Controller + * + * @author Open Platform + * @date 2023-10-13 + */ +@RestController +@RequestMapping("/sparePartsLedger") +public class SparePartsLedgerController extends BaseController { + @Autowired + private ISparePartsLedgerService sparePartsLedgerService; + + /** + * 查询备品备件台账管理列表 + */ + @RequiresPermissions("device:sparePartsLedger:list") + @GetMapping("/list") + public TableDataInfo list(SparePartsLedger sparePartsLedger) { + startPage(); + List list = sparePartsLedgerService.selectSparePartsLedgerList(sparePartsLedger); + return getDataTable(list); + } + + /** + * 导出备品备件台账管理列表 + */ + @RequiresPermissions("device:sparePartsLedger:export") + @Log(title = "备品备件台账管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SparePartsLedger sparePartsLedger) { + List list = sparePartsLedgerService.selectSparePartsLedgerList(sparePartsLedger); + ExcelUtil util = new ExcelUtil(SparePartsLedger.class); + util.exportExcel(response, list, "备品备件台账管理数据"); + } + + /** + * 获取备品备件台账管理详细信息 + */ + @RequiresPermissions("device:sparePartsLedger:query") + @GetMapping(value = "/{storageId}") + public AjaxResult getInfo(@PathVariable("storageId") String storageId) { + return success(sparePartsLedgerService.selectSparePartsLedgerByStorageId(storageId)); + } + + /** + * 新增备品备件台账管理 + */ + @RequiresPermissions("device:sparePartsLedger:add") + @Log(title = "备品备件台账管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SparePartsLedger sparePartsLedger) { + return toAjax(sparePartsLedgerService.insertSparePartsLedger(sparePartsLedger)); + } + + /** + * 修改备品备件台账管理 + */ + @RequiresPermissions("device:sparePartsLedger:edit") + @Log(title = "备品备件台账管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SparePartsLedger sparePartsLedger) { + return toAjax(sparePartsLedgerService.updateSparePartsLedger(sparePartsLedger)); + } + + /** + * 删除备品备件台账管理 + */ + @RequiresPermissions("device:sparePartsLedger:remove") + @Log(title = "备品备件台账管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{storageIds}") + public AjaxResult remove(@PathVariable String[] storageIds) { + return toAjax(sparePartsLedgerService.deleteSparePartsLedgerByStorageIds(storageIds)); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/SparePartsInStorage.java b/op-modules/op-device/src/main/java/com/op/device/domain/SparePartsInStorage.java new file mode 100644 index 00000000..83edcdcc --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/domain/SparePartsInStorage.java @@ -0,0 +1,352 @@ +package com.op.device.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; + +/** + * 备品备件出入库对象 wms_raw_order_in_sn + * + * @author Open Platform + * @date 2023-10-17 + */ +public class SparePartsInStorage extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 唯一序列号 */ + private String rawOrderInSnId; + + /** 仓库编码 */ + @Excel(name = "仓库编码") + private String whCode; + + /** 库区编码 */ + @Excel(name = "库区编码") + private String waCode; + + /** 库位编码 */ + @Excel(name = "库位编码") + private String wlCode; + + /** 入库单号 */ + @Excel(name = "入库单号") + private String orderNo; + + /** 采购订单号 */ + @Excel(name = "采购订单号") + private String poNo; + + /** 采购订单行项目 */ + @Excel(name = "采购订单行项目") + private String poLine; + + /** 物料号 */ + @Excel(name = "物料号") + private String materialCode; + + /** 物料描述 */ + @Excel(name = "物料描述") + private String materialDesc; + + /** sn/LPN */ + @Excel(name = "sn/LPN") + private String sn; + + /** 数量 */ + @Excel(name = "数量") + private BigDecimal amount; + + /** 备用1 */ + @Excel(name = "备用1") + private String userDefined1; + + /** 备用2 */ + @Excel(name = "备用2") + private String userDefined2; + + /** 备用3 */ + @Excel(name = "备用3") + private String userDefined3; + + /** 备用4 */ + @Excel(name = "备用4") + private String userDefined4; + + /** 备用5 */ + @Excel(name = "备用5") + private String userDefined5; + + /** 备用6 */ + @Excel(name = "备用6") + private String userDefined6; + + /** 备用7 */ + @Excel(name = "备用7") + private String userDefined7; + + /** 备用8 */ + @Excel(name = "备用8") + private String userDefined8; + + /** 备用9 */ + @Excel(name = "备用9") + private String userDefined9; + + /** 备用10 */ + @Excel(name = "备用10") + private String userDefined10; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date gmtCreate; + + /** 最后更新人 */ + @Excel(name = "最后更新人") + private String lastModifiedBy; + + /** 最后更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date gmtModified; + + /** 有效标记 */ + @Excel(name = "有效标记") + private String activeFlag; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String factoryCode; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String sapFactoryCode; + + public void setRawOrderInSnId(String rawOrderInSnId) { + this.rawOrderInSnId = rawOrderInSnId; + } + + public String getRawOrderInSnId() { + return rawOrderInSnId; + } + public void setWhCode(String whCode) { + this.whCode = whCode; + } + + public String getWhCode() { + return whCode; + } + public void setWaCode(String waCode) { + this.waCode = waCode; + } + + public String getWaCode() { + return waCode; + } + public void setWlCode(String wlCode) { + this.wlCode = wlCode; + } + + public String getWlCode() { + return wlCode; + } + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public String getOrderNo() { + return orderNo; + } + public void setPoNo(String poNo) { + this.poNo = poNo; + } + + public String getPoNo() { + return poNo; + } + public void setPoLine(String poLine) { + this.poLine = poLine; + } + + public String getPoLine() { + return poLine; + } + public void setMaterialCode(String materialCode) { + this.materialCode = materialCode; + } + + public String getMaterialCode() { + return materialCode; + } + public void setMaterialDesc(String materialDesc) { + this.materialDesc = materialDesc; + } + + public String getMaterialDesc() { + return materialDesc; + } + public void setSn(String sn) { + this.sn = sn; + } + + public String getSn() { + return sn; + } + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public BigDecimal getAmount() { + return amount; + } + public void setUserDefined1(String userDefined1) { + this.userDefined1 = userDefined1; + } + + public String getUserDefined1() { + return userDefined1; + } + public void setUserDefined2(String userDefined2) { + this.userDefined2 = userDefined2; + } + + public String getUserDefined2() { + return userDefined2; + } + public void setUserDefined3(String userDefined3) { + this.userDefined3 = userDefined3; + } + + public String getUserDefined3() { + return userDefined3; + } + public void setUserDefined4(String userDefined4) { + this.userDefined4 = userDefined4; + } + + public String getUserDefined4() { + return userDefined4; + } + public void setUserDefined5(String userDefined5) { + this.userDefined5 = userDefined5; + } + + public String getUserDefined5() { + return userDefined5; + } + public void setUserDefined6(String userDefined6) { + this.userDefined6 = userDefined6; + } + + public String getUserDefined6() { + return userDefined6; + } + public void setUserDefined7(String userDefined7) { + this.userDefined7 = userDefined7; + } + + public String getUserDefined7() { + return userDefined7; + } + public void setUserDefined8(String userDefined8) { + this.userDefined8 = userDefined8; + } + + public String getUserDefined8() { + return userDefined8; + } + public void setUserDefined9(String userDefined9) { + this.userDefined9 = userDefined9; + } + + public String getUserDefined9() { + return userDefined9; + } + public void setUserDefined10(String userDefined10) { + this.userDefined10 = userDefined10; + } + + public String getUserDefined10() { + return userDefined10; + } + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtCreate() { + return gmtCreate; + } + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public String getLastModifiedBy() { + return lastModifiedBy; + } + public void setGmtModified(Date gmtModified) { + this.gmtModified = gmtModified; + } + + public Date getGmtModified() { + return gmtModified; + } + public void setActiveFlag(String activeFlag) { + this.activeFlag = activeFlag; + } + + public String getActiveFlag() { + return activeFlag; + } + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } + + public String getFactoryCode() { + return factoryCode; + } + public void setSapFactoryCode(String sapFactoryCode) { + this.sapFactoryCode = sapFactoryCode; + } + + public String getSapFactoryCode() { + return sapFactoryCode; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("rawOrderInSnId", getRawOrderInSnId()) + .append("whCode", getWhCode()) + .append("waCode", getWaCode()) + .append("wlCode", getWlCode()) + .append("orderNo", getOrderNo()) + .append("poNo", getPoNo()) + .append("poLine", getPoLine()) + .append("materialCode", getMaterialCode()) + .append("materialDesc", getMaterialDesc()) + .append("sn", getSn()) + .append("amount", getAmount()) + .append("userDefined1", getUserDefined1()) + .append("userDefined2", getUserDefined2()) + .append("userDefined3", getUserDefined3()) + .append("userDefined4", getUserDefined4()) + .append("userDefined5", getUserDefined5()) + .append("userDefined6", getUserDefined6()) + .append("userDefined7", getUserDefined7()) + .append("userDefined8", getUserDefined8()) + .append("userDefined9", getUserDefined9()) + .append("userDefined10", getUserDefined10()) + .append("createBy", getCreateBy()) + .append("gmtCreate", getGmtCreate()) + .append("lastModifiedBy", getLastModifiedBy()) + .append("gmtModified", getGmtModified()) + .append("activeFlag", getActiveFlag()) + .append("factoryCode", getFactoryCode()) + .append("sapFactoryCode", getSapFactoryCode()) + .toString(); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/SparePartsLedger.java b/op-modules/op-device/src/main/java/com/op/device/domain/SparePartsLedger.java new file mode 100644 index 00000000..dd326cb3 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/domain/SparePartsLedger.java @@ -0,0 +1,568 @@ +package com.op.device.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; + +/** + * 备品备件台账管理对象 wms_ods_mate_storage_news + * + * @author Open Platform + * @date 2023-10-13 + */ +public class SparePartsLedger extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 唯一序列 */ + @Excel(name = "唯一序列") + private String storageId; + + /** 仓库编码 */ + @Excel(name = "仓库编码") + private String whCode; + + /** 区域编号 */ + @Excel(name = "区域编号") + private String regionCode; + + /** 库区编码 */ + @Excel(name = "库区编码") + private String waCode; + + /** 库存类型:BC-包材 */ + @Excel(name = "库存类型:BC-包材") + private String storageType; + + /** 库位编码 */ + @Excel(name = "库位编码") + private String wlCode; + + /** 物料号 */ + @Excel(name = "物料号") + private String materialCode; + + /** 物料描述 */ + @Excel(name = "物料描述") + private String materialDesc; + + /** 总数量 */ + @Excel(name = "总数量") + private BigDecimal amount; + + /** 冻结数量(预留) */ + @Excel(name = "冻结数量", readConverterExp = "预=留") + private BigDecimal storageAmount; + + /** 占用数量 */ + @Excel(name = "占用数量") + private BigDecimal occupyAmount; + + /** LPN(预留) */ + @Excel(name = "LPN", readConverterExp = "预=留") + private String lpn; + + /** 入库批次号(预留) */ + @Excel(name = "入库批次号", readConverterExp = "预=留") + private String productBatch; + + /** 入库时间x(预留) */ + @Excel(name = "入库时间x", readConverterExp = "预=留") + private Date receiveDate; + + /** 生产时间(预留) */ + @Excel(name = "生产时间", readConverterExp = "预=留") + private Date productDate; + + /** 单位 */ + @Excel(name = "单位") + private String userDefined1; + + /** SAP库位 */ + @Excel(name = "SAP库位") + private String userDefined2; + + /** 备用3 */ + @Excel(name = "备用3") + private String userDefined3; + + /** 备用4 */ + @Excel(name = "备用4") + private String userDefined4; + + /** 备用5 */ + @Excel(name = "备用5") + private String userDefined5; + + /** 备用6 */ + @Excel(name = "备用6") + private String userDefined6; + + /** 备用7 */ + @Excel(name = "备用7") + private String userDefined7; + + /** 备用8 */ + @Excel(name = "备用8") + private String userDefined8; + + /** 备用9 */ + @Excel(name = "备用9") + private String userDefined9; + + /** 备用10 */ + @Excel(name = "备用10") + private String userDefined10; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date gmtCreate; + + /** 最后更新人 */ + @Excel(name = "最后更新人") + private String lastModifiedBy; + + /** 最后更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date gmtModified; + + /** 有效标记 */ + @Excel(name = "有效标记") + private String activeFlag; + + /** 工厂号 */ + @Excel(name = "工厂号") + private String factoryCode; + + /** SAP工厂号 */ + @Excel(name = "SAP工厂号") + private String sapFactoryCode; + + /** 库位名称 */ + @Excel(name = "库位名称") + private String wlName; + + /** 0存在 */ + private String delFlag; + + /** 使用寿命(备件用) */ + @Excel(name = "使用寿命", readConverterExp = "备=件用") + private String spareUseLife; + + /** 备件名称(备件用) */ + @Excel(name = "备件名称", readConverterExp = "备=件用") + private String spareName; + + /** 规格型号(备件用) */ + @Excel(name = "规格型号", readConverterExp = "备=件用") + private String spareMode; + + /** 生产厂商(备件用) */ + @Excel(name = "生产厂商", readConverterExp = "备=件用") + private String spareManufacturer; + + /** 供应商(备件用) */ + @Excel(name = "供应商", readConverterExp = "备=件用") + private String spareSupplier; + + /** 循环周期(备件用) */ + @Excel(name = "循环周期", readConverterExp = "备=件用") + private String spareReplacementCycle; + + /** 计量单位(备件用) */ + @Excel(name = "计量单位", readConverterExp = "备=件用") + private String spareMeasurementUnit; + + /** 换算单位(备件用) */ + @Excel(name = "换算单位", readConverterExp = "备=件用") + private String spareConversionUnit; + + /** 换算比例(备件用) */ + @Excel(name = "换算比例", readConverterExp = "备=件用") + private String spareConversionRatio; + + /** 库存上限(备件用) */ + @Excel(name = "库存上限", readConverterExp = "备=件用") + private String spareInventoryFloor; + + /** 库存下限(备件用) */ + @Excel(name = "库存下限", readConverterExp = "备=件用") + private String spareInventoryUpper; + + /** 备件类型 */ + @Excel(name = "备件类型", readConverterExp = "备=件用") + private String spareType; + + public void setSpareType(String spareType) { + this.spareType = spareType; + } + + public String getSpareType() { + return spareType; + } + + public void setStorageId(String storageId) { + this.storageId = storageId; + } + + public String getStorageId() { + return storageId; + } + public void setWhCode(String whCode) { + this.whCode = whCode; + } + + public String getWhCode() { + return whCode; + } + public void setRegionCode(String regionCode) { + this.regionCode = regionCode; + } + + public String getRegionCode() { + return regionCode; + } + public void setWaCode(String waCode) { + this.waCode = waCode; + } + + public String getWaCode() { + return waCode; + } + public void setStorageType(String storageType) { + this.storageType = storageType; + } + + public String getStorageType() { + return storageType; + } + public void setWlCode(String wlCode) { + this.wlCode = wlCode; + } + + public String getWlCode() { + return wlCode; + } + public void setMaterialCode(String materialCode) { + this.materialCode = materialCode; + } + + public String getMaterialCode() { + return materialCode; + } + public void setMaterialDesc(String materialDesc) { + this.materialDesc = materialDesc; + } + + public String getMaterialDesc() { + return materialDesc; + } + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public BigDecimal getAmount() { + return amount; + } + public void setStorageAmount(BigDecimal storageAmount) { + this.storageAmount = storageAmount; + } + + public BigDecimal getStorageAmount() { + return storageAmount; + } + public void setOccupyAmount(BigDecimal occupyAmount) { + this.occupyAmount = occupyAmount; + } + + public BigDecimal getOccupyAmount() { + return occupyAmount; + } + public void setLpn(String lpn) { + this.lpn = lpn; + } + + public String getLpn() { + return lpn; + } + public void setProductBatch(String productBatch) { + this.productBatch = productBatch; + } + + public String getProductBatch() { + return productBatch; + } + public void setReceiveDate(Date receiveDate) { + this.receiveDate = receiveDate; + } + + public Date getReceiveDate() { + return receiveDate; + } + public void setProductDate(Date productDate) { + this.productDate = productDate; + } + + public Date getProductDate() { + return productDate; + } + public void setUserDefined1(String userDefined1) { + this.userDefined1 = userDefined1; + } + + public String getUserDefined1() { + return userDefined1; + } + public void setUserDefined2(String userDefined2) { + this.userDefined2 = userDefined2; + } + + public String getUserDefined2() { + return userDefined2; + } + public void setUserDefined3(String userDefined3) { + this.userDefined3 = userDefined3; + } + + public String getUserDefined3() { + return userDefined3; + } + public void setUserDefined4(String userDefined4) { + this.userDefined4 = userDefined4; + } + + public String getUserDefined4() { + return userDefined4; + } + public void setUserDefined5(String userDefined5) { + this.userDefined5 = userDefined5; + } + + public String getUserDefined5() { + return userDefined5; + } + public void setUserDefined6(String userDefined6) { + this.userDefined6 = userDefined6; + } + + public String getUserDefined6() { + return userDefined6; + } + public void setUserDefined7(String userDefined7) { + this.userDefined7 = userDefined7; + } + + public String getUserDefined7() { + return userDefined7; + } + public void setUserDefined8(String userDefined8) { + this.userDefined8 = userDefined8; + } + + public String getUserDefined8() { + return userDefined8; + } + public void setUserDefined9(String userDefined9) { + this.userDefined9 = userDefined9; + } + + public String getUserDefined9() { + return userDefined9; + } + public void setUserDefined10(String userDefined10) { + this.userDefined10 = userDefined10; + } + + public String getUserDefined10() { + return userDefined10; + } + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public Date getGmtCreate() { + return gmtCreate; + } + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public String getLastModifiedBy() { + return lastModifiedBy; + } + public void setGmtModified(Date gmtModified) { + this.gmtModified = gmtModified; + } + + public Date getGmtModified() { + return gmtModified; + } + public void setActiveFlag(String activeFlag) { + this.activeFlag = activeFlag; + } + + public String getActiveFlag() { + return activeFlag; + } + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } + + public String getFactoryCode() { + return factoryCode; + } + public void setSapFactoryCode(String sapFactoryCode) { + this.sapFactoryCode = sapFactoryCode; + } + + public String getSapFactoryCode() { + return sapFactoryCode; + } + public void setWlName(String wlName) { + this.wlName = wlName; + } + + public String getWlName() { + return wlName; + } + public void setDelFlag(String delFlag) { + this.delFlag = delFlag; + } + + public String getDelFlag() { + return delFlag; + } + public void setSpareUseLife(String spareUseLife) { + this.spareUseLife = spareUseLife; + } + + public String getSpareUseLife() { + return spareUseLife; + } + public void setSpareName(String spareName) { + this.spareName = spareName; + } + + public String getSpareName() { + return spareName; + } + public void setSpareMode(String spareMode) { + this.spareMode = spareMode; + } + + public String getSpareMode() { + return spareMode; + } + public void setSpareManufacturer(String spareManufacturer) { + this.spareManufacturer = spareManufacturer; + } + + public String getSpareManufacturer() { + return spareManufacturer; + } + public void setSpareSupplier(String spareSupplier) { + this.spareSupplier = spareSupplier; + } + + public String getSpareSupplier() { + return spareSupplier; + } + public void setSpareReplacementCycle(String spareReplacementCycle) { + this.spareReplacementCycle = spareReplacementCycle; + } + + public String getSpareReplacementCycle() { + return spareReplacementCycle; + } + public void setSpareMeasurementUnit(String spareMeasurementUnit) { + this.spareMeasurementUnit = spareMeasurementUnit; + } + + public String getSpareMeasurementUnit() { + return spareMeasurementUnit; + } + public void setSpareConversionUnit(String spareConversionUnit) { + this.spareConversionUnit = spareConversionUnit; + } + + public String getSpareConversionUnit() { + return spareConversionUnit; + } + public void setSpareConversionRatio(String spareConversionRatio) { + this.spareConversionRatio = spareConversionRatio; + } + + public String getSpareConversionRatio() { + return spareConversionRatio; + } + public void setSpareInventoryFloor(String spareInventoryFloor) { + this.spareInventoryFloor = spareInventoryFloor; + } + + public String getSpareInventoryFloor() { + return spareInventoryFloor; + } + public void setSpareInventoryUpper(String spareInventoryUpper) { + this.spareInventoryUpper = spareInventoryUpper; + } + + public String getSpareInventoryUpper() { + return spareInventoryUpper; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("storageId", getStorageId()) + .append("whCode", getWhCode()) + .append("regionCode", getRegionCode()) + .append("waCode", getWaCode()) + .append("storageType", getStorageType()) + .append("wlCode", getWlCode()) + .append("materialCode", getMaterialCode()) + .append("materialDesc", getMaterialDesc()) + .append("amount", getAmount()) + .append("storageAmount", getStorageAmount()) + .append("occupyAmount", getOccupyAmount()) + .append("lpn", getLpn()) + .append("productBatch", getProductBatch()) + .append("receiveDate", getReceiveDate()) + .append("productDate", getProductDate()) + .append("userDefined1", getUserDefined1()) + .append("userDefined2", getUserDefined2()) + .append("userDefined3", getUserDefined3()) + .append("userDefined4", getUserDefined4()) + .append("userDefined5", getUserDefined5()) + .append("userDefined6", getUserDefined6()) + .append("userDefined7", getUserDefined7()) + .append("userDefined8", getUserDefined8()) + .append("userDefined9", getUserDefined9()) + .append("userDefined10", getUserDefined10()) + .append("createBy", getCreateBy()) + .append("gmtCreate", getGmtCreate()) + .append("lastModifiedBy", getLastModifiedBy()) + .append("gmtModified", getGmtModified()) + .append("activeFlag", getActiveFlag()) + .append("factoryCode", getFactoryCode()) + .append("sapFactoryCode", getSapFactoryCode()) + .append("wlName", getWlName()) + .append("delFlag", getDelFlag()) + .append("spareUseLife", getSpareUseLife()) + .append("spareName", getSpareName()) + .append("spareMode", getSpareMode()) + .append("spareManufacturer", getSpareManufacturer()) + .append("spareSupplier", getSpareSupplier()) + .append("spareReplacementCycle", getSpareReplacementCycle()) + .append("spareMeasurementUnit", getSpareMeasurementUnit()) + .append("spareConversionUnit", getSpareConversionUnit()) + .append("spareConversionRatio", getSpareConversionRatio()) + .append("spareInventoryFloor", getSpareInventoryFloor()) + .append("spareInventoryUpper", getSpareInventoryUpper()) + .toString(); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/SparePartsInOutStorageMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/SparePartsInOutStorageMapper.java new file mode 100644 index 00000000..3c04e369 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/SparePartsInOutStorageMapper.java @@ -0,0 +1,61 @@ +package com.op.device.mapper; + +import java.util.List; + +import com.op.device.domain.SparePartsInStorage; + +/** + * 备品备件出入库Mapper接口 + * + * @author Open Platform + * @date 2023-10-17 + */ +public interface SparePartsInOutStorageMapper { + /** + * 查询备品备件出入库 + * + * @param rawOrderInSnId 备品备件出入库主键 + * @return 备品备件出入库 + */ + public SparePartsInStorage selectSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId); + + /** + * 查询备品备件出入库列表 + * + * @param sparePartsInStorage 备品备件出入库 + * @return 备品备件出入库集合 + */ + public List selectSparePartsInStorageList(SparePartsInStorage sparePartsInStorage); + + /** + * 新增备品备件出入库 + * + * @param sparePartsInStorage 备品备件出入库 + * @return 结果 + */ + public int insertSparePartsInStorage(SparePartsInStorage sparePartsInStorage); + + /** + * 修改备品备件出入库 + * + * @param sparePartsInStorage 备品备件出入库 + * @return 结果 + */ + public int updateSparePartsInStorage(SparePartsInStorage sparePartsInStorage); + + /** + * 删除备品备件出入库 + * + * @param rawOrderInSnId 备品备件出入库主键 + * @return 结果 + */ + public int deleteSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId); + + /** + * 批量删除备品备件出入库 + * + * @param rawOrderInSnIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSparePartsInStorageByRawOrderInSnIds(String[] rawOrderInSnIds); +} diff --git a/op-modules/op-device/src/main/java/com/op/device/mapper/SparePartsLedgerMapper.java b/op-modules/op-device/src/main/java/com/op/device/mapper/SparePartsLedgerMapper.java new file mode 100644 index 00000000..01568182 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/mapper/SparePartsLedgerMapper.java @@ -0,0 +1,61 @@ +package com.op.device.mapper; + +import java.util.List; + +import com.op.device.domain.SparePartsLedger; + +/** + * 备品备件台账管理Mapper接口 + * + * @author Open Platform + * @date 2023-10-13 + */ +public interface SparePartsLedgerMapper { + /** + * 查询备品备件台账管理 + * + * @param storageId 备品备件台账管理主键 + * @return 备品备件台账管理 + */ + public SparePartsLedger selectSparePartsLedgerByStorageId(String storageId); + + /** + * 查询备品备件台账管理列表 + * + * @param sparePartsLedger 备品备件台账管理 + * @return 备品备件台账管理集合 + */ + public List selectSparePartsLedgerList(SparePartsLedger sparePartsLedger); + + /** + * 新增备品备件台账管理 + * + * @param sparePartsLedger 备品备件台账管理 + * @return 结果 + */ + public int insertSparePartsLedger(SparePartsLedger sparePartsLedger); + + /** + * 修改备品备件台账管理 + * + * @param sparePartsLedger 备品备件台账管理 + * @return 结果 + */ + public int updateSparePartsLedger(SparePartsLedger sparePartsLedger); + + /** + * 删除备品备件台账管理 + * + * @param storageId 备品备件台账管理主键 + * @return 结果 + */ + public int deleteSparePartsLedgerByStorageId(String storageId); + + /** + * 批量删除备品备件台账管理 + * + * @param storageIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSparePartsLedgerByStorageIds(String[] storageIds); +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/ISparePartsInOutStorageService.java b/op-modules/op-device/src/main/java/com/op/device/service/ISparePartsInOutStorageService.java new file mode 100644 index 00000000..db005507 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/service/ISparePartsInOutStorageService.java @@ -0,0 +1,60 @@ +package com.op.device.service; + +import java.util.List; +import com.op.device.domain.SparePartsInStorage; + +/** + * 备品备件出入库Service接口 + * + * @author Open Platform + * @date 2023-10-17 + */ +public interface ISparePartsInOutStorageService { + /** + * 查询备品备件出入库 + * + * @param rawOrderInSnId 备品备件出入库主键 + * @return 备品备件出入库 + */ + public SparePartsInStorage selectSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId); + + /** + * 查询备品备件出入库列表 + * + * @param sparePartsInStorage 备品备件出入库 + * @return 备品备件出入库集合 + */ + public List selectSparePartsInStorageList(SparePartsInStorage sparePartsInStorage); + + /** + * 新增备品备件出入库 + * + * @param sparePartsInStorage 备品备件出入库 + * @return 结果 + */ + public int insertSparePartsInStorage(SparePartsInStorage sparePartsInStorage); + + /** + * 修改备品备件出入库 + * + * @param sparePartsInStorage 备品备件出入库 + * @return 结果 + */ + public int updateSparePartsInStorage(SparePartsInStorage sparePartsInStorage); + + /** + * 批量删除备品备件出入库 + * + * @param rawOrderInSnIds 需要删除的备品备件出入库主键集合 + * @return 结果 + */ + public int deleteSparePartsInStorageByRawOrderInSnIds(String[] rawOrderInSnIds); + + /** + * 删除备品备件出入库信息 + * + * @param rawOrderInSnId 备品备件出入库主键 + * @return 结果 + */ + public int deleteSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId); +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/ISparePartsLedgerService.java b/op-modules/op-device/src/main/java/com/op/device/service/ISparePartsLedgerService.java new file mode 100644 index 00000000..29d80760 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/service/ISparePartsLedgerService.java @@ -0,0 +1,61 @@ +package com.op.device.service; + +import java.util.List; + +import com.op.device.domain.SparePartsLedger; + +/** + * 备品备件台账管理Service接口 + * + * @author Open Platform + * @date 2023-10-13 + */ +public interface ISparePartsLedgerService { + /** + * 查询备品备件台账管理 + * + * @param storageId 备品备件台账管理主键 + * @return 备品备件台账管理 + */ + public SparePartsLedger selectSparePartsLedgerByStorageId(String storageId); + + /** + * 查询备品备件台账管理列表 + * + * @param sparePartsLedger 备品备件台账管理 + * @return 备品备件台账管理集合 + */ + public List selectSparePartsLedgerList(SparePartsLedger sparePartsLedger); + + /** + * 新增备品备件台账管理 + * + * @param sparePartsLedger 备品备件台账管理 + * @return 结果 + */ + public int insertSparePartsLedger(SparePartsLedger sparePartsLedger); + + /** + * 修改备品备件台账管理 + * + * @param sparePartsLedger 备品备件台账管理 + * @return 结果 + */ + public int updateSparePartsLedger(SparePartsLedger sparePartsLedger); + + /** + * 批量删除备品备件台账管理 + * + * @param storageIds 需要删除的备品备件台账管理主键集合 + * @return 结果 + */ + public int deleteSparePartsLedgerByStorageIds(String[] storageIds); + + /** + * 删除备品备件台账管理信息 + * + * @param storageId 备品备件台账管理主键 + * @return 结果 + */ + public int deleteSparePartsLedgerByStorageId(String storageId); +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/SparePartsInOutStorageServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/SparePartsInOutStorageServiceImpl.java new file mode 100644 index 00000000..69754cf1 --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/SparePartsInOutStorageServiceImpl.java @@ -0,0 +1,94 @@ +package com.op.device.service.impl; + +import java.util.List; + +import com.baomidou.dynamic.datasource.annotation.DS; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.op.device.mapper.SparePartsInOutStorageMapper; +import com.op.device.domain.SparePartsInStorage; +import com.op.device.service.ISparePartsInOutStorageService; + +/** + * 备品备件出入库Service业务层处理 + * + * @author Open Platform + * @date 2023-10-17 + */ +@Service +public class SparePartsInOutStorageServiceImpl implements ISparePartsInOutStorageService { + @Autowired + private SparePartsInOutStorageMapper sparePartsInOutStorageMapper; + + /** + * 查询备品备件出入库 + * + * @param rawOrderInSnId 备品备件出入库主键 + * @return 备品备件出入库 + */ + @Override + @DS("#header.poolName") + public SparePartsInStorage selectSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId) { + return sparePartsInOutStorageMapper.selectSparePartsInStorageByRawOrderInSnId(rawOrderInSnId); + } + + /** + * 查询备品备件出入库列表 + * + * @param sparePartsInStorage 备品备件出入库 + * @return 备品备件出入库 + */ + @Override + @DS("#header.poolName") + public List selectSparePartsInStorageList(SparePartsInStorage sparePartsInStorage) { + return sparePartsInOutStorageMapper.selectSparePartsInStorageList(sparePartsInStorage); + } + + /** + * 新增备品备件出入库 + * + * @param sparePartsInStorage 备品备件出入库 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int insertSparePartsInStorage(SparePartsInStorage sparePartsInStorage) { + return sparePartsInOutStorageMapper.insertSparePartsInStorage(sparePartsInStorage); + } + + /** + * 修改备品备件出入库 + * + * @param sparePartsInStorage 备品备件出入库 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int updateSparePartsInStorage(SparePartsInStorage sparePartsInStorage) { + return sparePartsInOutStorageMapper.updateSparePartsInStorage(sparePartsInStorage); + } + + /** + * 批量删除备品备件出入库 + * + * @param rawOrderInSnIds 需要删除的备品备件出入库主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteSparePartsInStorageByRawOrderInSnIds(String[] rawOrderInSnIds) { + return sparePartsInOutStorageMapper.deleteSparePartsInStorageByRawOrderInSnIds(rawOrderInSnIds); + } + + /** + * 删除备品备件出入库信息 + * + * @param rawOrderInSnId 备品备件出入库主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteSparePartsInStorageByRawOrderInSnId(String rawOrderInSnId) { + return sparePartsInOutStorageMapper.deleteSparePartsInStorageByRawOrderInSnId(rawOrderInSnId); + } +} diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/SparePartsLedgerServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/SparePartsLedgerServiceImpl.java new file mode 100644 index 00000000..1921561a --- /dev/null +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/SparePartsLedgerServiceImpl.java @@ -0,0 +1,95 @@ +package com.op.device.service.impl; + +import java.util.List; + +import com.baomidou.dynamic.datasource.annotation.DS; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.op.device.mapper.SparePartsLedgerMapper; +import com.op.device.domain.SparePartsLedger; +import com.op.device.service.ISparePartsLedgerService; + +/** + * 备品备件台账管理Service业务层处理 + * + * @author Open Platform + * @date 2023-10-13 + */ +@Service +public class SparePartsLedgerServiceImpl implements ISparePartsLedgerService { + @Autowired + private SparePartsLedgerMapper sparePartsLedgerMapper; + + /** + * 查询备品备件台账管理 + * + * @param storageId 备品备件台账管理主键 + * @return 备品备件台账管理 + */ + @Override + @DS("#header.poolName") + public SparePartsLedger selectSparePartsLedgerByStorageId(String storageId) { + return sparePartsLedgerMapper.selectSparePartsLedgerByStorageId(storageId); + } + + /** + * 查询备品备件台账管理列表 + * + * @param sparePartsLedger 备品备件台账管理 + * @return 备品备件台账管理 + */ + @Override + @DS("#header.poolName") + public List selectSparePartsLedgerList(SparePartsLedger sparePartsLedger) { + sparePartsLedger.setStorageType("SP"); + return sparePartsLedgerMapper.selectSparePartsLedgerList(sparePartsLedger); + } + + /** + * 新增备品备件台账管理 + * + * @param sparePartsLedger 备品备件台账管理 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int insertSparePartsLedger(SparePartsLedger sparePartsLedger) { + return sparePartsLedgerMapper.insertSparePartsLedger(sparePartsLedger); + } + + /** + * 修改备品备件台账管理 + * + * @param sparePartsLedger 备品备件台账管理 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int updateSparePartsLedger(SparePartsLedger sparePartsLedger) { + return sparePartsLedgerMapper.updateSparePartsLedger(sparePartsLedger); + } + + /** + * 批量删除备品备件台账管理 + * + * @param storageIds 需要删除的备品备件台账管理主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteSparePartsLedgerByStorageIds(String[] storageIds) { + return sparePartsLedgerMapper.deleteSparePartsLedgerByStorageIds(storageIds); + } + + /** + * 删除备品备件台账管理信息 + * + * @param storageId 备品备件台账管理主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteSparePartsLedgerByStorageId(String storageId) { + return sparePartsLedgerMapper.deleteSparePartsLedgerByStorageId(storageId); + } +} diff --git a/op-modules/op-device/src/main/resources/mapper/device/SparePartsInOutStorageMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/SparePartsInOutStorageMapper.xml new file mode 100644 index 00000000..2d7903ee --- /dev/null +++ b/op-modules/op-device/src/main/resources/mapper/device/SparePartsInOutStorageMapper.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select raw_order_in_sn_id, wh_code, wa_code, wl_code, order_no, po_no, po_line, material_code, material_desc, sn, amount, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, user_defined6, user_defined7, user_defined8, user_defined9, user_defined10, create_by, gmt_create, last_modified_by, gmt_modified, active_flag, factory_code, sap_factory_code from wms_raw_order_in_sn + + + + + + + + insert into wms_raw_order_in_sn + + raw_order_in_sn_id, + wh_code, + wa_code, + wl_code, + order_no, + po_no, + po_line, + material_code, + material_desc, + sn, + amount, + user_defined1, + user_defined2, + user_defined3, + user_defined4, + user_defined5, + user_defined6, + user_defined7, + user_defined8, + user_defined9, + user_defined10, + create_by, + gmt_create, + last_modified_by, + gmt_modified, + active_flag, + factory_code, + sap_factory_code, + + + #{rawOrderInSnId}, + #{whCode}, + #{waCode}, + #{wlCode}, + #{orderNo}, + #{poNo}, + #{poLine}, + #{materialCode}, + #{materialDesc}, + #{sn}, + #{amount}, + #{userDefined1}, + #{userDefined2}, + #{userDefined3}, + #{userDefined4}, + #{userDefined5}, + #{userDefined6}, + #{userDefined7}, + #{userDefined8}, + #{userDefined9}, + #{userDefined10}, + #{createBy}, + #{gmtCreate}, + #{lastModifiedBy}, + #{gmtModified}, + #{activeFlag}, + #{factoryCode}, + #{sapFactoryCode}, + + + + + update wms_raw_order_in_sn + + wh_code = #{whCode}, + wa_code = #{waCode}, + wl_code = #{wlCode}, + order_no = #{orderNo}, + po_no = #{poNo}, + po_line = #{poLine}, + material_code = #{materialCode}, + material_desc = #{materialDesc}, + sn = #{sn}, + amount = #{amount}, + user_defined1 = #{userDefined1}, + user_defined2 = #{userDefined2}, + user_defined3 = #{userDefined3}, + user_defined4 = #{userDefined4}, + user_defined5 = #{userDefined5}, + user_defined6 = #{userDefined6}, + user_defined7 = #{userDefined7}, + user_defined8 = #{userDefined8}, + user_defined9 = #{userDefined9}, + user_defined10 = #{userDefined10}, + create_by = #{createBy}, + gmt_create = #{gmtCreate}, + last_modified_by = #{lastModifiedBy}, + gmt_modified = #{gmtModified}, + active_flag = #{activeFlag}, + factory_code = #{factoryCode}, + sap_factory_code = #{sapFactoryCode}, + + where raw_order_in_sn_id = #{rawOrderInSnId} + + + + delete from wms_raw_order_in_sn where raw_order_in_sn_id = #{rawOrderInSnId} + + + + delete from wms_raw_order_in_sn where raw_order_in_sn_id in + + #{rawOrderInSnId} + + + \ No newline at end of file diff --git a/op-modules/op-device/src/main/resources/mapper/device/SparePartsLedgerMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/SparePartsLedgerMapper.xml new file mode 100644 index 00000000..dd5b1632 --- /dev/null +++ b/op-modules/op-device/src/main/resources/mapper/device/SparePartsLedgerMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select storage_type, material_code, material_desc, amount,sap_factory_code, wl_name, del_flag, spare_use_life, spare_name, spare_mode, spare_manufacturer, spare_supplier, spare_replacement_cycle, spare_measurement_unit, spare_conversion_unit, spare_conversion_ratio, spare_inventory_floor, spare_inventory_upper,spare_type,create_by, gmt_create, last_modified_by, gmt_modified, active_flag, factory_code from wms_ods_mate_storage_news + + + + + + + + insert into wms_ods_mate_storage_news + + storage_id, + wh_code, + region_code, + wa_code, + storage_type, + wl_code, + material_code, + material_desc, + amount, + storage_amount, + occupy_amount, + lpn, + product_batch, + receive_date, + product_date, + user_defined1, + user_defined2, + user_defined3, + user_defined4, + user_defined5, + user_defined6, + user_defined7, + user_defined8, + user_defined9, + user_defined10, + create_by, + gmt_create, + last_modified_by, + gmt_modified, + active_flag, + factory_code, + sap_factory_code, + wl_name, + del_flag, + spare_use_life, + spare_name, + spare_mode, + spare_manufacturer, + spare_supplier, + spare_replacement_cycle, + spare_measurement_unit, + spare_conversion_unit, + spare_conversion_ratio, + spare_inventory_floor, + spare_inventory_upper, + spare_type, + + + #{storageId}, + #{whCode}, + #{regionCode}, + #{waCode}, + #{storageType}, + #{wlCode}, + #{materialCode}, + #{materialDesc}, + #{amount}, + #{storageAmount}, + #{occupyAmount}, + #{lpn}, + #{productBatch}, + #{receiveDate}, + #{productDate}, + #{userDefined1}, + #{userDefined2}, + #{userDefined3}, + #{userDefined4}, + #{userDefined5}, + #{userDefined6}, + #{userDefined7}, + #{userDefined8}, + #{userDefined9}, + #{userDefined10}, + #{createBy}, + #{gmtCreate}, + #{lastModifiedBy}, + #{gmtModified}, + #{activeFlag}, + #{factoryCode}, + #{sapFactoryCode}, + #{wlName}, + #{delFlag}, + #{spareUseLife}, + #{spareName}, + #{spareMode}, + #{spareManufacturer}, + #{spareSupplier}, + #{spareReplacementCycle}, + #{spareMeasurementUnit}, + #{spareConversionUnit}, + #{spareConversionRatio}, + #{spareInventoryFloor}, + #{spareInventoryUpper}, + #{spareType}, + + + + + update wms_ods_mate_storage_news + + wh_code = #{whCode}, + region_code = #{regionCode}, + wa_code = #{waCode}, + storage_type = #{storageType}, + wl_code = #{wlCode}, + material_code = #{materialCode}, + material_desc = #{materialDesc}, + amount = #{amount}, + storage_amount = #{storageAmount}, + occupy_amount = #{occupyAmount}, + lpn = #{lpn}, + product_batch = #{productBatch}, + receive_date = #{receiveDate}, + product_date = #{productDate}, + user_defined1 = #{userDefined1}, + user_defined2 = #{userDefined2}, + user_defined3 = #{userDefined3}, + user_defined4 = #{userDefined4}, + user_defined5 = #{userDefined5}, + user_defined6 = #{userDefined6}, + user_defined7 = #{userDefined7}, + user_defined8 = #{userDefined8}, + user_defined9 = #{userDefined9}, + user_defined10 = #{userDefined10}, + create_by = #{createBy}, + gmt_create = #{gmtCreate}, + last_modified_by = #{lastModifiedBy}, + gmt_modified = #{gmtModified}, + active_flag = #{activeFlag}, + factory_code = #{factoryCode}, + sap_factory_code = #{sapFactoryCode}, + wl_name = #{wlName}, + del_flag = #{delFlag}, + spare_use_life = #{spareUseLife}, + spare_name = #{spareName}, + spare_mode = #{spareMode}, + spare_manufacturer = #{spareManufacturer}, + spare_supplier = #{spareSupplier}, + spare_replacement_cycle = #{spareReplacementCycle}, + spare_measurement_unit = #{spareMeasurementUnit}, + spare_conversion_unit = #{spareConversionUnit}, + spare_conversion_ratio = #{spareConversionRatio}, + spare_inventory_floor = #{spareInventoryFloor}, + spare_inventory_upper = #{spareInventoryUpper}, + spare_type = #{spareType}, + + where storage_id = #{storageId} + + + + delete from wms_ods_mate_storage_news where storage_id = #{storageId} + + + + delete from wms_ods_mate_storage_news where storage_id in + + #{storageId} + + + \ No newline at end of file diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java index 716b708b..8b5c90ac 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java @@ -4,18 +4,19 @@ import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDate; -import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.*; +import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; - +import com.op.common.core.domain.ExcelCol; import com.op.common.core.utils.DateUtils; +import com.op.common.core.utils.poi.ExcelMapUtil; import com.op.common.core.utils.uuid.IdUtils; import com.op.mes.domain.*; import com.op.mes.domain.dto.LineChartDto; import com.op.mes.domain.dto.SysFactoryDto; -import com.op.mes.mapper.MesReportWorkMapper; import org.apache.commons.lang.StringUtils; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -196,7 +197,7 @@ public class MesReportWorkController extends BaseController { */ @RequiresPermissions("mes:hourProduction:list") @GetMapping("/getHourProductionTitle") - public List getProcessFinishList(MesHourReport mesHourReport) { + public List getHourProductionTitle(MesHourReport mesHourReport) { //默认时间范围T 00:00:00~T+1 00:00:00 if(StringUtils.isEmpty(mesHourReport.getProductDateStart())){ mesHourReport.setProductDateStart(DateUtils.getDate()+" 00:00:00");//start @@ -210,8 +211,20 @@ public class MesReportWorkController extends BaseController { List dayHours = new ArrayList(); DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH"); try { - Date start = dateFormat.parse(mesHourReport.getProductDateStart()); - Date end = dateFormat.parse(mesHourReport.getProductDateEnd()); + + Date start = dateFormat.parse(mesHourReport.getProductDateStart());//开始 + Date end = dateFormat.parse(mesHourReport.getProductDateEnd());//结束 + + //如果有分钟数,默认加一小时 + String endTimeStr1 = mesHourReport.getProductDateEnd(); + String[] endTime2 = endTimeStr1.split(" "); + String endTime3 = endTime2[1].split(":")[1]; + if(Integer.parseInt(endTime3)!=0){ + Calendar calendar = Calendar.getInstance(); + calendar.setTime(end); + calendar.add(Calendar.HOUR_OF_DAY, 1); + end = calendar.getTime(); + } Calendar tempStart = Calendar.getInstance(); tempStart.setTime(start); @@ -228,18 +241,68 @@ public class MesReportWorkController extends BaseController { return dayHours; } + + /** + * 获取班次信息list + * + * @return + */ + @GetMapping("/getProShifts") + public AjaxResult getProShifts() { + return success(mesReportWorkService.getProShifts()); + } + /** * 小时产量数据体 */ @RequiresPermissions("mes:hourProduction:list") @GetMapping("/getHourProductionList") public List getHourProductionList(MesHourReport mesHourReport) { - List hourNames = this.getProcessFinishList(mesHourReport); + List hourNames = this.getHourProductionTitle(mesHourReport); mesHourReport.setHourNames(hourNames); List list = mesReportWorkService.getHourProductionList(mesHourReport); return list; } + @RequiresPermissions("mes:hourProduction:list") + @PostMapping("/getHourProductionExport") + public void getHourProductionExport(HttpServletResponse response,MesHourReport mesHourReport) { + List hourNames = this.getHourProductionTitle(mesHourReport); + mesHourReport.setHourNames(hourNames); + List list = mesReportWorkService.getHourProductionList(mesHourReport); + + //表格结构数据 + String title = "表主标题"; + ArrayList excelCols = new ArrayList<>(); + excelCols.add(new ExcelCol("设备编码","equCode",20)); + excelCols.add(new ExcelCol("设备名称","equName",20)); + excelCols.add(new ExcelCol("设备总产量","quantity",20)); + + for(int n = 0;n lgdtos) { if(CollectionUtils.isEmpty(lgdtos)){ diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesHourReport.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesHourReport.java index 9a5d0750..4fb23bda 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesHourReport.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesHourReport.java @@ -28,6 +28,15 @@ public class MesHourReport extends BaseEntity { private String workorderCode; private List hourNames; private String equCodeHour; + private String shiftId; + + public String getShiftId() { + return shiftId; + } + + public void setShiftId(String shiftId) { + this.shiftId = shiftId; + } public String getEquCodeHour() { return equCodeHour; diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesProcessReport.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesProcessReport.java index 56edadb9..ab8e26ee 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesProcessReport.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesProcessReport.java @@ -46,6 +46,15 @@ public class MesProcessReport extends BaseEntity { private String unit; private String productDateStart; private String productDateEnd; + private String shiftId; + + public String getShiftId() { + return shiftId; + } + + public void setShiftId(String shiftId) { + this.shiftId = shiftId; + } public String getEquCode() { return equCode; diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesShift.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesShift.java new file mode 100644 index 00000000..f10d8353 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesShift.java @@ -0,0 +1,39 @@ +package com.op.mes.domain; + +//班次实体类 +public class MesShift { + private Integer shiftId; + private String shiftDesc; + + @Override + public String toString() { + return "ProShift{" + + "shiftId=" + shiftId + + ", shiftDesc='" + shiftDesc + '\'' + + '}'; + } + + public Integer getShiftId() { + return shiftId; + } + + public void setShiftId(Integer shiftId) { + this.shiftId = shiftId; + } + + public String getShiftDesc() { + return shiftDesc; + } + + public void setShiftDesc(String shiftDesc) { + this.shiftDesc = shiftDesc; + } + + public MesShift(Integer shiftId, String shiftDesc) { + this.shiftId = shiftId; + this.shiftDesc = shiftDesc; + } + + public MesShift() { + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java index c8f777df..0a15f017 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java @@ -85,4 +85,6 @@ public interface MesReportWorkMapper { Map getHourProductionList(MesHourReport mesHourReport); List getEquNames(MesHourReport mesHourReport); + + List selectProShift(); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java index 4583c09e..3a358882 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorkService.java @@ -75,4 +75,6 @@ public interface IMesReportWorkService { LineChartDto getLineChartData(MesReportProduction mesReportProduction); List getHourProductionList(MesHourReport mesHourReport); + + List getProShifts(); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java index a58c50d7..58062566 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/IWCInterfaceServiceImpl.java @@ -150,7 +150,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService { List totals = null; List everys = null; if("equ_type_lg".equals(boardDTO.getEquTypeCode())){//equ_type_lg 湿料罐 - boardDTO.setYmd(boardDTO.getYmd().replace("-","")); + totals = mesMapper.getTotalNumL(boardDTO); everys = mesMapper.getEveryNumL(boardDTO); }else{//成型机、烘房、收坯机 @@ -158,7 +158,6 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService { everys = mesMapper.getEveryNum(boardDTO); } - boardMap.put("totalNum", totals); boardMap.put("everyNum", everys); return boardMap; diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java index ebd15a20..13963b84 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java @@ -289,6 +289,16 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { return days; } + /** + * 获取班次信息list + * @return + */ + @Override + @DS("#header.poolName") + public List getProShifts() { + return mesReportWorkMapper.selectProShift(); + } + public static void main(String[] args) { Calendar calendar = Calendar.getInstance(); Date now = calendar.getTime(); diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml index 04cd7632..f08736df 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml @@ -116,23 +116,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select count(0) totalNum, equ.equipment_type_code equTypeCode, equ.equipment_type_name equTypeName - from pro_lg_used_log mt - left join base_equipment equ on mt.device_code = equ.equipment_code - where mt.createDate = #{ymd} and equ.equipment_name is not null - and equ.equipment_type_code = #{equTypeCode} + from mes_material_transfer_result mt + left join base_equipment equ on mt.equipmentCode = equ.equipment_code + where CONVERT(varchar(10),mt.create_time, 120) = #{ymd} and equ.equipment_name is not null + and equ.equipment_type_code = #{equTypeCode} and mt.status = 2 group by equ.equipment_type_code, equ.equipment_type_name diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index 61c3a72d..1d1c7b47 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -105,6 +105,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join pro_order_workorder pow on pow.workorder_id = mt.OrderCode left join pro_process ps on ps.process_id = mt.now_process_id where pow.order_code is not null + + and pow.shift_id = #{shiftId} + and pow.order_code like concat('%', #{orderCode}, '%') @@ -255,6 +258,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where 1=1 and CONVERT(varchar(30),mt.update_time, 120) >= #{productDateStart} and #{productDateEnd} > CONVERT(varchar(30),mt.update_time, 120) + + and pow.shift_id = #{shiftId} + and pow.order_code like concat('%', #{orderCode}, '%') @@ -297,7 +303,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join base_equipment equ on mt.equipmentCode = equ.equipment_code left join pro_order_workorder pow on pow.workorder_id = mt.OrderCode where pow.order_code is not null - + + and pow.shift_id = #{shiftId} + and pow.order_code like concat('%', #{orderCode}, '%') @@ -318,6 +326,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt.equipmentCode, equ.equipment_name + insert into mes_report_work diff --git a/op-modules/op-sap/push-sap.bat b/op-modules/op-sap/push-sap.bat index bbf63610..81d7c058 100644 --- a/op-modules/op-sap/push-sap.bat +++ b/op-modules/op-sap/push-sap.bat @@ -27,7 +27,8 @@ if exist %df% ( del /f /s /q .\Dockerfile ) echo --------------------------------Dockerfile-------------------------------- -echo FROM 192.168.202.36:30002/library/openjdk:8u131-jdk-alpine >> Dockerfile +echo FROM 192.168.202.36:30002/library/openjdk:8-sw66>> Dockerfile +::echo RUN apk add libuuid libuuid-devel >> Dockerfile echo ADD libsapjco3.so /usr/lib/libsapjco3.so >> Dockerfile echo ADD sapjco3.jar /usr/lib/sapjco3.jar >> Dockerfile echo RUN chmod a+x -R /usr/lib/libsapjco3.so >> Dockerfile @@ -37,7 +38,7 @@ echo RUN echo "Asia/Shanghai" ^> /etc/timezone >> Dockerfile echo CMD ["java", "-jar", "-Dspring.profiles.active=%profile%", "application.jar"] >> Dockerfile dir echo --------------------------------docker login...------------------------------- -docker login 192.168.202.36:30002 -u deploy -p Deploy@2023 +docker login 192.168.202.36:30002 -u admin -p Harbor@2023 echo --------------------------------docker build...------------------------------- docker build -t %imageURI%:%imageVersion% . echo --------------------------------docker push...--------------------------------