From a23effb2cac6766b8698b3c6f486b9ac6c8ed887 Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Fri, 28 Mar 2025 18:24:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/api/domain/SltAgreementApply.java | 2 + .../sgzb/material/config/PoiOutPage.java | 15 +- .../RepairAuditDetailsController.java | 2 +- .../SltAgreementInfoController.java | 201 +++++------------- .../mapper/RepairAuditDetailsMapper.java | 5 + .../impl/RepairAuditDetailsServiceImpl.java | 104 +++++---- .../bonus/sgzb/material/vo/ScrapAudit.java | 4 + .../material/RepairAuditDetailsMapper.xml | 13 ++ 8 files changed, 144 insertions(+), 202 deletions(-) diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementApply.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementApply.java index 93df7d0..f8eea42 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementApply.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementApply.java @@ -22,6 +22,8 @@ public class SltAgreementApply { *协议id */ private String agreementId; + + private List agreementIds; /** * 项目名称 */ diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/config/PoiOutPage.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/config/PoiOutPage.java index d07af47..3b4c701 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/config/PoiOutPage.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/config/PoiOutPage.java @@ -205,7 +205,7 @@ public class PoiOutPage { return workbook; } - public static HSSFWorkbook excelForcheckTwo(List> result, List list, String filename, String projectName, String unit, BigDecimal totalCost) { + public static HSSFWorkbook excelForcheckTwo(List> result, List list, String filename, String projectName, String unit, BigDecimal totalCost,int type) { // 创建工作簿和工作表 HSSFWorkbook workbook = new HSSFWorkbook(); HSSFSheet sheet = workbook.createSheet(); @@ -223,7 +223,7 @@ public class PoiOutPage { // 填充标题行 int rowNum = 0; rowNum = createTitleRowStyle(sheet, rowNum, filename, titleStyle, list.size()); - rowNum = createProjectAndUnitRow(sheet, rowNum, projectName, unit, titleStyle, list.size()); + rowNum = createProjectAndUnitRow(sheet, rowNum, projectName, unit, titleStyle, list.size(),type); // 填充表头 rowNum = createHeaderRow(sheet, rowNum, list, headerStyle); @@ -283,7 +283,7 @@ public class PoiOutPage { // 填充标题行 int rowNum = 0; rowNum = createTitleRowStyle(sheet, rowNum, filename, titleStyle, listLease.size()); - rowNum = createProjectAndUnitRow(sheet, rowNum, projectName, unit, titleStyle, listLease.size()); + rowNum = createProjectAndUnitRow(sheet, rowNum, projectName, unit, titleStyle, listLease.size(),1); /** * 租赁费用明细 @@ -905,7 +905,7 @@ public class PoiOutPage { /** * 创建结算单位和结算工程行 */ - private static int createProjectAndUnitRow(HSSFSheet sheet, int rowNum, String projectName, String unitName,HSSFCellStyle titleStyle, int nColumn) { + private static int createProjectAndUnitRow(HSSFSheet sheet, int rowNum, String projectName, String unitName,HSSFCellStyle titleStyle, int nColumn,int type) { // 第一行:结算单位 HSSFRow row1 = sheet.createRow(rowNum++); row1.setHeightInPoints(30); @@ -949,7 +949,12 @@ public class PoiOutPage { redStyle.setFont(font); cell6.setCellStyle(redStyle); // 应用红色字体样式 - cell6.setCellValue("01"); + if(type==1){ + cell6.setCellValue("01"); + }else{ + cell6.setCellValue("03"); + } + // 添加边框 CellRangeAddress cellRange1 = new CellRangeAddress(rowNum - 2, rowNum - 2, 0, 1); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairAuditDetailsController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairAuditDetailsController.java index 269b91f..9a96193 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairAuditDetailsController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairAuditDetailsController.java @@ -125,7 +125,7 @@ public class RepairAuditDetailsController extends BaseController { * 修饰任务审核 */ @ApiOperation("修饰任务审核") - @Log(title = "修饰任务审核", businessType = BusinessType.UPDATE) + @Log(title = "修饰任务审核", businessType = BusinessType.MATERIAL) @PostMapping("/audit") public AjaxResult audit(@RequestBody ScrapAudit scrapAudit) throws Exception { return toAjax(repairAuditDetailsService.auditRepair(scrapAudit)); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java index e2bc26a..4928cbc 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java @@ -203,7 +203,7 @@ public class SltAgreementInfoController extends BaseController { results.add(maps); } List headers = receiveDetailsHeader(type,0); - HSSFWorkbook workbook = PoiOutPage.excelForcheckTwo(results, headers, filename,projectName,unitName,totalCost); + HSSFWorkbook workbook = PoiOutPage.excelForcheckTwo(results, headers, filename,projectName,unitName,totalCost,type); OutputStream out = null; response.setContentType("application/vnd.ms-excel;charset=UTF-8"); response.addHeader("Content-Disposition", @@ -241,7 +241,6 @@ public class SltAgreementInfoController extends BaseController { if(type==1){ // maps.put("unitName", bean.getUnitName()); // maps.put("projectName", bean.getProjectName()); - if (flag==0){ maps.put("typeName", bean.getTypeName()); maps.put("modelName", bean.getModelName()); maps.put("nuitName", bean.getNuitName()); @@ -257,88 +256,22 @@ public class SltAgreementInfoController extends BaseController { maps.put("monthCosts", bean.getRealCosts()); maps.put("nowCosts", bean.getRealCosts()); maps.put("remark", bean.getRemark()); - }else { -// maps.put("typeName", bean.getTypeName()); -// maps.put("modelName", bean.getModelName()); -// maps.put("mtUnitName", bean.getMtUnitName()); -// maps.put("leasePrice", bean.getLeasePrice()); -// maps.put("num", bean.getNum()); -// maps.put("startTime", bean.getStartTime()==null ? null:dateFormat.format(bean.getStartTime())); -// maps.put("endTime", bean.getEndTime()==null ? null:dateFormat.format(bean.getEndTime())); -// maps.put("leaseDays", bean.getLeaseDays()); -// maps.put("costs", bean.getCosts().setScale(2, RoundingMode.HALF_UP)); -// maps.put("t1", ""); - } - }else if(type==2) { -// if(flag==0){ -// maps.put("typeName", bean.getTypeName()); -// maps.put("modelName", bean.getModelName()); -// maps.put("mtUnitName", bean.getMtUnitName()); -// maps.put("num", bean.getNum()); -// maps.put("costs", bean.getCosts()); -// }else{ -// maps.put("typeName", bean.getTypeName()); -// maps.put("modelName", bean.getModelName()); -// maps.put("mtUnitName", bean.getMtUnitName()); -// maps.put("num", bean.getNum()); -// maps.put("costs", bean.getCosts()); -// maps.put("t1", ""); -// maps.put("t2", ""); -// maps.put("t3", ""); -// maps.put("t4", ""); -// maps.put("t5", ""); -// } - }else if(type==3){ -// if(flag==0){ -// maps.put("typeName", bean.getTypeName()); -// maps.put("modelName", bean.getModelName()); -// maps.put("mtUnitName", bean.getMtUnitName()); -// maps.put("num", bean.getNum()); -// maps.put("partType", bean.getPartType()); -// maps.put("costs", bean.getCosts()); -// }else{ -// maps.put("typeName", bean.getTypeName()); -// maps.put("modelName", bean.getModelName()); -// maps.put("mtUnitName", bean.getMtUnitName()); -// maps.put("num", bean.getNum()); -// maps.put("partType", bean.getPartType()); -// maps.put("costs", bean.getCosts()); -// maps.put("t1", ""); -// maps.put("t2", ""); -// maps.put("t3", ""); -// maps.put("t4", ""); -// } - }else if(type==4){ -// if(flag==0){ -// maps.put("typeName", bean.getTypeName()); -// maps.put("modelName", bean.getModelName()); -// maps.put("mtUnitName", bean.getMtUnitName()); -// maps.put("num", bean.getNum()); -// maps.put("partType", bean.getPartType()); -// maps.put("costs", bean.getCosts()); -// }else{ -// maps.put("typeName", bean.getTypeName()); -// maps.put("modelName", bean.getModelName()); -// maps.put("mtUnitName", bean.getMtUnitName()); -// maps.put("num", bean.getNum()); -// maps.put("partType", bean.getPartType()); -// maps.put("costs", bean.getCosts()); -// maps.put("t1", ""); -// maps.put("t2", ""); -// maps.put("t3", ""); -// maps.put("t4", ""); -// } - } else if(type==5){ -// maps.put("typeName", bean.getTypeName()); -// maps.put("modelName", bean.getModelName()); -// maps.put("mtUnitName", bean.getUnitName()); -// maps.put("leasePrice", bean.getLeasePrice()); -// maps.put("num", bean.getReduceNum()); -// maps.put("startTime", bean.getStartTime()==null ? null:dateFormat.format(bean.getStartTime())); -// maps.put("endTime", bean.getEndTime()==null ? null:dateFormat.format(bean.getEndTime())); -// maps.put("leaseDays", bean.getDays()); -// maps.put("remark", bean.getRemark()); -// maps.put("costs", bean.getLeaseMoney().setScale(2, RoundingMode.HALF_UP)); + }else if(type==3) { + maps.put("typeName", bean.getTypeName()); + maps.put("modelName", bean.getModelName()); + maps.put("nuitName", bean.getNuitName()); + maps.put("num", bean.getNum()); + maps.put("leasePrice", bean.getLeasePrice()); + maps.put("startTime", bean.getStartTime()); + maps.put("endTime", bean.getEndTime()); + maps.put("leaseDays", bean.getLeaseDays()); + maps.put("costs", bean.getCosts().setScale(2, RoundingMode.HALF_UP)); + maps.put("trimDay", bean.getTrimDay()); + maps.put("realDays", bean.getRealDays()); + maps.put("realCosts", bean.getRealCosts()); + maps.put("monthCosts", bean.getRealCosts()); + maps.put("nowCosts", bean.getRealCosts()); + maps.put("remark", bean.getRemark()); } return maps; } @@ -381,77 +314,23 @@ public class SltAgreementInfoController extends BaseController { list.add("租赁费用(元)"); list.add(" "); } - }else if(type==2){ - if(flag==0){ - list.add("设备名称"); - list.add("规格型号"); - list.add("计量单位"); - list.add("丢失数量"); - list.add("丢失费用(元)"); - }else{ - list.add("设备名称"); - list.add("规格型号"); - list.add("计量单位"); - list.add("丢失数量"); - list.add("丢失费用(元)"); - list.add(" "); - list.add(" "); - list.add(" "); - list.add(" "); - list.add(" "); - } - }else if(type==3){ - if(flag==0){ - list.add("设备名称"); - list.add("规格型号"); - list.add("计量单位"); - list.add("维修数量"); - list.add("是否收费"); - list.add("维修费用(元)"); - }else{ - list.add("设备名称"); - list.add("规格型号"); - list.add("计量单位"); - list.add("维修数量"); - list.add("是否收费"); - list.add("维修费用(元)"); - list.add(""); - list.add(""); - list.add(""); - list.add(" "); - } - }else if(type==4){ - if(flag==0){ - list.add("设备名称"); - list.add("规格型号"); - list.add("计量单位"); - list.add("报废数量"); - list.add("是否收费"); - list.add("报废费用(元)"); - }else{ - list.add("设备名称"); - list.add("规格型号"); - list.add("计量单位"); - list.add("报废数量"); - list.add("是否收费"); - list.add("报废费用(元)"); - list.add(""); - list.add(""); - list.add(""); - list.add(" "); - } - }else if (type==5){ list.add("设备名称"); list.add("规格型号"); list.add("单位"); - list.add("租赁单价"); - list.add("减免数量"); - list.add("减免开始日期"); - list.add("减免结束日期"); - list.add("减免天数"); - list.add("减免原因"); - list.add("减免费用(元)"); + list.add("数量"); + list.add("台班费单价(元/天)"); + list.add("起租日期"); + list.add("终止日期"); + list.add("应结算天数"); + list.add("应结算金额(元)"); + list.add("调整天数"); + list.add("实际结算天数"); + list.add("实际结算金额(元)"); + list.add("月结已入账金额(元)"); + list.add("本次结算金额(元)"); + list.add("备注"); + } return list; } @@ -462,9 +341,27 @@ public class SltAgreementInfoController extends BaseController { @Log(title = "租赁明细导出", businessType = BusinessType.EXPORT) @PostMapping("/exportLeaseThree") @RequiresPermissions("ndertake:export_2") - public void exportLeaseThree(HttpServletResponse response, @RequestBody List list) { + public void exportLeaseThree(HttpServletResponse response, @RequestBody List list) throws Exception { + List projectNames = new ArrayList<>(); + List unitNames = new ArrayList<>(); + String fileName = "重庆市送变电工程有限公司设备租赁结算单"; + //设置单位和工程名称 + for (AgreementInfo info : list) { + projectNames.add(info.getProjectName()); + unitNames.add(info.getUnitName()); + } List explist = sltAgreementInfoService.getLeaseListThree(list); + String projectName = handleData(projectNames); + String unitName = handleData(unitNames); + BigDecimal totalCost = BigDecimal.valueOf(0.00); + for (SltAgreementInfo sltAgreementInfo : explist) { + totalCost = totalCost.add(sltAgreementInfo.getRealCosts()); + } List leaseInfoList = Convert.toList(LeaseInfo.class, explist); + expOutExcel(response,leaseInfoList,fileName,projectName,unitName,totalCost,3); + + + ExcelUtil util = new ExcelUtil(LeaseInfo.class); util.exportExcel(response, leaseInfoList, "租赁明细导出"); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairAuditDetailsMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairAuditDetailsMapper.java index d9472ed..14d33ac 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairAuditDetailsMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairAuditDetailsMapper.java @@ -158,4 +158,9 @@ public interface RepairAuditDetailsMapper List getRepairContent(ScrapApplyDetailsVO scrapApplyDetailsVO); List getfileList(RepairAuditDetails auditDetails); + + int updateRepairInBound(RepairAuditDetails bean); + + int addStorageNum(RepairAuditDetails bean); + } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairAuditDetailsServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairAuditDetailsServiceImpl.java index 5bc09e7..9488382 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairAuditDetailsServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairAuditDetailsServiceImpl.java @@ -208,19 +208,21 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService public int auditRepair(ScrapAudit scrapAudit) throws Exception { String checkResult = scrapAudit.getCheckResult(); List auditDetailList = scrapAudit.getAuditDetailList(); - for (RepairAuditDetails repairAuditDetails : auditDetailList) { - // 添加附件 - List fileList = repairAuditDetails.getFileList(); - if (fileList != null) { - for (FileInfo fileInfo : fileList) { - fileInfo.setModelId(repairAuditDetails.getTaskId()); - fileInfo.setTypeId(fileInfo.getTypeId()); - if (fileInfo.getMaId() != null) { - fileInfo.setMaId(fileInfo.getMaId()); + if(auditDetailList!=null){ + for (RepairAuditDetails repairAuditDetails : auditDetailList) { + // 添加附件 + List fileList = repairAuditDetails.getFileList(); + if (fileList != null) { + for (FileInfo fileInfo : fileList) { + fileInfo.setModelId(repairAuditDetails.getTaskId()); + fileInfo.setTypeId(fileInfo.getTypeId()); + if (fileInfo.getMaId() != null) { + fileInfo.setMaId(fileInfo.getMaId()); + } + fileInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString()); + fileInfo.setCreateTime(DateUtils.getNowDate()); + backReceiveMapper.insertBmFileInfo(fileInfo); } - fileInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString()); - fileInfo.setCreateTime(DateUtils.getNowDate()); - backReceiveMapper.insertBmFileInfo(fileInfo); } } } @@ -262,42 +264,56 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService scrapNumList = repairAuditDetailsMapper.selectScrapNumByTaskId(taskId); } - if (repairInputList != null && repairInputList.size() > 0) { - if (repairInputList.get(0).getCompanyId() != null) { - companyId = repairInputList.get(0).getCompanyId(); + //遍历repairInputList 数量/编码 + for (RepairAuditDetails repairAuditDetails : repairInputList) { + //判断是否包含编号 1.包含 修改状态为在库 15 2.不包含 + if (repairAuditDetails.getMaId()!=null) { + repairAuditDetailsMapper.updateRepairInBound(repairAuditDetails); } + // 增加库存 + int numTemp = repairAuditDetailsMapper.addStorageNum(repairAuditDetails); - taskCode = purchaseCodeRule("R", 50); - taskStatus = 53; - taskType = 50; - long inputTaskId = genTask(taskCode, taskType, taskStatus, tmTaskAgreement, companyId); - for (RepairAuditDetails inputDetails : repairInputList) { - Integer repairNum = inputDetails.getRepairedNum(); - // 创建修饰后入库任务 - if (repairNum.compareTo(b) > 0) { - // 添加修试后入库任务 - RepairInputDetails repairInputDetails = new RepairInputDetails(); - repairInputDetails.setTaskId(inputTaskId); - repairInputDetails.setAuditId(inputDetails.getId()); - repairInputDetails.setRepairId(inputDetails.getRepairId()); - repairInputDetails.setRepairNum(inputDetails.getRepairedNum()); - repairInputDetails.setTypeId(inputDetails.getTypeId()); - repairInputDetails.setMaId(inputDetails.getMaId()); - repairInputDetails.setStatus("0"); - repairInputDetails.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); - repairInputDetails.setCreateTime(new Date()); - repairInputDetails.setCompanyId((long) companyId); - repairTestInputMapper.insertRepairInputDetails(repairInputDetails); - } - repairAuditDetailsMapper.updateRepairCost(inputDetails, status); - // 根据repairId找到taskId和 typeId 、maid - List repairApplyRecordId = repairAuditDetailsMapper.getRepairApplyRecordId(inputDetails.getRepairId()); - // 再去repair_apply_record 中查,并给一个标识表示审核完成 - for (String id : repairApplyRecordId) { - repairAuditDetailsMapper.updateRecodeStatus(id); - } + if(numTemp==0){ + throw new Exception("修改库存数量失败"); } } + +// if (repairInputList != null && repairInputList.size() > 0) { +// if (repairInputList.get(0).getCompanyId() != null) { +// companyId = repairInputList.get(0).getCompanyId(); +// } +// +// taskCode = purchaseCodeRule("R", 50); +// taskStatus = 53; +// taskType = 50; +// long inputTaskId = genTask(taskCode, taskType, taskStatus, tmTaskAgreement, companyId); +// for (RepairAuditDetails inputDetails : repairInputList) { +// Integer repairNum = inputDetails.getRepairedNum(); +// // 创建修饰后入库任务 +// if (repairNum.compareTo(b) > 0) { +// // 添加修试后入库任务 +// RepairInputDetails repairInputDetails = new RepairInputDetails(); +// repairInputDetails.setTaskId(inputTaskId); +// repairInputDetails.setAuditId(inputDetails.getId()); +// repairInputDetails.setRepairId(inputDetails.getRepairId()); +// repairInputDetails.setRepairNum(inputDetails.getRepairedNum()); +// repairInputDetails.setTypeId(inputDetails.getTypeId()); +// repairInputDetails.setMaId(inputDetails.getMaId()); +// repairInputDetails.setStatus("0"); +// repairInputDetails.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); +// repairInputDetails.setCreateTime(new Date()); +// repairInputDetails.setCompanyId((long) companyId); +// repairTestInputMapper.insertRepairInputDetails(repairInputDetails); +// } +// repairAuditDetailsMapper.updateRepairCost(inputDetails, status); +// // 根据repairId找到taskId和 typeId 、maid +// List repairApplyRecordId = repairAuditDetailsMapper.getRepairApplyRecordId(inputDetails.getRepairId()); +// // 再去repair_apply_record 中查,并给一个标识表示审核完成 +// for (String id : repairApplyRecordId) { +// repairAuditDetailsMapper.updateRecodeStatus(id); +// } +// } +// } if (scrapNumList != null && scrapNumList.size() > 0) { if (scrapNumList.get(0).getCompanyId() != null) { companyId = scrapNumList.get(0).getCompanyId(); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/ScrapAudit.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/ScrapAudit.java index 5b3c095..4d161e4 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/ScrapAudit.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/ScrapAudit.java @@ -43,4 +43,8 @@ public class ScrapAudit { @ApiModelProperty(value = "处置情况") private Integer disposition; + /** 操作前库存 */ + private int preStoreNum; + /** 操作后库存 */ + private int postStoreNum; } diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml index 5a2b9f2..80a5ffc 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml @@ -539,4 +539,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + update ma_machine + set ma_status = 15 + where ma_id = #{maId} + + + + update + ma_type + set + num = (ifnull(num,0)) + #{repairedNum} + where type_id = #{typeId} +