Merge remote-tracking branch 'origin/master'

master
shaoyong 2 years ago
commit b47919426d

@ -0,0 +1,11 @@
#for test only!
#Tue Oct 17 09:57:19 CST 2023
jco.destination.pool_capacity=true
jco.client.lang=zh
jco.client.ashost=192.168.0.53
jco.client.saprouter=
jco.client.user=MES
jco.client.sysnr=0
jco.destination.peak_limit=20
jco.client.passwd=123456
jco.client.client=800

@ -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;
}
}

@ -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 <T> SXSSFWorkbook initWorkbook(String sheetName , String title , List<ExcelCol> excelCol , List<T> 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<T> 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());
}
}
}

@ -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

@ -0,0 +1,134 @@
package com.op.device.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.EquPlanEqu;
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.EquPlan;
import com.op.device.service.IEquPlanService;
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-16
*/
@RestController
@RequestMapping("/plan")
public class EquPlanController extends BaseController {
@Autowired
private IEquPlanService equPlanService;
/**
* list
*
* @return
*/
@GetMapping("/getPersonList")
public AjaxResult getPersonList() {
return equPlanService.getPersonList();
}
/**
* -
*
* @param equPlanEquList
* @return
*/
@PostMapping("/formatEquItem")
public AjaxResult formatEquItem(@RequestBody List<EquPlanEqu> equPlanEquList) {
return equPlanService.formatEquItem(equPlanEquList);
}
/**
* list
* @param equEquipment
* @return
*/
@RequiresPermissions("device:plan:list")
@GetMapping("/getEquList")
public TableDataInfo getEquList(EquEquipment equEquipment) {
startPage();
List<EquEquipment> list = equPlanService.getEquList(equEquipment);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("device:plan:list")
@GetMapping("/list")
public TableDataInfo list(EquPlan equPlan) {
startPage();
List<EquPlan> list = equPlanService.selectEquPlanList(equPlan);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("device:plan:export")
@Log(title = "计划", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquPlan equPlan) {
List<EquPlan> list = equPlanService.selectEquPlanList(equPlan);
ExcelUtil<EquPlan> util = new ExcelUtil<EquPlan>(EquPlan.class);
util.exportExcel(response, list, "计划数据");
}
/**
*
*/
@RequiresPermissions("device:plan:query")
@GetMapping(value = "/{planId}")
public AjaxResult getInfo(@PathVariable("planId") String planId) {
return success(equPlanService.selectEquPlanByPlanId(planId));
}
/**
*
*/
@RequiresPermissions("device:plan:add")
@Log(title = "计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquPlan equPlan) {
return equPlanService.insertEquPlan(equPlan);
}
/**
*
*/
@RequiresPermissions("device:plan:edit")
@Log(title = "计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquPlan equPlan) {
return toAjax(equPlanService.updateEquPlan(equPlan));
}
/**
*
*/
@RequiresPermissions("device:plan:remove")
@Log(title = "计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{planIds}")
public AjaxResult remove(@PathVariable String[] planIds) {
return toAjax(equPlanService.deleteEquPlanByPlanIds(planIds));
}
}

@ -0,0 +1,110 @@
package com.op.device.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.device.domain.EquEquipment;
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.EquRepairOrder;
import com.op.device.service.IEquRepairOrderService;
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-16
*/
@RestController
@RequestMapping("/faultReport")
public class EquRepairOrderController extends BaseController {
@Autowired
private IEquRepairOrderService equRepairOrderService;
/**
*
*/
@RequiresPermissions("device:faultReport:list")
@GetMapping("/list")
public TableDataInfo list(EquRepairOrder equRepairOrder) {
startPage();
List<EquRepairOrder> list = equRepairOrderService.selectEquRepairOrderList(equRepairOrder);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("device:faultReport:export")
@Log(title = "故障报修", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquRepairOrder equRepairOrder) {
List<EquRepairOrder> list = equRepairOrderService.selectEquRepairOrderList(equRepairOrder);
ExcelUtil<EquRepairOrder> util = new ExcelUtil<EquRepairOrder>(EquRepairOrder.class);
util.exportExcel(response, list, "故障报修数据");
}
/**
*
*/
@RequiresPermissions("device:faultReport:query")
@GetMapping(value = "/{orderId}")
public AjaxResult getInfo(@PathVariable("orderId") String orderId) {
return success(equRepairOrderService.selectEquRepairOrderByOrderId(orderId));
}
/**
*
*/
@RequiresPermissions("device:faultReport:add")
@Log(title = "故障报修", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquRepairOrder equRepairOrder) {
return toAjax(equRepairOrderService.insertEquRepairOrder(equRepairOrder));
}
/**
*
*/
@RequiresPermissions("device:faultReport:edit")
@Log(title = "故障报修", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquRepairOrder equRepairOrder) {
return toAjax(equRepairOrderService.updateEquRepairOrder(equRepairOrder));
}
/**
*
*/
@RequiresPermissions("device:faultReport:remove")
@Log(title = "故障报修", businessType = BusinessType.DELETE)
@DeleteMapping("/{orderIds}")
public AjaxResult remove(@PathVariable String[] orderIds) {
return toAjax(equRepairOrderService.deleteEquRepairOrderByOrderIds(orderIds));
}
/**
*
*/
@GetMapping("/getEquipmentList")
public TableDataInfo getEquipmentList(EquEquipment equEquipment) {
startPage();
List<EquEquipment> list = equRepairOrderService.selectEquEquipmentList(equEquipment);
return getDataTable(list);
}
}

@ -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.EquSpareApply;
import com.op.device.service.IEquSpareApplyService;
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("/sparePartsApplicationRecord")
public class EquSpareApplyController extends BaseController {
@Autowired
private IEquSpareApplyService equSpareApplyService;
/**
*
*/
@RequiresPermissions("device:sparePartsApplicationRecord:list")
@GetMapping("/list")
public TableDataInfo list(EquSpareApply equSpareApply) {
startPage();
List<EquSpareApply> list = equSpareApplyService.selectEquSpareApplyList(equSpareApply);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("device:sparePartsApplicationRecord:export")
@Log(title = "申领记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquSpareApply equSpareApply) {
List<EquSpareApply> list = equSpareApplyService.selectEquSpareApplyList(equSpareApply);
ExcelUtil<EquSpareApply> util = new ExcelUtil<EquSpareApply>(EquSpareApply.class);
util.exportExcel(response, list, "申领记录数据");
}
/**
*
*/
@RequiresPermissions("device:sparePartsApplicationRecord:query")
@GetMapping(value = "/{applyId}")
public AjaxResult getInfo(@PathVariable("applyId") String applyId) {
return success(equSpareApplyService.selectEquSpareApplyByApplyId(applyId));
}
/**
*
*/
@RequiresPermissions("device:sparePartsApplicationRecord:add")
@Log(title = "申领记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquSpareApply equSpareApply) {
return toAjax(equSpareApplyService.insertEquSpareApply(equSpareApply));
}
/**
*
*/
@RequiresPermissions("device:sparePartsApplicationRecord:edit")
@Log(title = "申领记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquSpareApply equSpareApply) {
return toAjax(equSpareApplyService.updateEquSpareApply(equSpareApply));
}
/**
*
*/
@RequiresPermissions("device:sparePartsApplicationRecord:remove")
@Log(title = "申领记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{applyIds}")
public AjaxResult remove(@PathVariable String[] applyIds) {
return toAjax(equSpareApplyService.deleteEquSpareApplyByApplyIds(applyIds));
}
}

@ -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<SparePartsInStorage> 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<SparePartsInStorage> list = sparePartsInOutStorageService.selectSparePartsInStorageList(sparePartsInStorage);
ExcelUtil<SparePartsInStorage> util = new ExcelUtil<SparePartsInStorage>(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));
}
}

@ -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<SparePartsLedger> 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<SparePartsLedger> list = sparePartsLedgerService.selectSparePartsLedgerList(sparePartsLedger);
ExcelUtil<SparePartsLedger> util = new ExcelUtil<SparePartsLedger>(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));
}
}

@ -95,6 +95,16 @@ public class EquCheckItem extends BaseEntity {
// 更新日期结束
private String updateTimeEnd;
private List<EquCheckItemDetail> equCheckItemDetailList;
public List<EquCheckItemDetail> getEquCheckItemDetailList() {
return equCheckItemDetailList;
}
public void setEquCheckItemDetailList(List<EquCheckItemDetail> equCheckItemDetailList) {
this.equCheckItemDetailList = equCheckItemDetailList;
}
public List<Date> getUpdateTimeArray() {
return updateTimeArray;
}

@ -85,6 +85,36 @@ public class EquCheckItemDetail extends BaseEntity {
@Excel(name = "详情编码")
private String detailCode;
private Boolean showFlag;
private String standardTypeName;
private String itemName;
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getStandardTypeName() {
return standardTypeName;
}
public void setStandardTypeName(String standardTypeName) {
this.standardTypeName = standardTypeName;
}
public Boolean getShowFlag() {
return showFlag;
}
public void setShowFlag(Boolean showFlag) {
this.showFlag = showFlag;
}
public String getDetailCode() {
return detailCode;
}

@ -0,0 +1,448 @@
package com.op.device.domain;
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;
/**
* base_equipment
*
* @author Open Platform
* @date 2023-10-17
*/
public class EquEquipment extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 设备ID */
private Long equipmentId;
/** 设备编码 */
@Excel(name = "设备编码")
private String equipmentCode;
/** 设备名称 */
@Excel(name = "设备名称")
private String equipmentName;
/** 品牌 */
@Excel(name = "品牌")
private String equipmentBrand;
/** 规格型号 */
@Excel(name = "规格型号")
private String equipmentSpec;
/** 设备类型ID */
@Excel(name = "设备类型ID")
private Long equipmentTypeId;
/** 设备类型编码 */
@Excel(name = "设备类型编码")
private String equipmentTypeCode;
/** 设备类型名称 */
@Excel(name = "设备类型名称")
private String equipmentTypeName;
/** 所属车间ID */
@Excel(name = "所属车间ID")
private Long workshopId;
/** 所属工作中心编码 */
@Excel(name = "所属工作中心编码")
private String workshopCode;
/** 所属工作中心名称 */
@Excel(name = "所属工作中心名称")
private String workshopName;
/** 设备状态,0异常 */
@Excel(name = "设备状态,0异常")
private String status;
/** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1;
/** 预留字段2 */
@Excel(name = "预留字段2")
private String attr2;
/** 预留字段3 */
@Excel(name = "预留字段3")
private Long attr3;
/** 预留字段4 */
@Excel(name = "预留字段4")
private Long attr4;
/** 工段 */
@Excel(name = "工段")
private String workshopSection;
/** 设备位置 */
@Excel(name = "设备位置")
private String equipmentLocation;
/** 工时单价 */
@Excel(name = "工时单价")
private Long hourlyUnitPrice;
/** 设备条码 */
@Excel(name = "设备条码")
private String equipmentBarcode;
/** 设备条码图片 */
@Excel(name = "设备条码图片")
private String equipmentBarcodeImage;
/** 生产厂商 */
@Excel(name = "生产厂商")
private String manufacturer;
/** 供应商 */
@Excel(name = "供应商")
private String supplier;
/** 使用寿命 */
@Excel(name = "使用寿命")
private String useLife;
/** 购买时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "购买时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date buyTime;
/** 资产原值 */
@Excel(name = "资产原值")
private String assetOriginalValue;
/** 资产净值 */
@Excel(name = "资产净值")
private String netAssetValue;
/** 资产负责人 */
@Excel(name = "资产负责人")
private String assetHead;
/** 固定资产编码 */
@Excel(name = "固定资产编码")
private String fixedAssetCode;
/** 部门 */
@Excel(name = "部门")
private String department;
/** 单台能力工时 */
@Excel(name = "单台能力工时")
private String unitWorkingHours;
/** PLCIP */
@Excel(name = "PLCIP")
private String plcIp;
/** PLC端口 */
@Excel(name = "PLC端口")
private Long plcPort;
/** 删除标志1删除,0正常 */
private String delFlag;
/** SAP资产号 */
@Excel(name = "SAP资产号")
private String sapAsset;
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public Long getEquipmentId() {
return equipmentId;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentBrand(String equipmentBrand) {
this.equipmentBrand = equipmentBrand;
}
public String getEquipmentBrand() {
return equipmentBrand;
}
public void setEquipmentSpec(String equipmentSpec) {
this.equipmentSpec = equipmentSpec;
}
public String getEquipmentSpec() {
return equipmentSpec;
}
public void setEquipmentTypeId(Long equipmentTypeId) {
this.equipmentTypeId = equipmentTypeId;
}
public Long getEquipmentTypeId() {
return equipmentTypeId;
}
public void setEquipmentTypeCode(String equipmentTypeCode) {
this.equipmentTypeCode = equipmentTypeCode;
}
public String getEquipmentTypeCode() {
return equipmentTypeCode;
}
public void setEquipmentTypeName(String equipmentTypeName) {
this.equipmentTypeName = equipmentTypeName;
}
public String getEquipmentTypeName() {
return equipmentTypeName;
}
public void setWorkshopId(Long workshopId) {
this.workshopId = workshopId;
}
public Long getWorkshopId() {
return workshopId;
}
public void setWorkshopCode(String workshopCode) {
this.workshopCode = workshopCode;
}
public String getWorkshopCode() {
return workshopCode;
}
public void setWorkshopName(String workshopName) {
this.workshopName = workshopName;
}
public String getWorkshopName() {
return workshopName;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(Long attr3) {
this.attr3 = attr3;
}
public Long getAttr3() {
return attr3;
}
public void setAttr4(Long attr4) {
this.attr4 = attr4;
}
public Long getAttr4() {
return attr4;
}
public void setWorkshopSection(String workshopSection) {
this.workshopSection = workshopSection;
}
public String getWorkshopSection() {
return workshopSection;
}
public void setEquipmentLocation(String equipmentLocation) {
this.equipmentLocation = equipmentLocation;
}
public String getEquipmentLocation() {
return equipmentLocation;
}
public void setHourlyUnitPrice(Long hourlyUnitPrice) {
this.hourlyUnitPrice = hourlyUnitPrice;
}
public Long getHourlyUnitPrice() {
return hourlyUnitPrice;
}
public void setEquipmentBarcode(String equipmentBarcode) {
this.equipmentBarcode = equipmentBarcode;
}
public String getEquipmentBarcode() {
return equipmentBarcode;
}
public void setEquipmentBarcodeImage(String equipmentBarcodeImage) {
this.equipmentBarcodeImage = equipmentBarcodeImage;
}
public String getEquipmentBarcodeImage() {
return equipmentBarcodeImage;
}
public void setManufacturer(String manufacturer) {
this.manufacturer = manufacturer;
}
public String getManufacturer() {
return manufacturer;
}
public void setSupplier(String supplier) {
this.supplier = supplier;
}
public String getSupplier() {
return supplier;
}
public void setUseLife(String useLife) {
this.useLife = useLife;
}
public String getUseLife() {
return useLife;
}
public void setBuyTime(Date buyTime) {
this.buyTime = buyTime;
}
public Date getBuyTime() {
return buyTime;
}
public void setAssetOriginalValue(String assetOriginalValue) {
this.assetOriginalValue = assetOriginalValue;
}
public String getAssetOriginalValue() {
return assetOriginalValue;
}
public void setNetAssetValue(String netAssetValue) {
this.netAssetValue = netAssetValue;
}
public String getNetAssetValue() {
return netAssetValue;
}
public void setAssetHead(String assetHead) {
this.assetHead = assetHead;
}
public String getAssetHead() {
return assetHead;
}
public void setFixedAssetCode(String fixedAssetCode) {
this.fixedAssetCode = fixedAssetCode;
}
public String getFixedAssetCode() {
return fixedAssetCode;
}
public void setDepartment(String department) {
this.department = department;
}
public String getDepartment() {
return department;
}
public void setUnitWorkingHours(String unitWorkingHours) {
this.unitWorkingHours = unitWorkingHours;
}
public String getUnitWorkingHours() {
return unitWorkingHours;
}
public void setPlcIp(String plcIp) {
this.plcIp = plcIp;
}
public String getPlcIp() {
return plcIp;
}
public void setPlcPort(Long plcPort) {
this.plcPort = plcPort;
}
public Long getPlcPort() {
return plcPort;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public void setSapAsset(String sapAsset) {
this.sapAsset = sapAsset;
}
public String getSapAsset() {
return sapAsset;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("equipmentId", getEquipmentId())
.append("equipmentCode", getEquipmentCode())
.append("equipmentName", getEquipmentName())
.append("equipmentBrand", getEquipmentBrand())
.append("equipmentSpec", getEquipmentSpec())
.append("equipmentTypeId", getEquipmentTypeId())
.append("equipmentTypeCode", getEquipmentTypeCode())
.append("equipmentTypeName", getEquipmentTypeName())
.append("workshopId", getWorkshopId())
.append("workshopCode", getWorkshopCode())
.append("workshopName", getWorkshopName())
.append("status", getStatus())
.append("remark", getRemark())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("attr4", getAttr4())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("workshopSection", getWorkshopSection())
.append("equipmentLocation", getEquipmentLocation())
.append("hourlyUnitPrice", getHourlyUnitPrice())
.append("equipmentBarcode", getEquipmentBarcode())
.append("equipmentBarcodeImage", getEquipmentBarcodeImage())
.append("manufacturer", getManufacturer())
.append("supplier", getSupplier())
.append("useLife", getUseLife())
.append("buyTime", getBuyTime())
.append("assetOriginalValue", getAssetOriginalValue())
.append("netAssetValue", getNetAssetValue())
.append("assetHead", getAssetHead())
.append("fixedAssetCode", getFixedAssetCode())
.append("department", getDepartment())
.append("unitWorkingHours", getUnitWorkingHours())
.append("plcIp", getPlcIp())
.append("plcPort", getPlcPort())
.append("delFlag", getDelFlag())
.append("sapAsset", getSapAsset())
.toString();
}
}

@ -0,0 +1,394 @@
package com.op.device.domain;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.op.system.api.domain.SysUser;
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;
/**
* equ_plan
*
* @author Open Platform
* @date 2023-10-16
*/
public class EquPlan extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
private String planId;
/** 计划编码 */
@Excel(name = "计划编码")
private String planCode;
/** 计划名称 */
@Excel(name = "计划名称")
private String planName;
/** 车间 */
@Excel(name = "车间")
private String planWorkshop;
/** 产线 */
@Excel(name = "产线")
private String planProdLine;
/** 设备名称 */
@Excel(name = "设备名称")
private String equipmentName;
/** 设备编码 */
@Excel(name = "设备编码")
private String equipmentCode;
/** 循环周期 */
@Excel(name = "循环周期")
private String planLoop;
/** 循环周期类型 */
@Excel(name = "循环周期类型")
private String planLoopType;
/** 循环执行时间开始 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "循环执行时间开始", width = 30, dateFormat = "yyyy-MM-dd")
private Date planLoopStart;
/** 循环执行时间结束 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "循环执行时间结束", width = 30, dateFormat = "yyyy-MM-dd")
private Date planLoopEnd;
/** 巡检人员 */
@Excel(name = "巡检人员")
private String planPerson;
/** 计划状态 */
@Excel(name = "计划状态")
private String planStatus;
/** 是否可生产-限制 */
@Excel(name = "是否可生产-限制")
private String planRestrict;
/** 维护类型 */
@Excel(name = "维护类型")
private String planType;
/** 是否委外 */
@Excel(name = "是否委外")
private String planOutsource;
/** 委外工单编码 */
@Excel(name = "委外工单编码")
private String workCode;
/** 工厂 */
@Excel(name = "工厂")
private String factoryCode;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String attr1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String attr2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String attr3;
/** 删除标志 */
@Excel(name = "删除标志")
private String delFlag;
// 创建日期范围list
private List<Date> createTimeArray;
// 更新日期范围list
private List<Date> updateTimeArray;
// 更新日期开始
private String updateTimeStart;
// 更新日期结束
private String updateTimeEnd;
// 创建日期开始
private String createTimeStart;
// 创建日期结束
private String createTimeEnd;
// 关联-计划->设备list
private List<EquPlanEqu> equPlanEquList;
private List<EquPlanEqu> equipmentItem;
public List<EquPlanEqu> getEquipmentItem() {
return equipmentItem;
}
public void setEquipmentItem(List<EquPlanEqu> equipmentItem) {
this.equipmentItem = equipmentItem;
}
private List<SysUser> personList;
public List<SysUser> getPersonList() {
return personList;
}
public void setPersonList(List<SysUser> personList) {
this.personList = personList;
}
public List<EquPlanEqu> getEquPlanEquList() {
return equPlanEquList;
}
public void setEquPlanEquList(List<EquPlanEqu> equPlanEquList) {
this.equPlanEquList = equPlanEquList;
}
public List<Date> getCreateTimeArray() {
return createTimeArray;
}
public void setCreateTimeArray(List<Date> createTimeArray) {
this.createTimeArray = createTimeArray;
}
public List<Date> getUpdateTimeArray() {
return updateTimeArray;
}
public void setUpdateTimeArray(List<Date> updateTimeArray) {
this.updateTimeArray = updateTimeArray;
}
public String getUpdateTimeStart() {
return updateTimeStart;
}
public void setUpdateTimeStart(String updateTimeStart) {
this.updateTimeStart = updateTimeStart;
}
public String getUpdateTimeEnd() {
return updateTimeEnd;
}
public void setUpdateTimeEnd(String updateTimeEnd) {
this.updateTimeEnd = updateTimeEnd;
}
public String getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(String createTimeStart) {
this.createTimeStart = createTimeStart;
}
public String getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(String createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
public void setPlanId(String planId) {
this.planId = planId;
}
public String getPlanId() {
return planId;
}
public void setPlanCode(String planCode) {
this.planCode = planCode;
}
public String getPlanCode() {
return planCode;
}
public void setPlanName(String planName) {
this.planName = planName;
}
public String getPlanName() {
return planName;
}
public void setPlanWorkshop(String planWorkshop) {
this.planWorkshop = planWorkshop;
}
public String getPlanWorkshop() {
return planWorkshop;
}
public void setPlanProdLine(String planProdLine) {
this.planProdLine = planProdLine;
}
public String getPlanProdLine() {
return planProdLine;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setPlanLoop(String planLoop) {
this.planLoop = planLoop;
}
public String getPlanLoop() {
return planLoop;
}
public void setPlanLoopType(String planLoopType) {
this.planLoopType = planLoopType;
}
public String getPlanLoopType() {
return planLoopType;
}
public void setPlanLoopStart(Date planLoopStart) {
this.planLoopStart = planLoopStart;
}
public Date getPlanLoopStart() {
return planLoopStart;
}
public void setPlanLoopEnd(Date planLoopEnd) {
this.planLoopEnd = planLoopEnd;
}
public Date getPlanLoopEnd() {
return planLoopEnd;
}
public void setPlanPerson(String planPerson) {
this.planPerson = planPerson;
}
public String getPlanPerson() {
return planPerson;
}
public void setPlanStatus(String planStatus) {
this.planStatus = planStatus;
}
public String getPlanStatus() {
return planStatus;
}
public void setPlanRestrict(String planRestrict) {
this.planRestrict = planRestrict;
}
public String getPlanRestrict() {
return planRestrict;
}
public void setPlanType(String planType) {
this.planType = planType;
}
public String getPlanType() {
return planType;
}
public void setPlanOutsource(String planOutsource) {
this.planOutsource = planOutsource;
}
public String getPlanOutsource() {
return planOutsource;
}
public void setWorkCode(String workCode) {
this.workCode = workCode;
}
public String getWorkCode() {
return workCode;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("planId", getPlanId())
.append("planCode", getPlanCode())
.append("planName", getPlanName())
.append("planWorkshop", getPlanWorkshop())
.append("planProdLine", getPlanProdLine())
.append("equipmentName", getEquipmentName())
.append("equipmentCode", getEquipmentCode())
.append("planLoop", getPlanLoop())
.append("planLoopType", getPlanLoopType())
.append("planLoopStart", getPlanLoopStart())
.append("planLoopEnd", getPlanLoopEnd())
.append("planPerson", getPlanPerson())
.append("planStatus", getPlanStatus())
.append("planRestrict", getPlanRestrict())
.append("planType", getPlanType())
.append("planOutsource", getPlanOutsource())
.append("workCode", getWorkCode())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,218 @@
package com.op.device.domain;
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;
import java.util.List;
/**
* - equ_plan_detail
*
* @author Open Platform
* @date 2023-10-17
*/
public class EquPlanDetail extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
private String id;
/** 详情编码 */
@Excel(name = "详情编码")
private String code;
/** 计划id */
@Excel(name = "计划id")
private String planId;
/** 关联上级表单 */
@Excel(name = "关联上级表单")
private String parentCode;
/** 检查项编码 */
@Excel(name = "检查项编码")
private String itemCode;
/** 检查项名称 */
@Excel(name = "检查项名称")
private String itemName;
/** 检查项方法/工具 */
@Excel(name = "检查项方法/工具")
private String itemMethod;
/** 维护类型编码 */
@Excel(name = "维护类型编码")
private String itemType;
/** 维护类型名称 */
@Excel(name = "维护类型名称")
private String itemTypeName;
/** 检查项备注 */
@Excel(name = "检查项备注")
private String itemRemark;
/** 工厂 */
@Excel(name = "工厂")
private String factoryCode;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String attr1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String attr2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String attr3;
/** 删除标志 */
private String delFlag;
// 关联-检查项->检查详情list
private List<EquPlanStandard> equPlanStandardList;
public List<EquPlanStandard> getEquPlanStandardList() {
return equPlanStandardList;
}
public void setEquPlanStandardList(List<EquPlanStandard> equPlanStandardList) {
this.equPlanStandardList = equPlanStandardList;
}
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setCode(String code) {
this.code = code;
}
public String getCode() {
return code;
}
public void setPlanId(String planId) {
this.planId = planId;
}
public String getPlanId() {
return planId;
}
public void setParentCode(String parentCode) {
this.parentCode = parentCode;
}
public String getParentCode() {
return parentCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getItemCode() {
return itemCode;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getItemName() {
return itemName;
}
public void setItemMethod(String itemMethod) {
this.itemMethod = itemMethod;
}
public String getItemMethod() {
return itemMethod;
}
public void setItemType(String itemType) {
this.itemType = itemType;
}
public String getItemType() {
return itemType;
}
public void setItemTypeName(String itemTypeName) {
this.itemTypeName = itemTypeName;
}
public String getItemTypeName() {
return itemTypeName;
}
public void setItemRemark(String itemRemark) {
this.itemRemark = itemRemark;
}
public String getItemRemark() {
return itemRemark;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("code", getCode())
.append("planId", getPlanId())
.append("parentCode", getParentCode())
.append("itemCode", getItemCode())
.append("itemName", getItemName())
.append("itemMethod", getItemMethod())
.append("itemType", getItemType())
.append("itemTypeName", getItemTypeName())
.append("itemRemark", getItemRemark())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,178 @@
package com.op.device.domain;
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;
import java.util.List;
/**
* - equ_plan_equ
*
* @author Open Platform
* @date 2023-10-17
*/
public class EquPlanEqu extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
private String id;
/** 计划详情-设备编码 */
@Excel(name = "计划详情-设备编码")
private String code;
/** 关联上级表单 */
@Excel(name = "关联上级表单")
private String parentCode;
/** 设备编码 */
@Excel(name = "设备编码")
private String equipmentCode;
/** 设备名称 */
@Excel(name = "设备名称")
private String equipmentName;
/** 工厂 */
@Excel(name = "工厂")
private String factoryCode;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String attr1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String attr2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String attr3;
/** 删除标识 */
private String delFlag;
// 关联-设备->检查项list
private List<EquPlanDetail> equPlanDetailList;
private List<EquCheckItem> equCheckItemList;
private String itemTempName;
public String getItemTempName() {
return itemTempName;
}
public void setItemTempName(String itemTempName) {
this.itemTempName = itemTempName;
}
public List<EquCheckItem> getEquCheckItemList() {
return equCheckItemList;
}
public void setEquCheckItemList(List<EquCheckItem> equCheckItemList) {
this.equCheckItemList = equCheckItemList;
}
public List<EquPlanDetail> getEquPlanDetailList() {
return equPlanDetailList;
}
public void setEquPlanDetailList(List<EquPlanDetail> equPlanDetailList) {
this.equPlanDetailList = equPlanDetailList;
}
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setCode(String code) {
this.code = code;
}
public String getCode() {
return code;
}
public void setParentCode(String parentCode) {
this.parentCode = parentCode;
}
public String getParentCode() {
return parentCode;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentName() {
return equipmentName;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("code", getCode())
.append("parentCode", getParentCode())
.append("equipmentCode", getEquipmentCode())
.append("equipmentName", getEquipmentName())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,194 @@
package com.op.device.domain;
import java.math.BigDecimal;
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;
/**
* - equ_plan_standard
*
* @author Open Platform
* @date 2023-10-17
*/
public class EquPlanStandard extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
private String id;
/** 编码 */
@Excel(name = "编码")
private String code;
/** 关联上级表单 */
@Excel(name = "关联上级表单")
private String parentCode;
/** 检查项编码 */
@Excel(name = "检查项编码")
private String detailCode;
/** 标准类型 */
@Excel(name = "标准类型")
private String standardType;
/** 标准名称 */
@Excel(name = "标准名称")
private String standardName;
/** 上限 */
@Excel(name = "上限")
private BigDecimal detailUpLimit;
/** 下限 */
@Excel(name = "下限")
private BigDecimal detailDownLimit;
/** 单位 */
@Excel(name = "单位")
private String detailUnit;
/** 工厂 */
@Excel(name = "工厂")
private String factoryCode;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String attr1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String attr2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String attr3;
/** 删除标识 */
private String delFlag;
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public void setCode(String code) {
this.code = code;
}
public String getCode() {
return code;
}
public void setParentCode(String parentCode) {
this.parentCode = parentCode;
}
public String getParentCode() {
return parentCode;
}
public void setDetailCode(String detailCode) {
this.detailCode = detailCode;
}
public String getDetailCode() {
return detailCode;
}
public void setStandardType(String standardType) {
this.standardType = standardType;
}
public String getStandardType() {
return standardType;
}
public void setStandardName(String standardName) {
this.standardName = standardName;
}
public String getStandardName() {
return standardName;
}
public void setDetailUpLimit(BigDecimal detailUpLimit) {
this.detailUpLimit = detailUpLimit;
}
public BigDecimal getDetailUpLimit() {
return detailUpLimit;
}
public void setDetailDownLimit(BigDecimal detailDownLimit) {
this.detailDownLimit = detailDownLimit;
}
public BigDecimal getDetailDownLimit() {
return detailDownLimit;
}
public void setDetailUnit(String detailUnit) {
this.detailUnit = detailUnit;
}
public String getDetailUnit() {
return detailUnit;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("code", getCode())
.append("parentCode", getParentCode())
.append("detailCode", getDetailCode())
.append("standardType", getStandardType())
.append("standardName", getStandardName())
.append("detailUpLimit", getDetailUpLimit())
.append("detailDownLimit", getDetailDownLimit())
.append("detailUnit", getDetailUnit())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,244 @@
package com.op.device.domain;
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;
/**
* equ_repair_order
*
* @author Open Platform
* @date 2023-10-16
*/
public class EquRepairOrder extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
private String orderId;
/** 报修单号 */
@Excel(name = "报修单号")
private String orderCode;
/** 设备编码 */
@Excel(name = "设备编码")
private String equipmentCode;
/** 故障描述 */
@Excel(name = "故障描述")
private String orderDesc;
/** 故障时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "故障时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date orderBreakdownTime;
/** 报修来源 */
@Excel(name = "报修来源")
private String orderSource;
/** 报修时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "报修时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date orderTime;
/** 是否立即处理 */
@Excel(name = "是否立即处理")
private String orderHandle;
/** 报修人 */
@Excel(name = "报修人")
private String orderRepairman;
/** 联系方式 */
@Excel(name = "联系方式")
private String orderConnection;
/** 处理状态 */
@Excel(name = "处理状态")
private String orderStatus;
/** 关联计划 */
@Excel(name = "关联计划")
private String orderRelevance;
/** 故障图片 */
@Excel(name = "故障图片")
private String orderPicture;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String attr1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String attr2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String attr3;
/** 删除标志 */
private String delFlag;
/** 创建人 */
@Excel(name = "创建人")
private String craeteBy;
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getOrderId() {
return orderId;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getOrderCode() {
return orderCode;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setOrderDesc(String orderDesc) {
this.orderDesc = orderDesc;
}
public String getOrderDesc() {
return orderDesc;
}
public void setOrderBreakdownTime(Date orderBreakdownTime) {
this.orderBreakdownTime = orderBreakdownTime;
}
public Date getOrderBreakdownTime() {
return orderBreakdownTime;
}
public void setOrderSource(String orderSource) {
this.orderSource = orderSource;
}
public String getOrderSource() {
return orderSource;
}
public void setOrderTime(Date orderTime) {
this.orderTime = orderTime;
}
public Date getOrderTime() {
return orderTime;
}
public void setOrderHandle(String orderHandle) {
this.orderHandle = orderHandle;
}
public String getOrderHandle() {
return orderHandle;
}
public void setOrderRepairman(String orderRepairman) {
this.orderRepairman = orderRepairman;
}
public String getOrderRepairman() {
return orderRepairman;
}
public void setOrderConnection(String orderConnection) {
this.orderConnection = orderConnection;
}
public String getOrderConnection() {
return orderConnection;
}
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
public String getOrderStatus() {
return orderStatus;
}
public void setOrderRelevance(String orderRelevance) {
this.orderRelevance = orderRelevance;
}
public String getOrderRelevance() {
return orderRelevance;
}
public void setOrderPicture(String orderPicture) {
this.orderPicture = orderPicture;
}
public String getOrderPicture() {
return orderPicture;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public void setCraeteBy(String craeteBy) {
this.craeteBy = craeteBy;
}
public String getCraeteBy() {
return craeteBy;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("orderId", getOrderId())
.append("orderCode", getOrderCode())
.append("equipmentCode", getEquipmentCode())
.append("orderDesc", getOrderDesc())
.append("orderBreakdownTime", getOrderBreakdownTime())
.append("orderSource", getOrderSource())
.append("orderTime", getOrderTime())
.append("orderHandle", getOrderHandle())
.append("orderRepairman", getOrderRepairman())
.append("orderConnection", getOrderConnection())
.append("orderStatus", getOrderStatus())
.append("orderRelevance", getOrderRelevance())
.append("orderPicture", getOrderPicture())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("craeteBy", getCraeteBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,255 @@
package com.op.device.domain;
import java.util.Date;
import java.util.List;
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;
/**
* equ_spare_apply
*
* @author Open Platform
* @date 2023-10-17
*/
public class EquSpareApply extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键 */
private String applyId;
/** 出库单号 */
@Excel(name = "出库单号")
private String applyCode;
/** 备品备件编码 */
@Excel(name = "备品备件编码")
private String spareCode;
/** 备品备件名称 */
@Excel(name = "备品备件名称")
private String spareName;
/** 规格型号 */
@Excel(name = "规格型号")
private String spareModel;
/** 数量 */
@Excel(name = "数量")
private Long spareQuantity;
/** 使用组线 */
@Excel(name = "使用组线")
private String spareGroupLine;
/** 使用设备 */
@Excel(name = "使用设备")
private String spareUseEquipment;
/** 领用时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "领用时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
/** 申领人 */
@Excel(name = "申领人")
private String applyPeople;
/** 批准人 */
@Excel(name = "批准人")
private String applyApprovePeople;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String attr1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String attr2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String attr3;
/** 删除标志 */
private String delFlag;
/** 工厂号 */
@Excel(name = "工厂号")
private String factoryCode;
// 创建日期范围list
private List<Date> applyTimeArray;
// 创建日期开始
private String applyTimeStart;
// 创建日期结束
private String applyTimeEnd;
public List<Date> getApplyTimeArray() {
return applyTimeArray;
}
public void setApplyTimeArray(List<Date> applyTimeArray) {
this.applyTimeArray = applyTimeArray;
}
public String getApplyTimeStart() {
return applyTimeStart;
}
public void setApplyTimeStart(String createTimeStart) {
this.applyTimeStart = createTimeStart;
}
public String getApplyTimeEnd() {
return applyTimeEnd;
}
public void setApplyTimeEnd(String applyTimeEnd) {
this.applyTimeEnd = applyTimeEnd;
}
public void setApplyId(String applyId) {
this.applyId = applyId;
}
public String getApplyId() {
return applyId;
}
public void setApplyCode(String applyCode) {
this.applyCode = applyCode;
}
public String getApplyCode() {
return applyCode;
}
public void setSpareCode(String spareCode) {
this.spareCode = spareCode;
}
public String getSpareCode() {
return spareCode;
}
public void setSpareName(String spareName) {
this.spareName = spareName;
}
public String getSpareName() {
return spareName;
}
public void setSpareModel(String spareModel) {
this.spareModel = spareModel;
}
public String getSpareModel() {
return spareModel;
}
public void setSpareQuantity(Long spareQuantity) {
this.spareQuantity = spareQuantity;
}
public Long getSpareQuantity() {
return spareQuantity;
}
public void setSpareGroupLine(String spareGroupLine) {
this.spareGroupLine = spareGroupLine;
}
public String getSpareGroupLine() {
return spareGroupLine;
}
public void setSpareUseEquipment(String spareUseEquipment) {
this.spareUseEquipment = spareUseEquipment;
}
public String getSpareUseEquipment() {
return spareUseEquipment;
}
public void setApplyTime(Date applyTime) {
this.applyTime = applyTime;
}
public Date getApplyTime() {
return applyTime;
}
public void setApplyPeople(String applyPeople) {
this.applyPeople = applyPeople;
}
public String getApplyPeople() {
return applyPeople;
}
public void setApplyApprovePeople(String applyApprovePeople) {
this.applyApprovePeople = applyApprovePeople;
}
public String getApplyApprovePeople() {
return applyApprovePeople;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("applyId", getApplyId())
.append("applyCode", getApplyCode())
.append("spareCode", getSpareCode())
.append("spareName", getSpareName())
.append("spareModel", getSpareModel())
.append("spareQuantity", getSpareQuantity())
.append("spareGroupLine", getSpareGroupLine())
.append("spareUseEquipment", getSpareUseEquipment())
.append("applyTime", getApplyTime())
.append("applyPeople", getApplyPeople())
.append("applyApprovePeople", getApplyApprovePeople())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("factoryCode", getFactoryCode())
.toString();
}
}

@ -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();
}
}

@ -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();
}
}

@ -0,0 +1,342 @@
package com.op.device.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.op.system.api.domain.SysUser;
import java.util.Date;
import java.util.List;
// 巡检计划DTO
public class InspectionPlanDTO {
/** 主键 */
private String planId;
/** 计划编码 */
private String planCode;
/** 计划名称 */
private String planName;
/** 车间 */
private String planWorkshop;
/** 产线 */
private String planProdLine;
/** 设备名称 */
private String equipmentName;
/** 设备编码 */
private String equipmentCode;
/** 循环周期 */
private String planLoop;
/** 循环周期类型 */
private String planLoopType;
/** 循环执行时间开始 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date planLoopStart;
/** 循环执行时间结束 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date planLoopEnd;
/** 巡检人员 */
private String planPerson;
/** 计划状态 */
private String planStatus;
/** 是否可生产-限制 */
private String planRestrict;
/** 维护类型 */
private String planType;
/** 是否委外 */
private String planOutsource;
/** 委外工单编码 */
private String workCode;
/** 工厂 */
private String factoryCode;
/** 备用字段1 */
private String attr1;
/** 备用字段2 */
private String attr2;
/** 备用字段3 */
private String attr3;
/** 删除标志 */
private String delFlag;
// 创建日期范围list
private List<Date> createTimeArray;
// 更新日期范围list
private List<Date> updateTimeArray;
// 更新日期开始
private String updateTimeStart;
// 更新日期结束
private String updateTimeEnd;
// 创建日期开始
private String createTimeStart;
// 创建日期结束
private String createTimeEnd;
// 执行时间arr
private List<Date> planTimeArray;
// 人员list
private List<SysUser> personList;
public List<Date> getPlanTimeArray() {
return planTimeArray;
}
public void setPlanTimeArray(List<Date> planTimeArray) {
this.planTimeArray = planTimeArray;
}
public List<SysUser> getPersonList() {
return personList;
}
public void setPersonList(List<SysUser> personList) {
this.personList = personList;
}
public String getPlanId() {
return planId;
}
public void setPlanId(String planId) {
this.planId = planId;
}
public String getPlanCode() {
return planCode;
}
public void setPlanCode(String planCode) {
this.planCode = planCode;
}
public String getPlanName() {
return planName;
}
public void setPlanName(String planName) {
this.planName = planName;
}
public String getPlanWorkshop() {
return planWorkshop;
}
public void setPlanWorkshop(String planWorkshop) {
this.planWorkshop = planWorkshop;
}
public String getPlanProdLine() {
return planProdLine;
}
public void setPlanProdLine(String planProdLine) {
this.planProdLine = planProdLine;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getPlanLoop() {
return planLoop;
}
public void setPlanLoop(String planLoop) {
this.planLoop = planLoop;
}
public String getPlanLoopType() {
return planLoopType;
}
public void setPlanLoopType(String planLoopType) {
this.planLoopType = planLoopType;
}
public Date getPlanLoopStart() {
return planLoopStart;
}
public void setPlanLoopStart(Date planLoopStart) {
this.planLoopStart = planLoopStart;
}
public Date getPlanLoopEnd() {
return planLoopEnd;
}
public void setPlanLoopEnd(Date planLoopEnd) {
this.planLoopEnd = planLoopEnd;
}
public String getPlanPerson() {
return planPerson;
}
public void setPlanPerson(String planPerson) {
this.planPerson = planPerson;
}
public String getPlanStatus() {
return planStatus;
}
public void setPlanStatus(String planStatus) {
this.planStatus = planStatus;
}
public String getPlanRestrict() {
return planRestrict;
}
public void setPlanRestrict(String planRestrict) {
this.planRestrict = planRestrict;
}
public String getPlanType() {
return planType;
}
public void setPlanType(String planType) {
this.planType = planType;
}
public String getPlanOutsource() {
return planOutsource;
}
public void setPlanOutsource(String planOutsource) {
this.planOutsource = planOutsource;
}
public String getWorkCode() {
return workCode;
}
public void setWorkCode(String workCode) {
this.workCode = workCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getAttr1() {
return attr1;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr2() {
return attr2;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr3() {
return attr3;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public List<Date> getCreateTimeArray() {
return createTimeArray;
}
public void setCreateTimeArray(List<Date> createTimeArray) {
this.createTimeArray = createTimeArray;
}
public List<Date> getUpdateTimeArray() {
return updateTimeArray;
}
public void setUpdateTimeArray(List<Date> updateTimeArray) {
this.updateTimeArray = updateTimeArray;
}
public String getUpdateTimeStart() {
return updateTimeStart;
}
public void setUpdateTimeStart(String updateTimeStart) {
this.updateTimeStart = updateTimeStart;
}
public String getUpdateTimeEnd() {
return updateTimeEnd;
}
public void setUpdateTimeEnd(String updateTimeEnd) {
this.updateTimeEnd = updateTimeEnd;
}
public String getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(String createTimeStart) {
this.createTimeStart = createTimeStart;
}
public String getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(String createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
}

@ -0,0 +1,6 @@
package com.op.device.domain.vo;
// 巡检计划VO
public class InspectionPlanVO {
}

@ -84,4 +84,11 @@ public interface EquCheckItemDetailMapper {
* @param itemId
*/
void delEquCheckItemDetailByItemId(String itemId);
/**
* codelist
* @param itemCode
* @return
*/
List<EquCheckItemDetail> selectCheckItemDetailByItemCode(String itemCode);
}

@ -78,4 +78,11 @@ public interface EquCheckItemMapper {
* @return
*/
List<EquCheckItemVO> selectAllEquipmentList();
/**
* list
* @param equipmentCode
* @return
*/
List<EquCheckItem> selectCheckItemByEquipmentCode(String equipmentCode);
}

@ -0,0 +1,61 @@
package com.op.device.mapper;
import com.op.device.domain.EquEquipment;
import java.util.List;
/**
* Mapper
*
* @author Open Platform
* @date 2023-10-17
*/
public interface EquEquipmentMapper {
/**
*
*
* @param equipmentId
* @return
*/
public EquEquipment selectEquEquipmentByEquipmentId(Long equipmentId);
/**
*
*
* @param baseEquipment
* @return
*/
public List<EquEquipment> selectEquEquipmentList(EquEquipment baseEquipment);
/**
*
*
* @param baseEquipment
* @return
*/
public int insertEquEquipment(EquEquipment baseEquipment);
/**
*
*
* @param baseEquipment
* @return
*/
public int updateEquEquipment(EquEquipment baseEquipment);
/**
*
*
* @param equipmentId
* @return
*/
public int deleteEquEquipmentByEquipmentId(Long equipmentId);
/**
*
*
* @param equipmentIds
* @return
*/
public int deleteEquEquipmentByEquipmentIds(Long[] equipmentIds);
}

@ -0,0 +1,61 @@
package com.op.device.mapper;
import java.util.List;
import com.op.device.domain.EquPlanDetail;
/**
* -Mapper
*
* @author Open Platform
* @date 2023-10-17
*/
public interface EquPlanDetailMapper {
/**
* -
*
* @param id -
* @return -
*/
public EquPlanDetail selectEquPlanDetailById(String id);
/**
* -
*
* @param equPlanDetail -
* @return -
*/
public List<EquPlanDetail> selectEquPlanDetailList(EquPlanDetail equPlanDetail);
/**
* -
*
* @param equPlanDetail -
* @return
*/
public int insertEquPlanDetail(EquPlanDetail equPlanDetail);
/**
* -
*
* @param equPlanDetail -
* @return
*/
public int updateEquPlanDetail(EquPlanDetail equPlanDetail);
/**
* -
*
* @param id -
* @return
*/
public int deleteEquPlanDetailById(String id);
/**
* -
*
* @param ids
* @return
*/
public int deleteEquPlanDetailByIds(String[] ids);
}

@ -0,0 +1,61 @@
package com.op.device.mapper;
import java.util.List;
import com.op.device.domain.EquPlanEqu;
/**
* -Mapper
*
* @author Open Platform
* @date 2023-10-17
*/
public interface EquPlanEquMapper {
/**
* -
*
* @param id -
* @return -
*/
public EquPlanEqu selectEquPlanEquById(String id);
/**
* -
*
* @param equPlanEqu -
* @return -
*/
public List<EquPlanEqu> selectEquPlanEquList(EquPlanEqu equPlanEqu);
/**
* -
*
* @param equPlanEqu -
* @return
*/
public int insertEquPlanEqu(EquPlanEqu equPlanEqu);
/**
* -
*
* @param equPlanEqu -
* @return
*/
public int updateEquPlanEqu(EquPlanEqu equPlanEqu);
/**
* -
*
* @param id -
* @return
*/
public int deleteEquPlanEquById(String id);
/**
* -
*
* @param ids
* @return
*/
public int deleteEquPlanEquByIds(String[] ids);
}

@ -0,0 +1,65 @@
package com.op.device.mapper;
import java.util.List;
import com.op.device.domain.EquCheckItem;
import com.op.device.domain.EquCheckItemDetail;
import com.op.device.domain.EquPlan;
import com.op.device.domain.dto.InspectionPlanDTO;
import com.op.device.domain.vo.InspectionPlanVO;
/**
* Mapper
*
* @author Open Platform
* @date 2023-10-16
*/
public interface EquPlanMapper {
/**
*
*
* @param planId
* @return
*/
public EquPlan selectEquPlanByPlanId(String planId);
/**
*
*
* @param equPlan
* @return
*/
public List<EquPlan> selectEquPlanList(EquPlan equPlan);
/**
*
*
* @param equPlan
* @return
*/
public int insertEquPlan(EquPlan equPlan);
/**
*
*
* @param equPlan
* @return
*/
public int updateEquPlan(EquPlan equPlan);
/**
*
*
* @param planId
* @return
*/
public int deleteEquPlanByPlanId(String planId);
/**
*
*
* @param planIds
* @return
*/
public int deleteEquPlanByPlanIds(String[] planIds);
}

@ -0,0 +1,61 @@
package com.op.device.mapper;
import java.util.List;
import com.op.device.domain.EquPlanStandard;
/**
* -Mapper
*
* @author Open Platform
* @date 2023-10-17
*/
public interface EquPlanStandardMapper {
/**
* -
*
* @param id -
* @return -
*/
public EquPlanStandard selectEquPlanStandardById(String id);
/**
* -
*
* @param equPlanStandard -
* @return -
*/
public List<EquPlanStandard> selectEquPlanStandardList(EquPlanStandard equPlanStandard);
/**
* -
*
* @param equPlanStandard -
* @return
*/
public int insertEquPlanStandard(EquPlanStandard equPlanStandard);
/**
* -
*
* @param equPlanStandard -
* @return
*/
public int updateEquPlanStandard(EquPlanStandard equPlanStandard);
/**
* -
*
* @param id -
* @return
*/
public int deleteEquPlanStandardById(String id);
/**
* -
*
* @param ids
* @return
*/
public int deleteEquPlanStandardByIds(String[] ids);
}

@ -0,0 +1,60 @@
package com.op.device.mapper;
import java.util.List;
import com.op.device.domain.EquRepairOrder;
/**
* Mapper
*
* @author Open Platform
* @date 2023-10-16
*/
public interface EquRepairOrderMapper {
/**
*
*
* @param orderId
* @return
*/
public EquRepairOrder selectEquRepairOrderByOrderId(String orderId);
/**
*
*
* @param equRepairOrder
* @return
*/
public List<EquRepairOrder> selectEquRepairOrderList(EquRepairOrder equRepairOrder);
/**
*
*
* @param equRepairOrder
* @return
*/
public int insertEquRepairOrder(EquRepairOrder equRepairOrder);
/**
*
*
* @param equRepairOrder
* @return
*/
public int updateEquRepairOrder(EquRepairOrder equRepairOrder);
/**
*
*
* @param orderId
* @return
*/
public int deleteEquRepairOrderByOrderId(String orderId);
/**
*
*
* @param orderIds
* @return
*/
public int deleteEquRepairOrderByOrderIds(String[] orderIds);
}

@ -0,0 +1,61 @@
package com.op.device.mapper;
import java.util.List;
import com.op.device.domain.EquSpareApply;
/**
* Mapper
*
* @author Open Platform
* @date 2023-10-17
*/
public interface EquSpareApplyMapper {
/**
*
*
* @param applyId
* @return
*/
public EquSpareApply selectEquSpareApplyByApplyId(String applyId);
/**
*
*
* @param equSpareApply
* @return
*/
public List<EquSpareApply> selectEquSpareApplyList(EquSpareApply equSpareApply);
/**
*
*
* @param equSpareApply
* @return
*/
public int insertEquSpareApply(EquSpareApply equSpareApply);
/**
*
*
* @param equSpareApply
* @return
*/
public int updateEquSpareApply(EquSpareApply equSpareApply);
/**
*
*
* @param applyId
* @return
*/
public int deleteEquSpareApplyByApplyId(String applyId);
/**
*
*
* @param applyIds
* @return
*/
public int deleteEquSpareApplyByApplyIds(String[] applyIds);
}

@ -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<SparePartsInStorage> 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);
}

@ -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<SparePartsLedger> 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);
}

@ -0,0 +1,61 @@
package com.op.device.mapper;
import com.op.system.api.domain.SysUser;
import java.util.List;
/**
* Mapper
*
* @author Open Platform
* @date 2023-10-18
*/
public interface SysUserMapper {
/**
*
*
* @param userId
* @return
*/
public SysUser selectSysUserByUserId(Long userId);
/**
*
*
* @param sysUser
* @return
*/
public List<SysUser> selectSysUserList(SysUser sysUser);
/**
*
*
* @param sysUser
* @return
*/
public int insertSysUser(SysUser sysUser);
/**
*
*
* @param sysUser
* @return
*/
public int updateSysUser(SysUser sysUser);
/**
*
*
* @param userId
* @return
*/
public int deleteSysUserByUserId(Long userId);
/**
*
*
* @param userIds
* @return
*/
public int deleteSysUserByUserIds(Long[] userIds);
}

@ -0,0 +1,86 @@
package com.op.device.service;
import java.util.List;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.EquPlan;
import com.op.device.domain.EquPlanEqu;
import com.op.device.domain.dto.InspectionPlanDTO;
import com.op.device.domain.vo.InspectionPlanVO;
/**
* Service
*
* @author Open Platform
* @date 2023-10-16
*/
public interface IEquPlanService {
/**
*
*
* @param planId
* @return
*/
public EquPlan selectEquPlanByPlanId(String planId);
/**
*
*
* @param equPlan
* @return
*/
public List<EquPlan> selectEquPlanList(EquPlan equPlan);
/**
*
*
* @param equPlan
* @return
*/
public AjaxResult insertEquPlan(EquPlan equPlan);
/**
*
*
* @param equPlan
* @return
*/
public int updateEquPlan(EquPlan equPlan);
/**
*
*
* @param planIds
* @return
*/
public int deleteEquPlanByPlanIds(String[] planIds);
/**
*
*
* @param planId
* @return
*/
public int deleteEquPlanByPlanId(String planId);
/**
* list
* @param equEquipment
* @return
*/
List<EquEquipment> getEquList(EquEquipment equEquipment);
/**
* -
* @param equPlanEquList
* @return
*/
AjaxResult formatEquItem(List<EquPlanEqu> equPlanEquList);
/**
* list
* @return
*/
AjaxResult getPersonList();
}

@ -0,0 +1,71 @@
package com.op.device.service;
import java.util.List;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.EquRepairOrder;
/**
* Service
*
* @author Open Platform
* @date 2023-10-16
*/
public interface IEquRepairOrderService {
/**
*
*
* @param orderId
* @return
*/
public EquRepairOrder selectEquRepairOrderByOrderId(String orderId);
/**
*
*
* @param equRepairOrder
* @return
*/
public List<EquRepairOrder> selectEquRepairOrderList(EquRepairOrder equRepairOrder);
/**
*
*
* @param equRepairOrder
* @return
*/
public int insertEquRepairOrder(EquRepairOrder equRepairOrder);
/**
*
*
* @param equRepairOrder
* @return
*/
public int updateEquRepairOrder(EquRepairOrder equRepairOrder);
/**
*
*
* @param orderIds
* @return
*/
public int deleteEquRepairOrderByOrderIds(String[] orderIds);
/**
*
*
* @param orderId
* @return
*/
public int deleteEquRepairOrderByOrderId(String orderId);
/**
*
*
* @param equEquipment
* @return
*/
List<EquEquipment> selectEquEquipmentList(EquEquipment equEquipment);
}

@ -0,0 +1,60 @@
package com.op.device.service;
import java.util.List;
import com.op.device.domain.EquSpareApply;
/**
* Service
*
* @author Open Platform
* @date 2023-10-17
*/
public interface IEquSpareApplyService {
/**
*
*
* @param applyId
* @return
*/
public EquSpareApply selectEquSpareApplyByApplyId(String applyId);
/**
*
*
* @param equSpareApply
* @return
*/
public List<EquSpareApply> selectEquSpareApplyList(EquSpareApply equSpareApply);
/**
*
*
* @param equSpareApply
* @return
*/
public int insertEquSpareApply(EquSpareApply equSpareApply);
/**
*
*
* @param equSpareApply
* @return
*/
public int updateEquSpareApply(EquSpareApply equSpareApply);
/**
*
*
* @param applyIds
* @return
*/
public int deleteEquSpareApplyByApplyIds(String[] applyIds);
/**
*
*
* @param applyId
* @return
*/
public int deleteEquSpareApplyByApplyId(String applyId);
}

@ -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<SparePartsInStorage> 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);
}

@ -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<SparePartsLedger> 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);
}

@ -0,0 +1,185 @@
package com.op.device.service.impl;
import java.text.SimpleDateFormat;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.*;
import com.op.device.mapper.*;
import com.op.system.api.domain.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.device.service.IEquPlanService;
import static com.op.common.core.web.domain.AjaxResult.success;
/**
* Service
*
* @author Open Platform
* @date 2023-10-16
*/
@Service
public class EquPlanServiceImpl implements IEquPlanService {
@Autowired
private EquPlanMapper equPlanMapper;
@Autowired
private EquCheckItemMapper equCheckItemMapper;
@Autowired
private EquCheckItemDetailMapper equCheckItemDetailMapper;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
private EquEquipmentMapper equEquipmentMapper;
/**
*
*
* @param planId
* @return
*/
@Override
@DS("#header.poolName")
public EquPlan selectEquPlanByPlanId(String planId) {
return equPlanMapper.selectEquPlanByPlanId(planId);
}
/**
*
*
* @param equPlan
* @return
*/
@Override
@DS("#header.poolName")
public List<EquPlan> selectEquPlanList(EquPlan equPlan) {
if (equPlan.getCreateTimeArray() != null) {
// 设置创建日期开始和结束值
if (equPlan.getCreateTimeArray().size() == 2) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
equPlan.setCreateTimeStart(formatter.format(equPlan.getCreateTimeArray().get(0)));
equPlan.setCreateTimeEnd(formatter.format(equPlan.getCreateTimeArray().get(1)));
}
}
if (equPlan.getUpdateTimeArray() != null) {
// 设置更新日期开始和结束
if (equPlan.getUpdateTimeArray().size() == 2) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
equPlan.setUpdateTimeStart(formatter.format(equPlan.getUpdateTimeArray().get(0)));
equPlan.setUpdateTimeEnd(formatter.format(equPlan.getUpdateTimeArray().get(1)));
}
}
return equPlanMapper.selectEquPlanList(equPlan);
}
/**
*
*
* @param equPlan
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult insertEquPlan(EquPlan equPlan) {
equPlan.setCreateTime(DateUtils.getNowDate());
return success();
}
/**
*
*
* @param equPlan
* @return
*/
@Override
@DS("#header.poolName")
public int updateEquPlan(EquPlan equPlan) {
equPlan.setUpdateTime(DateUtils.getNowDate());
return equPlanMapper.updateEquPlan(equPlan);
}
/**
*
*
* @param planIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquPlanByPlanIds(String[] planIds) {
return equPlanMapper.deleteEquPlanByPlanIds(planIds);
}
/**
*
*
* @param planId
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquPlanByPlanId(String planId) {
return equPlanMapper.deleteEquPlanByPlanId(planId);
}
/**
* list
* @param equEquipment
* @return
*/
@Override
@DS("#header.poolName")
public List<EquEquipment> getEquList(EquEquipment equEquipment) {
return equEquipmentMapper.selectEquEquipmentList(equEquipment);
}
/**
* -
*
* @param equPlanEquList
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult formatEquItem(List<EquPlanEqu> equPlanEquList) {
for (EquPlanEqu data : equPlanEquList) {
StringBuilder itemTempName = new StringBuilder();
// 获取检查项list
List<EquCheckItem> equCheckItemList = equCheckItemMapper.selectCheckItemByEquipmentCode(data.getEquipmentCode());
if (equCheckItemList.size() > 0) {
for (EquCheckItem checkItem : equCheckItemList) {
if (!checkItem.getItemCode().isEmpty()) {
itemTempName.append(checkItem.getItemName()).append(",");
// 获取检查项详情list
List<EquCheckItemDetail> equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(checkItem.getItemCode());
if (equCheckItemList.size() > 0) {
for (EquCheckItemDetail detail : equCheckItemDetailList) {
detail.setShowFlag(true);
}
checkItem.setEquCheckItemDetailList(equCheckItemDetailList);
}
}
}
data.setEquCheckItemList(equCheckItemList);
data.setItemTempName(itemTempName.toString());
}
}
return success(equPlanEquList);
}
/**
* list
* @return
*/
@Override
@DS("#master")
public AjaxResult getPersonList() {
SysUser sysUser = new SysUser();
List<SysUser> personList = sysUserMapper.selectSysUserList(sysUser);
return success(personList);
}
}

@ -0,0 +1,114 @@
package com.op.device.service.impl;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.device.domain.EquEquipment;
import com.op.device.mapper.EquEquipmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.device.mapper.EquRepairOrderMapper;
import com.op.device.domain.EquRepairOrder;
import com.op.device.service.IEquRepairOrderService;
/**
* Service
*
* @author Open Platform
* @date 2023-10-16
*/
@Service
public class EquRepairOrderServiceImpl implements IEquRepairOrderService {
@Autowired
private EquRepairOrderMapper equRepairOrderMapper;
@Autowired
private EquEquipmentMapper equEquipmentMapper;
/**
*
*
* @param orderId
* @return
*/
@Override
@DS("#header.poolName")
public EquRepairOrder selectEquRepairOrderByOrderId(String orderId) {
return equRepairOrderMapper.selectEquRepairOrderByOrderId(orderId);
}
/**
*
*
* @param equRepairOrder
* @return
*/
@Override
@DS("#header.poolName")
public List<EquRepairOrder> selectEquRepairOrderList(EquRepairOrder equRepairOrder) {
return equRepairOrderMapper.selectEquRepairOrderList(equRepairOrder);
}
/**
*
*
* @param equRepairOrder
* @return
*/
@Override
@DS("#header.poolName")
public int insertEquRepairOrder(EquRepairOrder equRepairOrder) {
equRepairOrder.setCreateTime(DateUtils.getNowDate());
return equRepairOrderMapper.insertEquRepairOrder(equRepairOrder);
}
/**
*
*
* @param equRepairOrder
* @return
*/
@Override
@DS("#header.poolName")
public int updateEquRepairOrder(EquRepairOrder equRepairOrder) {
equRepairOrder.setUpdateTime(DateUtils.getNowDate());
return equRepairOrderMapper.updateEquRepairOrder(equRepairOrder);
}
/**
*
*
* @param orderIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquRepairOrderByOrderIds(String[] orderIds) {
return equRepairOrderMapper.deleteEquRepairOrderByOrderIds(orderIds);
}
/**
*
*
* @param orderId
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquRepairOrderByOrderId(String orderId) {
return equRepairOrderMapper.deleteEquRepairOrderByOrderId(orderId);
}
/**
*
*
* @param equEquipment
* @return
*/
@Override
@DS("#header.poolName")
public List<EquEquipment> selectEquEquipmentList(EquEquipment equEquipment) {
return equEquipmentMapper.selectEquEquipmentList(equEquipment);
}
}

@ -0,0 +1,111 @@
package com.op.device.service.impl;
import java.text.SimpleDateFormat;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.device.mapper.EquSpareApplyMapper;
import com.op.device.domain.EquSpareApply;
import com.op.device.service.IEquSpareApplyService;
/**
* Service
*
* @author Open Platform
* @date 2023-10-17
*/
@Service
public class EquSpareApplyServiceImpl implements IEquSpareApplyService {
@Autowired
private EquSpareApplyMapper equSpareApplyMapper;
/**
*
*
* @param applyId
* @return
*/
@Override
@DS("#header.poolName")
public EquSpareApply selectEquSpareApplyByApplyId(String applyId) {
return equSpareApplyMapper.selectEquSpareApplyByApplyId(applyId);
}
/**
*
*
* @param equSpareApply
* @return
*/
@Override
@DS("#header.poolName")
public List<EquSpareApply> selectEquSpareApplyList(EquSpareApply equSpareApply) {
if (equSpareApply.getApplyTimeArray() != null) {
// 设置创建日期开始和结束值
if (equSpareApply.getApplyTimeArray().size() == 2) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
equSpareApply.setApplyTimeStart(formatter.format(equSpareApply.getApplyTimeArray().get(0)));
equSpareApply.setApplyTimeEnd(formatter.format(equSpareApply.getApplyTimeArray().get(1)));
}
}
return equSpareApplyMapper.selectEquSpareApplyList(equSpareApply);
}
/**
*
*
* @param equSpareApply
* @return
*/
@Override
@DS("#header.poolName")
public int insertEquSpareApply(EquSpareApply equSpareApply) {
equSpareApply.setApplyId(IdUtils.fastSimpleUUID());
equSpareApply.setCreateTime(DateUtils.getNowDate());
equSpareApply.setCreateBy(SecurityUtils.getUsername());
return equSpareApplyMapper.insertEquSpareApply(equSpareApply);
}
/**
*
*
* @param equSpareApply
* @return
*/
@Override
@DS("#header.poolName")
public int updateEquSpareApply(EquSpareApply equSpareApply) {
equSpareApply.setUpdateTime(DateUtils.getNowDate());
equSpareApply.setUpdateBy(SecurityUtils.getUsername());
return equSpareApplyMapper.updateEquSpareApply(equSpareApply);
}
/**
*
*
* @param applyIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquSpareApplyByApplyIds(String[] applyIds) {
return equSpareApplyMapper.deleteEquSpareApplyByApplyIds(applyIds);
}
/**
*
*
* @param applyId
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquSpareApplyByApplyId(String applyId) {
return equSpareApplyMapper.deleteEquSpareApplyByApplyId(applyId);
}
}

@ -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<SparePartsInStorage> 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);
}
}

@ -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<SparePartsLedger> 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);
}
}

@ -67,6 +67,11 @@
ORDER BY create_time
</select>
<select id="selectCheckItemDetailByItemCode" parameterType="String" resultMap="EquCheckItemDetailResult">
<include refid="selectEquCheckItemDetailVo"/>
where parent_code = #{itemCode} and del_flag = '0'
</select>
<insert id="insertEquCheckItemDetail" parameterType="EquCheckItemDetail">
insert into equ_check_item_detail
<trim prefix="(" suffix=")" suffixOverrides=",">

@ -72,7 +72,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select equipment_name AS 'equipmentName',equipment_code AS 'equipmentCode' from base_equipment where del_flag = '0'
</select>
<insert id="insertEquCheckItem" parameterType="EquCheckItem">
<select id="selectCheckItemByEquipmentCode" parameterType="String" resultMap="EquCheckItemResult">
<include refid="selectEquCheckItemVo"/>
where item_code in ( select item_code from equ_item_equipment where equipment_code = #{equipmentCode} and del_flag = '0' ) and del_flag = '0'
</select>
<insert id="insertEquCheckItem" parameterType="EquCheckItem">
insert into equ_check_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="itemId != null">item_id,</if>

@ -0,0 +1,242 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.EquEquipmentMapper">
<resultMap type="EquEquipment" id="EquEquipmentResult">
<result property="equipmentId" column="equipment_id" />
<result property="equipmentCode" column="equipment_code" />
<result property="equipmentName" column="equipment_name" />
<result property="equipmentBrand" column="equipment_brand" />
<result property="equipmentSpec" column="equipment_spec" />
<result property="equipmentTypeId" column="equipment_type_id" />
<result property="equipmentTypeCode" column="equipment_type_code" />
<result property="equipmentTypeName" column="equipment_type_name" />
<result property="workshopId" column="workshop_id" />
<result property="workshopCode" column="workshop_code" />
<result property="workshopName" column="workshop_name" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="attr4" column="attr4" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="workshopSection" column="workshop_section" />
<result property="equipmentLocation" column="equipment_location" />
<result property="hourlyUnitPrice" column="hourly_unit_price" />
<result property="equipmentBarcode" column="equipment_barcode" />
<result property="equipmentBarcodeImage" column="equipment_barcode_image" />
<result property="manufacturer" column="manufacturer" />
<result property="supplier" column="supplier" />
<result property="useLife" column="use_life" />
<result property="buyTime" column="buy_time" />
<result property="assetOriginalValue" column="asset_original_value" />
<result property="netAssetValue" column="net_asset_value" />
<result property="assetHead" column="asset_head" />
<result property="fixedAssetCode" column="fixed_asset_code" />
<result property="department" column="department" />
<result property="unitWorkingHours" column="unit_working_hours" />
<result property="plcIp" column="plc_ip" />
<result property="plcPort" column="plc_port" />
<result property="delFlag" column="del_flag" />
<result property="sapAsset" column="sap_asset" />
</resultMap>
<sql id="selectEquEquipmentVo">
select equipment_id, equipment_code, equipment_name, equipment_brand, equipment_spec, equipment_type_id, equipment_type_code, equipment_type_name, workshop_id, workshop_code, workshop_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, workshop_section, equipment_location, hourly_unit_price, equipment_barcode, equipment_barcode_image, manufacturer, supplier, use_life, buy_time, asset_original_value, net_asset_value, asset_head, fixed_asset_code, department, unit_working_hours, plc_ip, plc_port, del_flag, sap_asset from base_equipment
</sql>
<select id="selectEquEquipmentList" parameterType="EquEquipment" resultMap="EquEquipmentResult">
<include refid="selectEquEquipmentVo"/>
<where>
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code like concat('%', #{equipmentCode}, '%')</if>
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="equipmentBrand != null and equipmentBrand != ''"> and equipment_brand = #{equipmentBrand}</if>
<if test="equipmentSpec != null and equipmentSpec != ''"> and equipment_spec = #{equipmentSpec}</if>
<if test="equipmentTypeId != null "> and equipment_type_id = #{equipmentTypeId}</if>
<if test="equipmentTypeCode != null and equipmentTypeCode != ''"> and equipment_type_code = #{equipmentTypeCode}</if>
<if test="equipmentTypeName != null and equipmentTypeName != ''"> and equipment_type_name like concat('%', #{equipmentTypeName}, '%')</if>
<if test="workshopId != null "> and workshop_id = #{workshopId}</if>
<if test="workshopCode != null and workshopCode != ''"> and workshop_code = #{workshopCode}</if>
<if test="workshopName != null and workshopName != ''"> and workshop_name like concat('%', #{workshopName}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null "> and attr3 = #{attr3}</if>
<if test="attr4 != null "> and attr4 = #{attr4}</if>
<if test="workshopSection != null and workshopSection != ''"> and workshop_section = #{workshopSection}</if>
<if test="equipmentLocation != null and equipmentLocation != ''"> and equipment_location = #{equipmentLocation}</if>
<if test="hourlyUnitPrice != null "> and hourly_unit_price = #{hourlyUnitPrice}</if>
<if test="equipmentBarcode != null and equipmentBarcode != ''"> and equipment_barcode = #{equipmentBarcode}</if>
<if test="equipmentBarcodeImage != null and equipmentBarcodeImage != ''"> and equipment_barcode_image = #{equipmentBarcodeImage}</if>
<if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
<if test="supplier != null and supplier != ''"> and supplier = #{supplier}</if>
<if test="useLife != null and useLife != ''"> and use_life = #{useLife}</if>
<if test="buyTime != null "> and buy_time = #{buyTime}</if>
<if test="assetOriginalValue != null and assetOriginalValue != ''"> and asset_original_value = #{assetOriginalValue}</if>
<if test="netAssetValue != null and netAssetValue != ''"> and net_asset_value = #{netAssetValue}</if>
<if test="assetHead != null and assetHead != ''"> and asset_head = #{assetHead}</if>
<if test="fixedAssetCode != null and fixedAssetCode != ''"> and fixed_asset_code = #{fixedAssetCode}</if>
<if test="department != null and department != ''"> and department = #{department}</if>
<if test="unitWorkingHours != null and unitWorkingHours != ''"> and unit_working_hours = #{unitWorkingHours}</if>
<if test="plcIp != null and plcIp != ''"> and plc_ip = #{plcIp}</if>
<if test="plcPort != null "> and plc_port = #{plcPort}</if>
<if test="sapAsset != null and sapAsset != ''"> and sap_asset = #{sapAsset}</if>
</where>
</select>
<select id="selectEquEquipmentByEquEquipmentId" parameterType="Long" resultMap="EquEquipmentResult">
<include refid="selectEquEquipmentVo"/>
where equipment_id = #{equipmentId}
</select>
<insert id="insertEquEquipment" parameterType="EquEquipment">
insert into base_equipment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="equipmentId != null">equipment_id,</if>
<if test="equipmentCode != null">equipment_code,</if>
<if test="equipmentName != null">equipment_name,</if>
<if test="equipmentBrand != null">equipment_brand,</if>
<if test="equipmentSpec != null">equipment_spec,</if>
<if test="equipmentTypeId != null">equipment_type_id,</if>
<if test="equipmentTypeCode != null">equipment_type_code,</if>
<if test="equipmentTypeName != null">equipment_type_name,</if>
<if test="workshopId != null">workshop_id,</if>
<if test="workshopCode != null">workshop_code,</if>
<if test="workshopName != null">workshop_name,</if>
<if test="status != null">status,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="attr4 != null">attr4,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="workshopSection != null">workshop_section,</if>
<if test="equipmentLocation != null">equipment_location,</if>
<if test="hourlyUnitPrice != null">hourly_unit_price,</if>
<if test="equipmentBarcode != null">equipment_barcode,</if>
<if test="equipmentBarcodeImage != null">equipment_barcode_image,</if>
<if test="manufacturer != null">manufacturer,</if>
<if test="supplier != null">supplier,</if>
<if test="useLife != null">use_life,</if>
<if test="buyTime != null">buy_time,</if>
<if test="assetOriginalValue != null">asset_original_value,</if>
<if test="netAssetValue != null">net_asset_value,</if>
<if test="assetHead != null">asset_head,</if>
<if test="fixedAssetCode != null">fixed_asset_code,</if>
<if test="department != null">department,</if>
<if test="unitWorkingHours != null">unit_working_hours,</if>
<if test="plcIp != null">plc_ip,</if>
<if test="plcPort != null">plc_port,</if>
<if test="delFlag != null">del_flag,</if>
<if test="sapAsset != null">sap_asset,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="equipmentId != null">#{equipmentId},</if>
<if test="equipmentCode != null">#{equipmentCode},</if>
<if test="equipmentName != null">#{equipmentName},</if>
<if test="equipmentBrand != null">#{equipmentBrand},</if>
<if test="equipmentSpec != null">#{equipmentSpec},</if>
<if test="equipmentTypeId != null">#{equipmentTypeId},</if>
<if test="equipmentTypeCode != null">#{equipmentTypeCode},</if>
<if test="equipmentTypeName != null">#{equipmentTypeName},</if>
<if test="workshopId != null">#{workshopId},</if>
<if test="workshopCode != null">#{workshopCode},</if>
<if test="workshopName != null">#{workshopName},</if>
<if test="status != null">#{status},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="attr4 != null">#{attr4},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="workshopSection != null">#{workshopSection},</if>
<if test="equipmentLocation != null">#{equipmentLocation},</if>
<if test="hourlyUnitPrice != null">#{hourlyUnitPrice},</if>
<if test="equipmentBarcode != null">#{equipmentBarcode},</if>
<if test="equipmentBarcodeImage != null">#{equipmentBarcodeImage},</if>
<if test="manufacturer != null">#{manufacturer},</if>
<if test="supplier != null">#{supplier},</if>
<if test="useLife != null">#{useLife},</if>
<if test="buyTime != null">#{buyTime},</if>
<if test="assetOriginalValue != null">#{assetOriginalValue},</if>
<if test="netAssetValue != null">#{netAssetValue},</if>
<if test="assetHead != null">#{assetHead},</if>
<if test="fixedAssetCode != null">#{fixedAssetCode},</if>
<if test="department != null">#{department},</if>
<if test="unitWorkingHours != null">#{unitWorkingHours},</if>
<if test="plcIp != null">#{plcIp},</if>
<if test="plcPort != null">#{plcPort},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="sapAsset != null">#{sapAsset},</if>
</trim>
</insert>
<update id="updateEquEquipment" parameterType="EquEquipment">
update base_equipment
<trim prefix="SET" suffixOverrides=",">
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
<if test="equipmentName != null">equipment_name = #{equipmentName},</if>
<if test="equipmentBrand != null">equipment_brand = #{equipmentBrand},</if>
<if test="equipmentSpec != null">equipment_spec = #{equipmentSpec},</if>
<if test="equipmentTypeId != null">equipment_type_id = #{equipmentTypeId},</if>
<if test="equipmentTypeCode != null">equipment_type_code = #{equipmentTypeCode},</if>
<if test="equipmentTypeName != null">equipment_type_name = #{equipmentTypeName},</if>
<if test="workshopId != null">workshop_id = #{workshopId},</if>
<if test="workshopCode != null">workshop_code = #{workshopCode},</if>
<if test="workshopName != null">workshop_name = #{workshopName},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="attr4 != null">attr4 = #{attr4},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="workshopSection != null">workshop_section = #{workshopSection},</if>
<if test="equipmentLocation != null">equipment_location = #{equipmentLocation},</if>
<if test="hourlyUnitPrice != null">hourly_unit_price = #{hourlyUnitPrice},</if>
<if test="equipmentBarcode != null">equipment_barcode = #{equipmentBarcode},</if>
<if test="equipmentBarcodeImage != null">equipment_barcode_image = #{equipmentBarcodeImage},</if>
<if test="manufacturer != null">manufacturer = #{manufacturer},</if>
<if test="supplier != null">supplier = #{supplier},</if>
<if test="useLife != null">use_life = #{useLife},</if>
<if test="buyTime != null">buy_time = #{buyTime},</if>
<if test="assetOriginalValue != null">asset_original_value = #{assetOriginalValue},</if>
<if test="netAssetValue != null">net_asset_value = #{netAssetValue},</if>
<if test="assetHead != null">asset_head = #{assetHead},</if>
<if test="fixedAssetCode != null">fixed_asset_code = #{fixedAssetCode},</if>
<if test="department != null">department = #{department},</if>
<if test="unitWorkingHours != null">unit_working_hours = #{unitWorkingHours},</if>
<if test="plcIp != null">plc_ip = #{plcIp},</if>
<if test="plcPort != null">plc_port = #{plcPort},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="sapAsset != null">sap_asset = #{sapAsset},</if>
</trim>
where equipment_id = #{equipmentId}
</update>
<delete id="deleteEquEquipmentByEquEquipmentId" parameterType="Long">
delete from base_equipment where equipment_id = #{equipmentId}
</delete>
<delete id="deleteEquEquipmentByEquEquipmentIds" parameterType="String">
delete from base_equipment where equipment_id in
<foreach item="equipmentId" collection="array" open="(" separator="," close=")">
#{equipmentId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.EquPlanDetailMapper">
<resultMap type="EquPlanDetail" id="EquPlanDetailResult">
<result property="id" column="id" />
<result property="code" column="code" />
<result property="planId" column="plan_id" />
<result property="parentCode" column="parent_code" />
<result property="itemCode" column="item_code" />
<result property="itemName" column="item_name" />
<result property="itemMethod" column="item_method" />
<result property="itemType" column="item_type" />
<result property="itemTypeName" column="item_type_name" />
<result property="itemRemark" column="item_remark" />
<result property="factoryCode" column="factory_code" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectEquPlanDetailVo">
select id, code, plan_id, parent_code, item_code, item_name, item_method, item_type, item_type_name, item_remark, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_plan_detail
</sql>
<select id="selectEquPlanDetailList" parameterType="EquPlanDetail" resultMap="EquPlanDetailResult">
<include refid="selectEquPlanDetailVo"/>
<where>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="planId != null and planId != ''"> and plan_id = #{planId}</if>
<if test="parentCode != null and parentCode != ''"> and parent_code = #{parentCode}</if>
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
<if test="itemMethod != null and itemMethod != ''"> and item_method = #{itemMethod}</if>
<if test="itemType != null and itemType != ''"> and item_type = #{itemType}</if>
<if test="itemTypeName != null and itemTypeName != ''"> and item_type_name like concat('%', #{itemTypeName}, '%')</if>
<if test="itemRemark != null and itemRemark != ''"> and item_remark = #{itemRemark}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
</where>
</select>
<select id="selectEquPlanDetailById" parameterType="String" resultMap="EquPlanDetailResult">
<include refid="selectEquPlanDetailVo"/>
where id = #{id}
</select>
<insert id="insertEquPlanDetail" parameterType="EquPlanDetail">
insert into equ_plan_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="code != null">code,</if>
<if test="planId != null">plan_id,</if>
<if test="parentCode != null">parent_code,</if>
<if test="itemCode != null">item_code,</if>
<if test="itemName != null">item_name,</if>
<if test="itemMethod != null">item_method,</if>
<if test="itemType != null">item_type,</if>
<if test="itemTypeName != null">item_type_name,</if>
<if test="itemRemark != null">item_remark,</if>
<if test="factoryCode != null">factory_code,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="code != null">#{code},</if>
<if test="planId != null">#{planId},</if>
<if test="parentCode != null">#{parentCode},</if>
<if test="itemCode != null">#{itemCode},</if>
<if test="itemName != null">#{itemName},</if>
<if test="itemMethod != null">#{itemMethod},</if>
<if test="itemType != null">#{itemType},</if>
<if test="itemTypeName != null">#{itemTypeName},</if>
<if test="itemRemark != null">#{itemRemark},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEquPlanDetail" parameterType="EquPlanDetail">
update equ_plan_detail
<trim prefix="SET" suffixOverrides=",">
<if test="code != null">code = #{code},</if>
<if test="planId != null">plan_id = #{planId},</if>
<if test="parentCode != null">parent_code = #{parentCode},</if>
<if test="itemCode != null">item_code = #{itemCode},</if>
<if test="itemName != null">item_name = #{itemName},</if>
<if test="itemMethod != null">item_method = #{itemMethod},</if>
<if test="itemType != null">item_type = #{itemType},</if>
<if test="itemTypeName != null">item_type_name = #{itemTypeName},</if>
<if test="itemRemark != null">item_remark = #{itemRemark},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEquPlanDetailById" parameterType="String">
delete from equ_plan_detail where id = #{id}
</delete>
<delete id="deleteEquPlanDetailByIds" parameterType="String">
delete from equ_plan_detail where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.EquPlanEquMapper">
<resultMap type="EquPlanEqu" id="EquPlanEquResult">
<result property="id" column="id" />
<result property="code" column="code" />
<result property="parentCode" column="parent_code" />
<result property="equipmentCode" column="equipment_code" />
<result property="equipmentName" column="equipment_name" />
<result property="factoryCode" column="factory_code" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectEquPlanEquVo">
select id, code, parent_code, equipment_code, equipment_name, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_plan_equ
</sql>
<select id="selectEquPlanEquList" parameterType="EquPlanEqu" resultMap="EquPlanEquResult">
<include refid="selectEquPlanEquVo"/>
<where>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="parentCode != null and parentCode != ''"> and parent_code = #{parentCode}</if>
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
</where>
</select>
<select id="selectEquPlanEquById" parameterType="String" resultMap="EquPlanEquResult">
<include refid="selectEquPlanEquVo"/>
where id = #{id}
</select>
<insert id="insertEquPlanEqu" parameterType="EquPlanEqu">
insert into equ_plan_equ
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="code != null and code != ''">code,</if>
<if test="parentCode != null and parentCode != ''">parent_code,</if>
<if test="equipmentCode != null and equipmentCode != ''">equipment_code,</if>
<if test="equipmentName != null and equipmentName != ''">equipment_name,</if>
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="parentCode != null and parentCode != ''">#{parentCode},</if>
<if test="equipmentCode != null and equipmentCode != ''">#{equipmentCode},</if>
<if test="equipmentName != null and equipmentName != ''">#{equipmentName},</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEquPlanEqu" parameterType="EquPlanEqu">
update equ_plan_equ
<trim prefix="SET" suffixOverrides=",">
<if test="code != null and code != ''">code = #{code},</if>
<if test="parentCode != null and parentCode != ''">parent_code = #{parentCode},</if>
<if test="equipmentCode != null and equipmentCode != ''">equipment_code = #{equipmentCode},</if>
<if test="equipmentName != null and equipmentName != ''">equipment_name = #{equipmentName},</if>
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEquPlanEquById" parameterType="String">
delete from equ_plan_equ where id = #{id}
</delete>
<delete id="deleteEquPlanEquByIds" parameterType="String">
delete from equ_plan_equ where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.EquPlanMapper">
<resultMap type="EquPlan" id="EquPlanResult">
<result property="planId" column="plan_id" />
<result property="planCode" column="plan_code" />
<result property="planName" column="plan_name" />
<result property="planWorkshop" column="plan_workshop" />
<result property="planProdLine" column="plan_prod_line" />
<result property="equipmentName" column="equipment_name" />
<result property="equipmentCode" column="equipment_code" />
<result property="planLoop" column="plan_loop" />
<result property="planLoopType" column="plan_loop_type" />
<result property="planLoopStart" column="plan_loop_start" />
<result property="planLoopEnd" column="plan_loop_end" />
<result property="planPerson" column="plan_person" />
<result property="planStatus" column="plan_status" />
<result property="planRestrict" column="plan_restrict" />
<result property="planType" column="plan_type" />
<result property="planOutsource" column="plan_outsource" />
<result property="workCode" column="work_code" />
<result property="factoryCode" column="factory_code" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectEquPlanVo">
select plan_id, plan_code, plan_name, plan_workshop, plan_prod_line, equipment_name, equipment_code, plan_loop, plan_loop_type, plan_loop_start, plan_loop_end, plan_person, plan_status, plan_restrict, plan_type, plan_outsource, work_code, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_plan
</sql>
<select id="selectEquPlanList" parameterType="EquPlan" resultMap="EquPlanResult">
<include refid="selectEquPlanVo"/>
<where>
<if test="planCode != null and planCode != ''"> and plan_code like concat('%', #{planCode}, '%')</if>
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
<if test="planWorkshop != null and planWorkshop != ''"> and plan_workshop like concat('%', #{planWorkshop}, '%')</if>
<if test="planProdLine != null and planProdLine != ''"> and plan_prod_line like concat('%', #{planProdLine}, '%')</if>
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code like concat('%', #{equipmentCode}, '%')</if>
<if test="planLoop != null and planLoop != ''"> and plan_loop like concat('%', #{planLoop}, '%')</if>
<if test="planLoopType != null and planLoopType != ''"> and plan_loop_type = #{planLoopType}</if>
<if test="planLoopStart != null "> and plan_loop_start = #{planLoopStart}</if>
<if test="planLoopEnd != null "> and plan_loop_end = #{planLoopEnd}</if>
<if test="planPerson != null and planPerson != ''"> and plan_person like concat('%', #{planPerson}, '%')</if>
<if test="planStatus != null and planStatus != ''"> and plan_status = #{planStatus}</if>
<if test="planRestrict != null and planRestrict != ''"> and plan_restrict = #{planRestrict}</if>
<if test="planType != null and planType != ''"> and plan_type = #{planType}</if>
<if test="planOutsource != null and planOutsource != ''"> and plan_outsource = #{planOutsource}</if>
<if test="workCode != null and workCode != ''"> and work_code like concat('%', #{workCode}, '%')</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="createTimeStart != null "> and CONVERT(date,create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,create_time)</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="updateTimeStart != null "> and CONVERT(date,update_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null "> and #{updateTimeEnd} >= CONVERT(date,update_time)</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
</where>
</select>
<select id="selectEquPlanByPlanId" parameterType="String" resultMap="EquPlanResult">
<include refid="selectEquPlanVo"/>
where plan_id = #{planId}
</select>
<insert id="insertEquPlan" parameterType="EquPlan">
insert into equ_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="planId != null">plan_id,</if>
<if test="planCode != null and planCode != ''">plan_code,</if>
<if test="planName != null and planName != ''">plan_name,</if>
<if test="planWorkshop != null and planWorkshop != ''">plan_workshop,</if>
<if test="planProdLine != null and planProdLine != ''">plan_prod_line,</if>
<if test="equipmentName != null and equipmentName != ''">equipment_name,</if>
<if test="equipmentCode != null and equipmentCode != ''">equipment_code,</if>
<if test="planLoop != null and planLoop != ''">plan_loop,</if>
<if test="planLoopType != null and planLoopType != ''">plan_loop_type,</if>
<if test="planLoopStart != null">plan_loop_start,</if>
<if test="planLoopEnd != null">plan_loop_end,</if>
<if test="planPerson != null and planPerson != ''">plan_person,</if>
<if test="planStatus != null and planStatus != ''">plan_status,</if>
<if test="planRestrict != null">plan_restrict,</if>
<if test="planType != null and planType != ''">plan_type,</if>
<if test="planOutsource != null and planOutsource != ''">plan_outsource,</if>
<if test="workCode != null">work_code,</if>
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="planId != null">#{planId},</if>
<if test="planCode != null and planCode != ''">#{planCode},</if>
<if test="planName != null and planName != ''">#{planName},</if>
<if test="planWorkshop != null and planWorkshop != ''">#{planWorkshop},</if>
<if test="planProdLine != null and planProdLine != ''">#{planProdLine},</if>
<if test="equipmentName != null and equipmentName != ''">#{equipmentName},</if>
<if test="equipmentCode != null and equipmentCode != ''">#{equipmentCode},</if>
<if test="planLoop != null and planLoop != ''">#{planLoop},</if>
<if test="planLoopType != null and planLoopType != ''">#{planLoopType},</if>
<if test="planLoopStart != null">#{planLoopStart},</if>
<if test="planLoopEnd != null">#{planLoopEnd},</if>
<if test="planPerson != null and planPerson != ''">#{planPerson},</if>
<if test="planStatus != null and planStatus != ''">#{planStatus},</if>
<if test="planRestrict != null">#{planRestrict},</if>
<if test="planType != null and planType != ''">#{planType},</if>
<if test="planOutsource != null and planOutsource != ''">#{planOutsource},</if>
<if test="workCode != null">#{workCode},</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEquPlan" parameterType="EquPlan">
update equ_plan
<trim prefix="SET" suffixOverrides=",">
<if test="planCode != null and planCode != ''">plan_code = #{planCode},</if>
<if test="planName != null and planName != ''">plan_name = #{planName},</if>
<if test="planWorkshop != null and planWorkshop != ''">plan_workshop = #{planWorkshop},</if>
<if test="planProdLine != null and planProdLine != ''">plan_prod_line = #{planProdLine},</if>
<if test="equipmentName != null and equipmentName != ''">equipment_name = #{equipmentName},</if>
<if test="equipmentCode != null and equipmentCode != ''">equipment_code = #{equipmentCode},</if>
<if test="planLoop != null and planLoop != ''">plan_loop = #{planLoop},</if>
<if test="planLoopType != null and planLoopType != ''">plan_loop_type = #{planLoopType},</if>
<if test="planLoopStart != null">plan_loop_start = #{planLoopStart},</if>
<if test="planLoopEnd != null">plan_loop_end = #{planLoopEnd},</if>
<if test="planPerson != null and planPerson != ''">plan_person = #{planPerson},</if>
<if test="planStatus != null and planStatus != ''">plan_status = #{planStatus},</if>
<if test="planRestrict != null">plan_restrict = #{planRestrict},</if>
<if test="planType != null and planType != ''">plan_type = #{planType},</if>
<if test="planOutsource != null and planOutsource != ''">plan_outsource = #{planOutsource},</if>
<if test="workCode != null">work_code = #{workCode},</if>
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createTimeStart != null "> and CONVERT(date,create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,create_time)</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="updateTimeStart != null "> and CONVERT(date,update_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null "> and #{updateTimeEnd} >= CONVERT(date,update_time)</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
</trim>
where plan_id = #{planId}
</update>
<delete id="deleteEquPlanByPlanId" parameterType="String">
delete from equ_plan where plan_id = #{planId}
</delete>
<delete id="deleteEquPlanByPlanIds" parameterType="String">
delete from equ_plan where plan_id in
<foreach item="planId" collection="array" open="(" separator="," close=")">
#{planId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.EquPlanStandardMapper">
<resultMap type="EquPlanStandard" id="EquPlanStandardResult">
<result property="id" column="id" />
<result property="code" column="code" />
<result property="parentCode" column="parent_code" />
<result property="detailCode" column="detail_code" />
<result property="standardType" column="standard_type" />
<result property="standardName" column="standard_name" />
<result property="detailUpLimit" column="detail_up_limit" />
<result property="detailDownLimit" column="detail_down_limit" />
<result property="detailUnit" column="detail_unit" />
<result property="factoryCode" column="factory_code" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectEquPlanStandardVo">
select id, code, parent_code, detail_code, standard_type, standard_name, detail_up_limit, detail_down_limit, detail_unit, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_plan_standard
</sql>
<select id="selectEquPlanStandardList" parameterType="EquPlanStandard" resultMap="EquPlanStandardResult">
<include refid="selectEquPlanStandardVo"/>
<where>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="parentCode != null and parentCode != ''"> and parent_code = #{parentCode}</if>
<if test="detailCode != null and detailCode != ''"> and detail_code = #{detailCode}</if>
<if test="standardType != null and standardType != ''"> and standard_type = #{standardType}</if>
<if test="standardName != null and standardName != ''"> and standard_name like concat('%', #{standardName}, '%')</if>
<if test="detailUpLimit != null "> and detail_up_limit = #{detailUpLimit}</if>
<if test="detailDownLimit != null "> and detail_down_limit = #{detailDownLimit}</if>
<if test="detailUnit != null and detailUnit != ''"> and detail_unit = #{detailUnit}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
</where>
</select>
<select id="selectEquPlanStandardById" parameterType="String" resultMap="EquPlanStandardResult">
<include refid="selectEquPlanStandardVo"/>
where id = #{id}
</select>
<insert id="insertEquPlanStandard" parameterType="EquPlanStandard">
insert into equ_plan_standard
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="code != null">code,</if>
<if test="parentCode != null">parent_code,</if>
<if test="detailCode != null">detail_code,</if>
<if test="standardType != null">standard_type,</if>
<if test="standardName != null">standard_name,</if>
<if test="detailUpLimit != null">detail_up_limit,</if>
<if test="detailDownLimit != null">detail_down_limit,</if>
<if test="detailUnit != null">detail_unit,</if>
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="code != null">#{code},</if>
<if test="parentCode != null">#{parentCode},</if>
<if test="detailCode != null">#{detailCode},</if>
<if test="standardType != null">#{standardType},</if>
<if test="standardName != null">#{standardName},</if>
<if test="detailUpLimit != null">#{detailUpLimit},</if>
<if test="detailDownLimit != null">#{detailDownLimit},</if>
<if test="detailUnit != null">#{detailUnit},</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEquPlanStandard" parameterType="EquPlanStandard">
update equ_plan_standard
<trim prefix="SET" suffixOverrides=",">
<if test="code != null">code = #{code},</if>
<if test="parentCode != null">parent_code = #{parentCode},</if>
<if test="detailCode != null">detail_code = #{detailCode},</if>
<if test="standardType != null">standard_type = #{standardType},</if>
<if test="standardName != null">standard_name = #{standardName},</if>
<if test="detailUpLimit != null">detail_up_limit = #{detailUpLimit},</if>
<if test="detailDownLimit != null">detail_down_limit = #{detailDownLimit},</if>
<if test="detailUnit != null">detail_unit = #{detailUnit},</if>
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEquPlanStandardById" parameterType="String">
delete from equ_plan_standard where id = #{id}
</delete>
<delete id="deleteEquPlanStandardByIds" parameterType="String">
delete from equ_plan_standard where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.EquRepairOrderMapper">
<resultMap type="EquRepairOrder" id="EquRepairOrderResult">
<result property="orderId" column="order_id" />
<result property="orderCode" column="order_code" />
<result property="equipmentCode" column="equipment_code" />
<result property="orderDesc" column="order_desc" />
<result property="orderBreakdownTime" column="order_breakdown_time" />
<result property="orderSource" column="order_source" />
<result property="orderTime" column="order_time" />
<result property="orderHandle" column="order_handle" />
<result property="orderRepairman" column="order_repairman" />
<result property="orderConnection" column="order_connection" />
<result property="orderStatus" column="order_status" />
<result property="orderRelevance" column="order_relevance" />
<result property="orderPicture" column="order_picture" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<result property="craeteBy" column="craete_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectEquRepairOrderVo">
select order_id, order_code, equipment_code, order_desc, order_breakdown_time, order_source, order_time, order_handle, order_repairman, order_connection, order_status, order_relevance, order_picture, attr1, attr2, attr3, del_flag, craete_by, create_time, update_by, update_time from equ_repair_order
</sql>
<select id="selectEquRepairOrderList" parameterType="EquRepairOrder" resultMap="EquRepairOrderResult">
<include refid="selectEquRepairOrderVo"/>
<where>
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
<if test="orderDesc != null and orderDesc != ''"> and order_desc = #{orderDesc}</if>
<if test="orderBreakdownTime != null "> and order_breakdown_time = #{orderBreakdownTime}</if>
<if test="orderSource != null and orderSource != ''"> and order_source = #{orderSource}</if>
<if test="orderTime != null "> and order_time = #{orderTime}</if>
<if test="orderHandle != null and orderHandle != ''"> and order_handle = #{orderHandle}</if>
<if test="orderRepairman != null and orderRepairman != ''"> and order_repairman = #{orderRepairman}</if>
<if test="orderConnection != null and orderConnection != ''"> and order_connection = #{orderConnection}</if>
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
<if test="orderRelevance != null and orderRelevance != ''"> and order_relevance = #{orderRelevance}</if>
<if test="orderPicture != null and orderPicture != ''"> and order_picture = #{orderPicture}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="craeteBy != null and craeteBy != ''"> and craete_by = #{craeteBy}</if>
and del_flag = '0'
</where>
</select>
<select id="selectEquRepairOrderByOrderId" parameterType="String" resultMap="EquRepairOrderResult">
<include refid="selectEquRepairOrderVo"/>
where order_id = #{orderId}
and del_flag = '0'
</select>
<insert id="insertEquRepairOrder" parameterType="EquRepairOrder">
insert into equ_repair_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderId != null">order_id,</if>
<if test="orderCode != null">order_code,</if>
<if test="equipmentCode != null">equipment_code,</if>
<if test="orderDesc != null">order_desc,</if>
<if test="orderBreakdownTime != null">order_breakdown_time,</if>
<if test="orderSource != null">order_source,</if>
<if test="orderTime != null">order_time,</if>
<if test="orderHandle != null">order_handle,</if>
<if test="orderRepairman != null">order_repairman,</if>
<if test="orderConnection != null">order_connection,</if>
<if test="orderStatus != null">order_status,</if>
<if test="orderRelevance != null">order_relevance,</if>
<if test="orderPicture != null">order_picture,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null">del_flag,</if>
<if test="craeteBy != null">craete_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">#{orderId},</if>
<if test="orderCode != null">#{orderCode},</if>
<if test="equipmentCode != null">#{equipmentCode},</if>
<if test="orderDesc != null">#{orderDesc},</if>
<if test="orderBreakdownTime != null">#{orderBreakdownTime},</if>
<if test="orderSource != null">#{orderSource},</if>
<if test="orderTime != null">#{orderTime},</if>
<if test="orderHandle != null">#{orderHandle},</if>
<if test="orderRepairman != null">#{orderRepairman},</if>
<if test="orderConnection != null">#{orderConnection},</if>
<if test="orderStatus != null">#{orderStatus},</if>
<if test="orderRelevance != null">#{orderRelevance},</if>
<if test="orderPicture != null">#{orderPicture},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="craeteBy != null">#{craeteBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEquRepairOrder" parameterType="EquRepairOrder">
update equ_repair_order
<trim prefix="SET" suffixOverrides=",">
<if test="orderCode != null">order_code = #{orderCode},</if>
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
<if test="orderDesc != null">order_desc = #{orderDesc},</if>
<if test="orderBreakdownTime != null">order_breakdown_time = #{orderBreakdownTime},</if>
<if test="orderSource != null">order_source = #{orderSource},</if>
<if test="orderTime != null">order_time = #{orderTime},</if>
<if test="orderHandle != null">order_handle = #{orderHandle},</if>
<if test="orderRepairman != null">order_repairman = #{orderRepairman},</if>
<if test="orderConnection != null">order_connection = #{orderConnection},</if>
<if test="orderStatus != null">order_status = #{orderStatus},</if>
<if test="orderRelevance != null">order_relevance = #{orderRelevance},</if>
<if test="orderPicture != null">order_picture = #{orderPicture},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="craeteBy != null">craete_by = #{craeteBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where order_id = #{orderId}
</update>
<delete id="deleteEquRepairOrderByOrderId" parameterType="String">
delete from equ_repair_order where order_id = #{orderId}
</delete>
<delete id="deleteEquRepairOrderByOrderIds" parameterType="String">
delete from equ_repair_order where order_id in
<foreach item="orderId" collection="array" open="(" separator="," close=")">
#{orderId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.EquSpareApplyMapper">
<resultMap type="EquSpareApply" id="EquSpareApplyResult">
<result property="applyId" column="apply_id" />
<result property="applyCode" column="apply_code" />
<result property="spareCode" column="spare_code" />
<result property="spareName" column="spare_name" />
<result property="spareModel" column="spare_model" />
<result property="spareQuantity" column="spare_quantity" />
<result property="spareGroupLine" column="spare_group_line" />
<result property="spareUseEquipment" column="spare_use_equipment" />
<result property="applyTime" column="apply_time" />
<result property="applyPeople" column="apply_people" />
<result property="applyApprovePeople" column="apply_approve_people" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
</resultMap>
<sql id="selectEquSpareApplyVo">
select apply_id, apply_code, spare_code, spare_name, spare_model, spare_quantity, spare_group_line, spare_use_equipment, apply_time, apply_people, apply_approve_people, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time, factory_code from equ_spare_apply
</sql>
<select id="selectEquSpareApplyList" parameterType="EquSpareApply" resultMap="EquSpareApplyResult">
<include refid="selectEquSpareApplyVo"/>
<where>
<if test="applyCode != null and applyCode != ''"> and apply_code like concat('%', #{applyCode}, '%')</if>
<if test="spareCode != null and spareCode != ''"> and spare_code like concat('%', #{spareCode}, '%')</if>
<if test="spareName != null and spareName != ''"> and spare_name like concat('%', #{spareName}, '%')</if>
<if test="spareModel != null and spareModel != ''"> and spare_model like concat('%', #{spareModel}, '%')</if>
<if test="spareQuantity != null "> and spare_quantity like concat('%', #{spareQuantity}, '%')</if>
<if test="spareGroupLine != null and spareGroupLine != ''"> and spare_group_line like concat('%', #{spareGroupLine}, '%')</if>
<if test="spareUseEquipment != null and spareUseEquipment != ''"> and spare_use_equipment like concat('%', #{spareUseEquipment}, '%')</if>
<if test="applyTimeStart != null "> and CONVERT(date,apply_time) >= #{applyTimeStart}</if>
<if test="applyTimeEnd != null "> and #{applyTimeEnd} >= CONVERT(date,apply_time)</if>
<if test="applyPeople != null and applyPeople != ''"> and apply_people like concat('%', #{applyPeople}, '%')</if>
<if test="applyApprovePeople != null and applyApprovePeople != ''"> and apply_approve_people like concat('%', #{applyApprovePeople}, '%')</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
and del_flag = '0'
ORDER BY apply_time DESC
</where>
</select>
<select id="selectEquSpareApplyByApplyId" parameterType="String" resultMap="EquSpareApplyResult">
<include refid="selectEquSpareApplyVo"/>
where apply_id = #{applyId}
and del_flag = '0'
</select>
<insert id="insertEquSpareApply" parameterType="EquSpareApply">
insert into equ_spare_apply
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="applyId != null">apply_id,</if>
<if test="applyCode != null">apply_code,</if>
<if test="spareCode != null">spare_code,</if>
<if test="spareName != null">spare_name,</if>
<if test="spareModel != null">spare_model,</if>
<if test="spareQuantity != null">spare_quantity,</if>
<if test="spareGroupLine != null">spare_group_line,</if>
<if test="spareUseEquipment != null">spare_use_equipment,</if>
<if test="applyTime != null">apply_time,</if>
<if test="applyPeople != null">apply_people,</if>
<if test="applyApprovePeople != null">apply_approve_people,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="factoryCode != null">factory_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="applyId != null">#{applyId},</if>
<if test="applyCode != null">#{applyCode},</if>
<if test="spareCode != null">#{spareCode},</if>
<if test="spareName != null">#{spareName},</if>
<if test="spareModel != null">#{spareModel},</if>
<if test="spareQuantity != null">#{spareQuantity},</if>
<if test="spareGroupLine != null">#{spareGroupLine},</if>
<if test="spareUseEquipment != null">#{spareUseEquipment},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="applyPeople != null">#{applyPeople},</if>
<if test="applyApprovePeople != null">#{applyApprovePeople},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="factoryCode != null">#{factoryCode},</if>
</trim>
</insert>
<update id="updateEquSpareApply" parameterType="EquSpareApply">
update equ_spare_apply
<trim prefix="SET" suffixOverrides=",">
<if test="applyCode != null">apply_code = #{applyCode},</if>
<if test="spareCode != null">spare_code = #{spareCode},</if>
<if test="spareName != null">spare_name = #{spareName},</if>
<if test="spareModel != null">spare_model = #{spareModel},</if>
<if test="spareQuantity != null">spare_quantity = #{spareQuantity},</if>
<if test="spareGroupLine != null">spare_group_line = #{spareGroupLine},</if>
<if test="spareUseEquipment != null">spare_use_equipment = #{spareUseEquipment},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="applyPeople != null">apply_people = #{applyPeople},</if>
<if test="applyApprovePeople != null">apply_approve_people = #{applyApprovePeople},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
</trim>
where apply_id = #{applyId}
</update>
<delete id="deleteEquSpareApplyByApplyId" parameterType="String">
delete from equ_spare_apply where apply_id = #{applyId}
</delete>
<delete id="deleteEquSpareApplyByApplyIds" parameterType="String">
delete from equ_spare_apply where apply_id in
<foreach item="applyId" collection="array" open="(" separator="," close=")">
#{applyId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.SparePartsInOutStorageMapper">
<resultMap type="SparePartsInStorage" id="SparePartsInStorageResult">
<result property="rawOrderInSnId" column="raw_order_in_sn_id" />
<result property="whCode" column="wh_code" />
<result property="waCode" column="wa_code" />
<result property="wlCode" column="wl_code" />
<result property="orderNo" column="order_no" />
<result property="poNo" column="po_no" />
<result property="poLine" column="po_line" />
<result property="materialCode" column="material_code" />
<result property="materialDesc" column="material_desc" />
<result property="sn" column="sn" />
<result property="amount" column="amount" />
<result property="userDefined1" column="user_defined1" />
<result property="userDefined2" column="user_defined2" />
<result property="userDefined3" column="user_defined3" />
<result property="userDefined4" column="user_defined4" />
<result property="userDefined5" column="user_defined5" />
<result property="userDefined6" column="user_defined6" />
<result property="userDefined7" column="user_defined7" />
<result property="userDefined8" column="user_defined8" />
<result property="userDefined9" column="user_defined9" />
<result property="userDefined10" column="user_defined10" />
<result property="createBy" column="create_by" />
<result property="gmtCreate" column="gmt_create" />
<result property="lastModifiedBy" column="last_modified_by" />
<result property="gmtModified" column="gmt_modified" />
<result property="activeFlag" column="active_flag" />
<result property="factoryCode" column="factory_code" />
<result property="sapFactoryCode" column="sap_factory_code" />
</resultMap>
<sql id="selectSparePartsInStorageVo">
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
</sql>
<select id="selectSparePartsInStorageList" parameterType="SparePartsInStorage" resultMap="SparePartsInStorageResult">
<include refid="selectSparePartsInStorageVo"/>
<where>
<if test="whCode != null and whCode != ''"> and wh_code = #{whCode}</if>
<if test="waCode != null and waCode != ''"> and wa_code = #{waCode}</if>
<if test="wlCode != null and wlCode != ''"> and wl_code = #{wlCode}</if>
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
<if test="poNo != null and poNo != ''"> and po_no = #{poNo}</if>
<if test="poLine != null and poLine != ''"> and po_line = #{poLine}</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialDesc != null and materialDesc != ''"> and material_desc = #{materialDesc}</if>
<if test="sn != null and sn != ''"> and sn = #{sn}</if>
<if test="amount != null "> and amount = #{amount}</if>
<if test="userDefined1 != null and userDefined1 != ''"> and user_defined1 = #{userDefined1}</if>
<if test="userDefined2 != null and userDefined2 != ''"> and user_defined2 = #{userDefined2}</if>
<if test="userDefined3 != null and userDefined3 != ''"> and user_defined3 = #{userDefined3}</if>
<if test="userDefined4 != null and userDefined4 != ''"> and user_defined4 = #{userDefined4}</if>
<if test="userDefined5 != null and userDefined5 != ''"> and user_defined5 = #{userDefined5}</if>
<if test="userDefined6 != null and userDefined6 != ''"> and user_defined6 = #{userDefined6}</if>
<if test="userDefined7 != null and userDefined7 != ''"> and user_defined7 = #{userDefined7}</if>
<if test="userDefined8 != null and userDefined8 != ''"> and user_defined8 = #{userDefined8}</if>
<if test="userDefined9 != null and userDefined9 != ''"> and user_defined9 = #{userDefined9}</if>
<if test="userDefined10 != null and userDefined10 != ''"> and user_defined10 = #{userDefined10}</if>
<if test="gmtCreate != null "> and gmt_create = #{gmtCreate}</if>
<if test="lastModifiedBy != null and lastModifiedBy != ''"> and last_modified_by = #{lastModifiedBy}</if>
<if test="gmtModified != null "> and gmt_modified = #{gmtModified}</if>
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="sapFactoryCode != null and sapFactoryCode != ''"> and sap_factory_code = #{sapFactoryCode}</if>
</where>
</select>
<select id="selectSparePartsInStorageByRawOrderInSnId" parameterType="String" resultMap="SparePartsInStorageResult">
<include refid="selectSparePartsInStorageVo"/>
where raw_order_in_sn_id = #{rawOrderInSnId}
</select>
<insert id="insertSparePartsInStorage" parameterType="SparePartsInStorage">
insert into wms_raw_order_in_sn
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="rawOrderInSnId != null">raw_order_in_sn_id,</if>
<if test="whCode != null">wh_code,</if>
<if test="waCode != null">wa_code,</if>
<if test="wlCode != null">wl_code,</if>
<if test="orderNo != null">order_no,</if>
<if test="poNo != null">po_no,</if>
<if test="poLine != null">po_line,</if>
<if test="materialCode != null">material_code,</if>
<if test="materialDesc != null">material_desc,</if>
<if test="sn != null">sn,</if>
<if test="amount != null">amount,</if>
<if test="userDefined1 != null">user_defined1,</if>
<if test="userDefined2 != null">user_defined2,</if>
<if test="userDefined3 != null">user_defined3,</if>
<if test="userDefined4 != null">user_defined4,</if>
<if test="userDefined5 != null">user_defined5,</if>
<if test="userDefined6 != null">user_defined6,</if>
<if test="userDefined7 != null">user_defined7,</if>
<if test="userDefined8 != null">user_defined8,</if>
<if test="userDefined9 != null">user_defined9,</if>
<if test="userDefined10 != null">user_defined10,</if>
<if test="createBy != null">create_by,</if>
<if test="gmtCreate != null">gmt_create,</if>
<if test="lastModifiedBy != null">last_modified_by,</if>
<if test="gmtModified != null">gmt_modified,</if>
<if test="activeFlag != null">active_flag,</if>
<if test="factoryCode != null">factory_code,</if>
<if test="sapFactoryCode != null">sap_factory_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="rawOrderInSnId != null">#{rawOrderInSnId},</if>
<if test="whCode != null">#{whCode},</if>
<if test="waCode != null">#{waCode},</if>
<if test="wlCode != null">#{wlCode},</if>
<if test="orderNo != null">#{orderNo},</if>
<if test="poNo != null">#{poNo},</if>
<if test="poLine != null">#{poLine},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="materialDesc != null">#{materialDesc},</if>
<if test="sn != null">#{sn},</if>
<if test="amount != null">#{amount},</if>
<if test="userDefined1 != null">#{userDefined1},</if>
<if test="userDefined2 != null">#{userDefined2},</if>
<if test="userDefined3 != null">#{userDefined3},</if>
<if test="userDefined4 != null">#{userDefined4},</if>
<if test="userDefined5 != null">#{userDefined5},</if>
<if test="userDefined6 != null">#{userDefined6},</if>
<if test="userDefined7 != null">#{userDefined7},</if>
<if test="userDefined8 != null">#{userDefined8},</if>
<if test="userDefined9 != null">#{userDefined9},</if>
<if test="userDefined10 != null">#{userDefined10},</if>
<if test="createBy != null">#{createBy},</if>
<if test="gmtCreate != null">#{gmtCreate},</if>
<if test="lastModifiedBy != null">#{lastModifiedBy},</if>
<if test="gmtModified != null">#{gmtModified},</if>
<if test="activeFlag != null">#{activeFlag},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="sapFactoryCode != null">#{sapFactoryCode},</if>
</trim>
</insert>
<update id="updateSparePartsInStorage" parameterType="SparePartsInStorage">
update wms_raw_order_in_sn
<trim prefix="SET" suffixOverrides=",">
<if test="whCode != null">wh_code = #{whCode},</if>
<if test="waCode != null">wa_code = #{waCode},</if>
<if test="wlCode != null">wl_code = #{wlCode},</if>
<if test="orderNo != null">order_no = #{orderNo},</if>
<if test="poNo != null">po_no = #{poNo},</if>
<if test="poLine != null">po_line = #{poLine},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="materialDesc != null">material_desc = #{materialDesc},</if>
<if test="sn != null">sn = #{sn},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="userDefined1 != null">user_defined1 = #{userDefined1},</if>
<if test="userDefined2 != null">user_defined2 = #{userDefined2},</if>
<if test="userDefined3 != null">user_defined3 = #{userDefined3},</if>
<if test="userDefined4 != null">user_defined4 = #{userDefined4},</if>
<if test="userDefined5 != null">user_defined5 = #{userDefined5},</if>
<if test="userDefined6 != null">user_defined6 = #{userDefined6},</if>
<if test="userDefined7 != null">user_defined7 = #{userDefined7},</if>
<if test="userDefined8 != null">user_defined8 = #{userDefined8},</if>
<if test="userDefined9 != null">user_defined9 = #{userDefined9},</if>
<if test="userDefined10 != null">user_defined10 = #{userDefined10},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
<if test="lastModifiedBy != null">last_modified_by = #{lastModifiedBy},</if>
<if test="gmtModified != null">gmt_modified = #{gmtModified},</if>
<if test="activeFlag != null">active_flag = #{activeFlag},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
<if test="sapFactoryCode != null">sap_factory_code = #{sapFactoryCode},</if>
</trim>
where raw_order_in_sn_id = #{rawOrderInSnId}
</update>
<delete id="deleteSparePartsInStorageByRawOrderInSnId" parameterType="String">
delete from wms_raw_order_in_sn where raw_order_in_sn_id = #{rawOrderInSnId}
</delete>
<delete id="deleteSparePartsInStorageByRawOrderInSnIds" parameterType="String">
delete from wms_raw_order_in_sn where raw_order_in_sn_id in
<foreach item="rawOrderInSnId" collection="array" open="(" separator="," close=")">
#{rawOrderInSnId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,258 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.SparePartsLedgerMapper">
<resultMap type="SparePartsLedger" id="SparePartsLedgerResult">
<result property="materialCode" column="material_code" />
<result property="materialDesc" column="material_desc" />
<result property="amount" column="amount" />
<result property="storageType" column="storage_type" />
<result property="spareUseLife" column="spare_use_life" />
<result property="spareName" column="spare_name" />
<result property="spareMode" column="spare_mode" />
<result property="spareManufacturer" column="spare_manufacturer" />
<result property="spareSupplier" column="spare_supplier" />
<result property="spareReplacementCycle" column="spare_replacement_cycle" />
<result property="spareMeasurementUnit" column="spare_measurement_unit" />
<result property="spareConversionUnit" column="spare_conversion_unit" />
<result property="spareConversionRatio" column="spare_conversion_ratio" />
<result property="spareInventoryFloor" column="spare_inventory_floor" />
<result property="spareInventoryUpper" column="spare_inventory_upper" />
<result property="spareType" column="spare_type" />
<result property="createBy" column="create_by" />
<result property="gmtCreate" column="gmt_create" />
<result property="lastModifiedBy" column="last_modified_by" />
<result property="gmtModified" column="gmt_modified" />
<result property="activeFlag" column="active_flag" />
<result property="factoryCode" column="factory_code" />
<result property="sapFactoryCode" column="sap_factory_code" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSparePartsLedgerVo">
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
</sql>
<select id="selectSparePartsLedgerList" parameterType="SparePartsLedger" resultMap="SparePartsLedgerResult">
<include refid="selectSparePartsLedgerVo"/>
<where>
<if test="storageId != null and storageId != ''"> and storage_id = #{storageId}</if>
<if test="whCode != null and whCode != ''"> and wh_code = #{whCode}</if>
<if test="regionCode != null and regionCode != ''"> and region_code = #{regionCode}</if>
<if test="waCode != null and waCode != ''"> and wa_code = #{waCode}</if>
<if test="storageType != null and storageType != ''"> and storage_type = #{storageType}</if>
<if test="wlCode != null and wlCode != ''"> and wl_code = #{wlCode}</if>
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if>
<if test="materialDesc != null and materialDesc != ''"> and material_desc like concat('%', #{materialDesc}, '%')</if>
<if test="amount != null "> and amount = #{amount}</if>
<if test="storageAmount != null "> and storage_amount = #{storageAmount}</if>
<if test="occupyAmount != null "> and occupy_amount = #{occupyAmount}</if>
<if test="lpn != null and lpn != ''"> and lpn = #{lpn}</if>
<if test="productBatch != null and productBatch != ''"> and product_batch = #{productBatch}</if>
<if test="receiveDate != null "> and receive_date = #{receiveDate}</if>
<if test="productDate != null "> and product_date = #{productDate}</if>
<if test="userDefined1 != null and userDefined1 != ''"> and user_defined1 = #{userDefined1}</if>
<if test="userDefined2 != null and userDefined2 != ''"> and user_defined2 = #{userDefined2}</if>
<if test="userDefined3 != null and userDefined3 != ''"> and user_defined3 = #{userDefined3}</if>
<if test="userDefined4 != null and userDefined4 != ''"> and user_defined4 = #{userDefined4}</if>
<if test="userDefined5 != null and userDefined5 != ''"> and user_defined5 = #{userDefined5}</if>
<if test="userDefined6 != null and userDefined6 != ''"> and user_defined6 = #{userDefined6}</if>
<if test="userDefined7 != null and userDefined7 != ''"> and user_defined7 = #{userDefined7}</if>
<if test="userDefined8 != null and userDefined8 != ''"> and user_defined8 = #{userDefined8}</if>
<if test="userDefined9 != null and userDefined9 != ''"> and user_defined9 = #{userDefined9}</if>
<if test="userDefined10 != null and userDefined10 != ''"> and user_defined10 = #{userDefined10}</if>
<if test="gmtCreate != null "> and gmt_create = #{gmtCreate}</if>
<if test="lastModifiedBy != null and lastModifiedBy != ''"> and last_modified_by = #{lastModifiedBy}</if>
<if test="gmtModified != null "> and gmt_modified = #{gmtModified}</if>
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="sapFactoryCode != null and sapFactoryCode != ''"> and sap_factory_code = #{sapFactoryCode}</if>
<if test="wlName != null and wlName != ''"> and wl_name like concat('%', #{wlName}, '%')</if>
<if test="spareUseLife != null and spareUseLife != ''"> and spare_use_life = #{spareUseLife}</if>
<if test="spareName != null and spareName != ''"> and spare_name like concat('%', #{spareName}, '%')</if>
<if test="spareMode != null and spareMode != ''"> and spare_mode like concat('%', #{spareMode}, '%')</if>
<if test="spareManufacturer != null and spareManufacturer != ''"> and spare_manufacturer = #{spareManufacturer}</if>
<if test="spareSupplier != null and spareSupplier != ''"> and spare_supplier = #{spareSupplier}</if>
<if test="spareReplacementCycle != null and spareReplacementCycle != ''"> and spare_replacement_cycle = #{spareReplacementCycle}</if>
<if test="spareMeasurementUnit != null and spareMeasurementUnit != ''"> and spare_measurement_unit = #{spareMeasurementUnit}</if>
<if test="spareConversionUnit != null and spareConversionUnit != ''"> and spare_conversion_unit = #{spareConversionUnit}</if>
<if test="spareConversionRatio != null and spareConversionRatio != ''"> and spare_conversion_ratio = #{spareConversionRatio}</if>
<if test="spareInventoryFloor != null and spareInventoryFloor != ''"> and spare_inventory_floor = #{spareInventoryFloor}</if>
<if test="spareInventoryUpper != null and spareInventoryUpper != ''"> and spare_inventory_upper = #{spareInventoryUpper}</if>
<if test="spareType != null and spareType != ''"> and spare_type = #{spareType}</if>
and del_flag = '0'
</where>
</select>
<select id="selectSparePartsLedgerByStorageId" parameterType="String" resultMap="SparePartsLedgerResult">
<include refid="selectSparePartsLedgerVo"/>
where storage_id = #{storageId}
and del_flag = '0'
and storage_tpye = 'SP'
</select>
<insert id="insertSparePartsLedger" parameterType="SparePartsLedger">
insert into wms_ods_mate_storage_news
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="storageId != null and storageId != ''">storage_id,</if>
<if test="whCode != null">wh_code,</if>
<if test="regionCode != null">region_code,</if>
<if test="waCode != null">wa_code,</if>
<if test="storageType != null">storage_type,</if>
<if test="wlCode != null">wl_code,</if>
<if test="materialCode != null">material_code,</if>
<if test="materialDesc != null">material_desc,</if>
<if test="amount != null">amount,</if>
<if test="storageAmount != null">storage_amount,</if>
<if test="occupyAmount != null">occupy_amount,</if>
<if test="lpn != null">lpn,</if>
<if test="productBatch != null">product_batch,</if>
<if test="receiveDate != null">receive_date,</if>
<if test="productDate != null">product_date,</if>
<if test="userDefined1 != null">user_defined1,</if>
<if test="userDefined2 != null">user_defined2,</if>
<if test="userDefined3 != null">user_defined3,</if>
<if test="userDefined4 != null">user_defined4,</if>
<if test="userDefined5 != null">user_defined5,</if>
<if test="userDefined6 != null">user_defined6,</if>
<if test="userDefined7 != null">user_defined7,</if>
<if test="userDefined8 != null">user_defined8,</if>
<if test="userDefined9 != null">user_defined9,</if>
<if test="userDefined10 != null">user_defined10,</if>
<if test="createBy != null">create_by,</if>
<if test="gmtCreate != null">gmt_create,</if>
<if test="lastModifiedBy != null">last_modified_by,</if>
<if test="gmtModified != null">gmt_modified,</if>
<if test="activeFlag != null">active_flag,</if>
<if test="factoryCode != null">factory_code,</if>
<if test="sapFactoryCode != null">sap_factory_code,</if>
<if test="wlName != null">wl_name,</if>
<if test="delFlag != null">del_flag,</if>
<if test="spareUseLife != null">spare_use_life,</if>
<if test="spareName != null">spare_name,</if>
<if test="spareMode != null">spare_mode,</if>
<if test="spareManufacturer != null">spare_manufacturer,</if>
<if test="spareSupplier != null">spare_supplier,</if>
<if test="spareReplacementCycle != null">spare_replacement_cycle,</if>
<if test="spareMeasurementUnit != null">spare_measurement_unit,</if>
<if test="spareConversionUnit != null">spare_conversion_unit,</if>
<if test="spareConversionRatio != null">spare_conversion_ratio,</if>
<if test="spareInventoryFloor != null">spare_inventory_floor,</if>
<if test="spareInventoryUpper != null">spare_inventory_upper,</if>
<if test="spareType != null">spare_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="storageId != null and storageId != ''">#{storageId},</if>
<if test="whCode != null">#{whCode},</if>
<if test="regionCode != null">#{regionCode},</if>
<if test="waCode != null">#{waCode},</if>
<if test="storageType != null">#{storageType},</if>
<if test="wlCode != null">#{wlCode},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="materialDesc != null">#{materialDesc},</if>
<if test="amount != null">#{amount},</if>
<if test="storageAmount != null">#{storageAmount},</if>
<if test="occupyAmount != null">#{occupyAmount},</if>
<if test="lpn != null">#{lpn},</if>
<if test="productBatch != null">#{productBatch},</if>
<if test="receiveDate != null">#{receiveDate},</if>
<if test="productDate != null">#{productDate},</if>
<if test="userDefined1 != null">#{userDefined1},</if>
<if test="userDefined2 != null">#{userDefined2},</if>
<if test="userDefined3 != null">#{userDefined3},</if>
<if test="userDefined4 != null">#{userDefined4},</if>
<if test="userDefined5 != null">#{userDefined5},</if>
<if test="userDefined6 != null">#{userDefined6},</if>
<if test="userDefined7 != null">#{userDefined7},</if>
<if test="userDefined8 != null">#{userDefined8},</if>
<if test="userDefined9 != null">#{userDefined9},</if>
<if test="userDefined10 != null">#{userDefined10},</if>
<if test="createBy != null">#{createBy},</if>
<if test="gmtCreate != null">#{gmtCreate},</if>
<if test="lastModifiedBy != null">#{lastModifiedBy},</if>
<if test="gmtModified != null">#{gmtModified},</if>
<if test="activeFlag != null">#{activeFlag},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="sapFactoryCode != null">#{sapFactoryCode},</if>
<if test="wlName != null">#{wlName},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="spareUseLife != null">#{spareUseLife},</if>
<if test="spareName != null">#{spareName},</if>
<if test="spareMode != null">#{spareMode},</if>
<if test="spareManufacturer != null">#{spareManufacturer},</if>
<if test="spareSupplier != null">#{spareSupplier},</if>
<if test="spareReplacementCycle != null">#{spareReplacementCycle},</if>
<if test="spareMeasurementUnit != null">#{spareMeasurementUnit},</if>
<if test="spareConversionUnit != null">#{spareConversionUnit},</if>
<if test="spareConversionRatio != null">#{spareConversionRatio},</if>
<if test="spareInventoryFloor != null">#{spareInventoryFloor},</if>
<if test="spareInventoryUpper != null">#{spareInventoryUpper},</if>
<if test="spareType != null">#{spareType},</if>
</trim>
</insert>
<update id="updateSparePartsLedger" parameterType="SparePartsLedger">
update wms_ods_mate_storage_news
<trim prefix="SET" suffixOverrides=",">
<if test="whCode != null">wh_code = #{whCode},</if>
<if test="regionCode != null">region_code = #{regionCode},</if>
<if test="waCode != null">wa_code = #{waCode},</if>
<if test="storageType != null">storage_type = #{storageType},</if>
<if test="wlCode != null">wl_code = #{wlCode},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="materialDesc != null">material_desc = #{materialDesc},</if>
<if test="amount != null">amount = #{amount},</if>
<if test="storageAmount != null">storage_amount = #{storageAmount},</if>
<if test="occupyAmount != null">occupy_amount = #{occupyAmount},</if>
<if test="lpn != null">lpn = #{lpn},</if>
<if test="productBatch != null">product_batch = #{productBatch},</if>
<if test="receiveDate != null">receive_date = #{receiveDate},</if>
<if test="productDate != null">product_date = #{productDate},</if>
<if test="userDefined1 != null">user_defined1 = #{userDefined1},</if>
<if test="userDefined2 != null">user_defined2 = #{userDefined2},</if>
<if test="userDefined3 != null">user_defined3 = #{userDefined3},</if>
<if test="userDefined4 != null">user_defined4 = #{userDefined4},</if>
<if test="userDefined5 != null">user_defined5 = #{userDefined5},</if>
<if test="userDefined6 != null">user_defined6 = #{userDefined6},</if>
<if test="userDefined7 != null">user_defined7 = #{userDefined7},</if>
<if test="userDefined8 != null">user_defined8 = #{userDefined8},</if>
<if test="userDefined9 != null">user_defined9 = #{userDefined9},</if>
<if test="userDefined10 != null">user_defined10 = #{userDefined10},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
<if test="lastModifiedBy != null">last_modified_by = #{lastModifiedBy},</if>
<if test="gmtModified != null">gmt_modified = #{gmtModified},</if>
<if test="activeFlag != null">active_flag = #{activeFlag},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
<if test="sapFactoryCode != null">sap_factory_code = #{sapFactoryCode},</if>
<if test="wlName != null">wl_name = #{wlName},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="spareUseLife != null">spare_use_life = #{spareUseLife},</if>
<if test="spareName != null">spare_name = #{spareName},</if>
<if test="spareMode != null">spare_mode = #{spareMode},</if>
<if test="spareManufacturer != null">spare_manufacturer = #{spareManufacturer},</if>
<if test="spareSupplier != null">spare_supplier = #{spareSupplier},</if>
<if test="spareReplacementCycle != null">spare_replacement_cycle = #{spareReplacementCycle},</if>
<if test="spareMeasurementUnit != null">spare_measurement_unit = #{spareMeasurementUnit},</if>
<if test="spareConversionUnit != null">spare_conversion_unit = #{spareConversionUnit},</if>
<if test="spareConversionRatio != null">spare_conversion_ratio = #{spareConversionRatio},</if>
<if test="spareInventoryFloor != null">spare_inventory_floor = #{spareInventoryFloor},</if>
<if test="spareInventoryUpper != null">spare_inventory_upper = #{spareInventoryUpper},</if>
<if test="spareType != null">spare_type = #{spareType},</if>
</trim>
where storage_id = #{storageId}
</update>
<delete id="deleteSparePartsLedgerByStorageId" parameterType="String">
delete from wms_ods_mate_storage_news where storage_id = #{storageId}
</delete>
<delete id="deleteSparePartsLedgerByStorageIds" parameterType="String">
delete from wms_ods_mate_storage_news where storage_id in
<foreach item="storageId" collection="array" open="(" separator="," close=")">
#{storageId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.SysUserMapper">
<resultMap type="SysUser" id="SysUserResult">
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="userName" column="user_name" />
<result property="nickName" column="nick_name" />
<result property="email" column="email" />
<result property="phonenumber" column="phonenumber" />
<result property="sex" column="sex" />
<result property="avatar" column="avatar" />
<result property="password" column="password" />
<result property="status" column="status" />
<result property="delFlag" column="del_flag" />
<result property="loginIp" column="login_ip" />
<result property="loginDate" column="login_date" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectSysUserVo">
select user_id, dept_id, user_name, nick_name, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark from sys_user
</sql>
<select id="selectSysUserList" parameterType="SysUser" resultMap="SysUserResult">
<include refid="selectSysUserVo"/>
<where>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
<if test="email != null and email != ''"> and email = #{email}</if>
<if test="phonenumber != null and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="avatar != null and avatar != ''"> and avatar = #{avatar}</if>
<if test="password != null and password != ''"> and password = #{password}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="loginIp != null and loginIp != ''"> and login_ip = #{loginIp}</if>
<if test="loginDate != null "> and login_date = #{loginDate}</if>
</where>
</select>
<select id="selectSysUserByUserId" parameterType="Long" resultMap="SysUserResult">
<include refid="selectSysUserVo"/>
where user_id = #{userId}
</select>
<insert id="insertSysUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="nickName != null and nickName != ''">nick_name,</if>
<if test="email != null">email,</if>
<if test="phonenumber != null">phonenumber,</if>
<if test="sex != null">sex,</if>
<if test="avatar != null">avatar,</if>
<if test="password != null">password,</if>
<if test="status != null">status,</if>
<if test="delFlag != null">del_flag,</if>
<if test="loginIp != null">login_ip,</if>
<if test="loginDate != null">login_date,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="nickName != null and nickName != ''">#{nickName},</if>
<if test="email != null">#{email},</if>
<if test="phonenumber != null">#{phonenumber},</if>
<if test="sex != null">#{sex},</if>
<if test="avatar != null">#{avatar},</if>
<if test="password != null">#{password},</if>
<if test="status != null">#{status},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="loginIp != null">#{loginIp},</if>
<if test="loginDate != null">#{loginDate},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSysUser" parameterType="SysUser">
update sys_user
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="email != null">email = #{email},</if>
<if test="phonenumber != null">phonenumber = #{phonenumber},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="avatar != null">avatar = #{avatar},</if>
<if test="password != null">password = #{password},</if>
<if test="status != null">status = #{status},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="loginIp != null">login_ip = #{loginIp},</if>
<if test="loginDate != null">login_date = #{loginDate},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where user_id = #{userId}
</update>
<delete id="deleteSysUserByUserId" parameterType="Long">
delete from sys_user where user_id = #{userId}
</delete>
<delete id="deleteSysUserByUserIds" parameterType="String">
delete from sys_user where user_id in
<foreach item="userId" collection="array" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
</mapper>

@ -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<String> getProcessFinishList(MesHourReport mesHourReport) {
public List<String> 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<String> dayHours = new ArrayList<String>();
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<HashMap> getHourProductionList(MesHourReport mesHourReport) {
List<String> hourNames = this.getProcessFinishList(mesHourReport);
List<String> hourNames = this.getHourProductionTitle(mesHourReport);
mesHourReport.setHourNames(hourNames);
List<HashMap> list = mesReportWorkService.getHourProductionList(mesHourReport);
return list;
}
@RequiresPermissions("mes:hourProduction:list")
@PostMapping("/getHourProductionExport")
public void getHourProductionExport(HttpServletResponse response,MesHourReport mesHourReport) {
List<String> hourNames = this.getHourProductionTitle(mesHourReport);
mesHourReport.setHourNames(hourNames);
List<HashMap> list = mesReportWorkService.getHourProductionList(mesHourReport);
//表格结构数据
String title = "表主标题";
ArrayList<ExcelCol> 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<hourNames.size();n++){
String hourName = hourNames.get(n);
excelCols.add(new ExcelCol(hourName,"hourPro"+n,20));
}
String titleName = "设备小时产量报表";
SXSSFWorkbook workbook = null;
try {
//设置响应头
response.setHeader("Content-disposition",
"attachment; filename="+ titleName);
response.setContentType("application/octet-stream;charset=UTF-8");
ServletOutputStream outputStream = response.getOutputStream();
//调用工具类
workbook = ExcelMapUtil.initWorkbook(titleName, titleName, excelCols, list);
workbook.write(outputStream);
} catch (Exception e) {
e.printStackTrace();
}finally {
if (workbook!=null){
workbook.dispose();
}
}
}
public static void main(String args[]){
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:00:00");

@ -57,7 +57,7 @@ public class WCSInterfaceController extends BaseController {
return success(WCInterfaceService.requestDestinationStations(wcsdto));
}
@Log(title = "获取料罐用量", businessType = BusinessType.GRANT)
@Log(title = "获取料罐用量(废弃,留着以后给别的功能用)", businessType = BusinessType.GRANT)
@PostMapping("/saveLGusedLog")
public AjaxResult saveLGusedLog(@RequestBody List<LGInfoDto> lgdtos) {
if(CollectionUtils.isEmpty(lgdtos)){

@ -28,6 +28,15 @@ public class MesHourReport extends BaseEntity {
private String workorderCode;
private List<String> 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;

@ -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;

@ -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() {
}
}

@ -85,4 +85,6 @@ public interface MesReportWorkMapper {
Map<String,MesHourReport> getHourProductionList(MesHourReport mesHourReport);
List<MesHourReport> getEquNames(MesHourReport mesHourReport);
List<MesShift> selectProShift();
}

@ -75,4 +75,6 @@ public interface IMesReportWorkService {
LineChartDto getLineChartData(MesReportProduction mesReportProduction);
List<HashMap> getHourProductionList(MesHourReport mesHourReport);
List<MesShift> getProShifts();
}

@ -150,7 +150,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
List<BoardDTO> totals = null;
List<BoardDTO> 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;

@ -289,6 +289,16 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
return days;
}
/**
* list
* @return
*/
@Override
@DS("#header.poolName")
public List<MesShift> getProShifts() {
return mesReportWorkMapper.selectProShift();
}
public static void main(String[] args) {
Calendar calendar = Calendar.getInstance();
Date now = calendar.getTime();

@ -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
</select>
<select id="getEveryNumL" resultType="com.op.system.api.domain.dto.BoardDTO">
select count(0) totalNum,
mt.device_code equCode,
mt.equipmentCode equCode,
equ.equipment_name equName,
equ.equipment_type_code equTypeCode
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}
group by mt.device_code,
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 mt.equipmentCode,
equ.equipment_name,
equ.equipment_type_code
</select>

@ -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
<if test="shiftId != null and shiftId != ''">
and pow.shift_id = #{shiftId}
</if>
<if test="orderCode != null and orderCode != ''">
and pow.order_code like concat('%', #{orderCode}, '%')
</if>
@ -255,6 +258,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1
<if test="productDateStart != null "> and CONVERT(varchar(30),mt.update_time, 120) >= #{productDateStart}</if>
<if test="productDateEnd != null "> and #{productDateEnd} > CONVERT(varchar(30),mt.update_time, 120)</if>
<if test="shiftId != null and shiftId != ''">
and pow.shift_id = #{shiftId}
</if>
<if test="orderCode != null and orderCode != ''">
and pow.order_code like concat('%', #{orderCode}, '%')
</if>
@ -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
<if test="shiftId != null and shiftId != ''">
and pow.shift_id = #{shiftId}
</if>
<if test="orderCode != null and orderCode != ''">
and pow.order_code like concat('%', #{orderCode}, '%')
</if>
@ -318,6 +326,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.equipmentCode,
equ.equipment_name
</select>
<select id="selectProShift" resultType="com.op.mes.domain.MesShift">
SELECT bst.Shift_Id shiftId,bst.Shift_Desc shiftDesc
FROM base_shifts_t bst
</select>
<insert id="insertMesReportWork" parameterType="MesReportWork">
insert into mes_report_work

@ -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...--------------------------------

@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -81,8 +82,12 @@ public class SapController extends BaseController {
logger.info("++++++++++++" + dateSource.get("poolName") + "++++product同步开始++++++++++");
DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key
Date maxTime = sapBomMapper.getProductMaxTime();
if(maxTime != null){
Date maxTime0 = sapBomMapper.getProductMaxTime();
if(maxTime0 != null){
Calendar calendar = Calendar.getInstance();
calendar.setTime(maxTime0);
calendar.add(Calendar.DAY_OF_YEAR, 1);
Date maxTime = calendar.getTime();
qo.setLaeda(DateFormatUtils.format(maxTime, "yyyyMMdd"));//修改日期20230923
}
@ -113,8 +118,12 @@ public class SapController extends BaseController {
logger.info("++++++++++++" + dateSource.get("poolName") + "++++bom同步开始++++++++++");
DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key
Date maxTime = sapBomMapper.getProductMaxTime();
if(maxTime != null){
Date maxTime0 = sapBomMapper.getProductMaxTime();
if(maxTime0 != null){
Calendar calendar = Calendar.getInstance();
calendar.setTime(maxTime0);
calendar.add(Calendar.DAY_OF_YEAR, 1);
Date maxTime = calendar.getTime();
qo.setAedat(DateFormatUtils.format(maxTime, "yyyyMMdd"));//修改日期20230923
}
@ -131,7 +140,6 @@ public class SapController extends BaseController {
/**
* 线
* @param SapRouterQuery qo
* @return
*/
@PostMapping("/sapRouterSync")
@ -147,8 +155,12 @@ public class SapController extends BaseController {
logger.info("++++++++++++" + dateSource.get("poolName") + "++++工艺同步开始++++++++++");
DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key
Date maxTime = sapBomMapper.getRouteMaxTime();
if(maxTime != null){
Date maxTime0 = sapBomMapper.getRouteMaxTime();
if(maxTime0 != null){
Calendar calendar = Calendar.getInstance();
calendar.setTime(maxTime0);
calendar.add(Calendar.DAY_OF_YEAR, 1);
Date maxTime = calendar.getTime();
qo.setAedat(DateFormatUtils.format(maxTime, "yyyyMMdd"));//修改日期20230923
}
qo.setWerks(dateSource.get("poolName").replace("ds_",""));//工厂
@ -227,8 +239,12 @@ public class SapController extends BaseController {
logger.info("++++++++++++" + dateSource.get("poolName") + "++++工作中心开始++++++++++");
DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key
qo.setWerks(dateSource.get("poolName").replace("ds_",""));//工厂
Date maxTime = sapBomMapper.getMaxTime();
if(maxTime != null){
Date maxTime0 = sapBomMapper.getMaxTime();
if(maxTime0 != null){
Calendar calendar = Calendar.getInstance();
calendar.setTime(maxTime0);
calendar.add(Calendar.DAY_OF_YEAR, 1);
Date maxTime = calendar.getTime();
qo.setAedat(DateFormatUtils.format(maxTime, "yyyyMMdd"));//修改日期20230923
}
@ -263,8 +279,12 @@ public class SapController extends BaseController {
logger.info("++++++++++++" + dateSource.get("poolName") + "++++供应商主数据开始++++++++++");
DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key
sapSupplierQuery.setBukrs(dateSource.get("poolName").replace("ds_",""));//工厂
Date maxTime = sapBomMapper.getSupplierMaxTime();
if(maxTime != null){
Date maxTime0 = sapBomMapper.getSupplierMaxTime();
if(maxTime0 != null){
Calendar calendar = Calendar.getInstance();
calendar.setTime(maxTime0);
calendar.add(Calendar.DAY_OF_YEAR, 1);
Date maxTime = calendar.getTime();
sapSupplierQuery.setErdat(DateFormatUtils.format(maxTime, "yyyyMMdd"));//修改日期20230923
}
@ -301,8 +321,13 @@ public class SapController extends BaseController {
logger.info("++++++++++++" + dateSource.get("poolName") + "++++客户主数据开始++++++++++");
DynamicDataSourceContextHolder.push(dateSource.get("poolName"));// 这是数据源的key
sapCustom.setBukrs(dateSource.get("poolName").replace("ds_",""));//工厂
Date maxTime = sapBomMapper.getCustomMaxTime();
if(maxTime != null){
Date maxTime0 = sapBomMapper.getCustomMaxTime();
if(maxTime0 != null){
Calendar calendar = Calendar.getInstance();
calendar.setTime(maxTime0);
calendar.add(Calendar.DAY_OF_YEAR, 1);
Date maxTime = calendar.getTime();
sapCustom.setErdat(DateFormatUtils.format(maxTime, "yyyyMMdd"));//修改日期20230923
}

Loading…
Cancel
Save