diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java index 14cc2b8d..2b6abf64 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java @@ -1,6 +1,7 @@ package com.bonus.sgzb.base.api.domain; import com.bonus.sgzb.common.core.web.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonInclude; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; @@ -22,6 +23,14 @@ public class MaType extends BaseEntity { @ApiModelProperty(value = "类型名称") private String typeName; + /** 类型ID */ + @ApiModelProperty(value = "类型ID,用作组织树筛选") + private Long id; + + /** 类型名称 */ + @ApiModelProperty(value = "类型名称,用作组织树筛选") + private String label; + /** 上级ID */ @ApiModelProperty(value = "上级ID") private Long parentId; @@ -157,6 +166,8 @@ public class MaType extends BaseEntity { @ApiModelProperty(value = "资产属性名称") private String propName; + /** 子节点 */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children = new ArrayList<>(); @@ -465,4 +476,20 @@ public class MaType extends BaseEntity { public void setUnitName(String unitName) { this.unitName = unitName; } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java index 683ae0df..4ca3042d 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java @@ -324,6 +324,7 @@ public class MaTypeServiceImpl implements ITypeService { Long pid = maType.getParentId(); if (parentId.equals(pid)) { List childLists = getChild(list, typeId); + maType.setChildren(childLists); childList.add(maType); } diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml index 9406ac07..ab00fb8b 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml @@ -154,7 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl, mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId, su.user_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time, - m.remark, m.company_id + m.remark, m.company_id ,m.type_id id , m.type_name label from ma_type m left join ma_prop_set mps on m.type_id = mps.type_id left join ma_prop_info mpi on mps.prop_id = mpi.prop_id diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckDetailsController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckDetailsController.java index 442fed80..69fa679a 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckDetailsController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckDetailsController.java @@ -45,7 +45,6 @@ public class PurchaseCheckDetailsController extends BaseController @GetMapping("/list") public TableDataInfo list(PurchaseCheckDetails purchaseCheckDetails) { - startPage(); List list = purchaseCheckDetailsService.selectPurchaseCheckDetailsList(purchaseCheckDetails); return getDataTable(list); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java new file mode 100644 index 00000000..dafc6455 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java @@ -0,0 +1,105 @@ +package com.bonus.sgzb.material.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.bonus.sgzb.material.domain.ScrapApplyDetails; +import com.bonus.sgzb.material.service.IScrapApplyDetailsService; +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.bonus.sgzb.common.log.annotation.Log; +import com.bonus.sgzb.common.log.enums.BusinessType; +import com.bonus.sgzb.common.security.annotation.RequiresPermissions; +import com.bonus.sgzb.common.core.web.controller.BaseController; +import com.bonus.sgzb.common.core.web.domain.AjaxResult; +import com.bonus.sgzb.common.core.utils.poi.ExcelUtil; +import com.bonus.sgzb.common.core.web.page.TableDataInfo; + +/** + * 报废任务详细scrap_apply_detailsController + * + * @author bonus + * @date 2023-12-15 + */ +@RestController +@RequestMapping("/details") +public class ScrapApplyDetailsController extends BaseController +{ + @Autowired + private IScrapApplyDetailsService scrapApplyDetailsService; + + /** + * 查询报废任务详细scrap_apply_details列表 + */ + @RequiresPermissions("system:details:list") + @GetMapping("/list") + public TableDataInfo list(ScrapApplyDetails scrapApplyDetails) + { + startPage(); + List list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails); + return getDataTable(list); + } + + /** + * 导出报废任务详细scrap_apply_details列表 + */ + @RequiresPermissions("system:details:export") + @Log(title = "报废任务详细scrap_apply_details", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ScrapApplyDetails scrapApplyDetails) + { + List list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails); + ExcelUtil util = new ExcelUtil(ScrapApplyDetails.class); + util.exportExcel(response, list, "报废任务详细scrap_apply_details数据"); + } + + /** + * 获取报废任务详细scrap_apply_details详细信息 + */ + @RequiresPermissions("system:details:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(scrapApplyDetailsService.selectScrapApplyDetailsById(id)); + } + + /** + * 新增报废任务详细scrap_apply_details + */ + @RequiresPermissions("system:details:add") + @Log(title = "报废任务详细scrap_apply_details", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ScrapApplyDetails scrapApplyDetails) + { + return toAjax(scrapApplyDetailsService.insertScrapApplyDetails(scrapApplyDetails)); + } + + /** + * 修改报废任务详细scrap_apply_details + */ + @RequiresPermissions("system:details:edit") + @Log(title = "报废任务详细scrap_apply_details", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ScrapApplyDetails scrapApplyDetails) + { + return toAjax(scrapApplyDetailsService.updateScrapApplyDetails(scrapApplyDetails)); + } + + /** + * 删除报废任务详细scrap_apply_details + */ + @RequiresPermissions("system:details:remove") + @Log(title = "报废任务详细scrap_apply_details", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(scrapApplyDetailsService.deleteScrapApplyDetailsByIds(ids)); + } +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BmQrcodeInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BmQrcodeInfo.java new file mode 100644 index 00000000..540e5a93 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BmQrcodeInfo.java @@ -0,0 +1,112 @@ +package com.bonus.sgzb.material.domain; + +import com.bonus.sgzb.common.core.annotation.Excel; +import com.bonus.sgzb.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 二维码管理bm_qrcode_info对象 bm_qrcode_info + * + * @author bonus + * @date 2023-12-15 + */ +public class BmQrcodeInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 二维码ID */ + private Long qrId; + + /** 二维码 */ + @Excel(name = "二维码") + private String qrCode; + + /** 类型ID */ + @Excel(name = "类型ID") + private Long typeId; + + /** 二维码类型 */ + @Excel(name = "二维码类型") + private String qrType; + + /** 任务ID */ + @Excel(name = "任务ID") + private Long taskId; + + /** 数据所属组织 */ + @Excel(name = "数据所属组织") + private Long companyId; + + public void setQrId(Long qrId) + { + this.qrId = qrId; + } + + public Long getQrId() + { + return qrId; + } + public void setQrCode(String qrCode) + { + this.qrCode = qrCode; + } + + public String getQrCode() + { + return qrCode; + } + public void setTypeId(Long typeId) + { + this.typeId = typeId; + } + + public Long getTypeId() + { + return typeId; + } + public void setQrType(String qrType) + { + this.qrType = qrType; + } + + public String getQrType() + { + return qrType; + } + public void setTaskId(Long taskId) + { + this.taskId = taskId; + } + + public Long getTaskId() + { + return taskId; + } + public void setCompanyId(Long companyId) + { + this.companyId = companyId; + } + + public Long getCompanyId() + { + return companyId; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("qrId", getQrId()) + .append("qrCode", getQrCode()) + .append("typeId", getTypeId()) + .append("qrType", getQrType()) + .append("taskId", getTaskId()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("companyId", getCompanyId()) + .toString(); + } +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckDetails.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckDetails.java index bf9eebfa..eb26f2a0 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckDetails.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckDetails.java @@ -63,6 +63,10 @@ public class PurchaseCheckDetails extends BaseEntity @ApiModelProperty(value = "出厂日期") private Date productionTime; + /** 入库数量 */ + @ApiModelProperty(value = "入库数量") + private double inputNum; + /** 验收图片 */ @ApiModelProperty(value = "验收图片") private String checkUrlName; @@ -90,7 +94,7 @@ public class PurchaseCheckDetails extends BaseEntity private String specificationType; @ApiModelProperty(value = "机具类型名称") - private String typeName; + private String machineTypeName; public void setTaskId(Long taskId) { @@ -172,14 +176,6 @@ public class PurchaseCheckDetails extends BaseEntity this.specificationType = specificationType; } - public String getTypeName() { - return typeName; - } - - public void setTypeName(String typeName) { - this.typeName = typeName; - } - public String getSupplier() { return supplier; } @@ -244,6 +240,22 @@ public class PurchaseCheckDetails extends BaseEntity this.status = status; } + public String getMachineTypeName() { + return machineTypeName; + } + + public void setMachineTypeName(String machineTypeName) { + this.machineTypeName = machineTypeName; + } + + public double getInputNum() { + return inputNum; + } + + public void setInputNum(double inputNum) { + this.inputNum = inputNum; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java new file mode 100644 index 00000000..d44b7b07 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java @@ -0,0 +1,243 @@ +package com.bonus.sgzb.material.domain; + +import java.math.BigDecimal; +import java.util.Date; + +import com.bonus.sgzb.common.core.web.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.bonus.sgzb.common.core.annotation.Excel; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 报废任务详细scrap_apply_details对象 scrap_apply_details + * + * @author bonus + * @date 2023-12-15 + */ +public class ScrapApplyDetails extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 任务ID */ + @Excel(name = "任务ID") + private Long taskId; + + /** 上级ID */ + @Excel(name = "上级ID") + private Long parentId; + + /** 机具ID */ + @Excel(name = "机具ID") + private Long maId; + + /** 规格ID */ + @Excel(name = "规格ID") + private Long typeId; + + /** 报废数量 */ + @Excel(name = "报废数量") + private BigDecimal scrapNum; + + /** (1退料2,维修审核,3盘点) */ + @Excel(name = "(1退料2,维修审核,3盘点)") + private String scrapSource; + + /** (0自然,1人为) */ + @Excel(name = "", readConverterExp = "0=自然,1人为") + private String scrapType; + + /** 状态(0进行中,1已审核,2驳回) */ + @Excel(name = "状态", readConverterExp = "0=进行中,1已审核,2驳回") + private String status; + + /** 审核人 */ + @Excel(name = "审核人") + private Long auditBy; + + /** 审核时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date auditTime; + + /** 审核备注 */ + @Excel(name = "审核备注") + private String auditRemark; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String fileUrl; + + /** 数据所属组织 */ + @Excel(name = "数据所属组织") + private Long companyId; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String fileName; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setTaskId(Long taskId) + { + this.taskId = taskId; + } + + public Long getTaskId() + { + return taskId; + } + public void setParentId(Long parentId) + { + this.parentId = parentId; + } + + public Long getParentId() + { + return parentId; + } + public void setMaId(Long maId) + { + this.maId = maId; + } + + public Long getMaId() + { + return maId; + } + public void setTypeId(Long typeId) + { + this.typeId = typeId; + } + + public Long getTypeId() + { + return typeId; + } + public void setScrapNum(BigDecimal scrapNum) + { + this.scrapNum = scrapNum; + } + + public BigDecimal getScrapNum() + { + return scrapNum; + } + public void setScrapSource(String scrapSource) + { + this.scrapSource = scrapSource; + } + + public String getScrapSource() + { + return scrapSource; + } + public void setScrapType(String scrapType) + { + this.scrapType = scrapType; + } + + public String getScrapType() + { + return scrapType; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + public void setAuditBy(Long auditBy) + { + this.auditBy = auditBy; + } + + public Long getAuditBy() + { + return auditBy; + } + public void setAuditTime(Date auditTime) + { + this.auditTime = auditTime; + } + + public Date getAuditTime() + { + return auditTime; + } + public void setAuditRemark(String auditRemark) + { + this.auditRemark = auditRemark; + } + + public String getAuditRemark() + { + return auditRemark; + } + public void setFileUrl(String fileUrl) + { + this.fileUrl = fileUrl; + } + + public String getFileUrl() + { + return fileUrl; + } + public void setCompanyId(Long companyId) + { + this.companyId = companyId; + } + + public Long getCompanyId() + { + return companyId; + } + public void setFileName(String fileName) + { + this.fileName = fileName; + } + + public String getFileName() + { + return fileName; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("taskId", getTaskId()) + .append("parentId", getParentId()) + .append("maId", getMaId()) + .append("typeId", getTypeId()) + .append("scrapNum", getScrapNum()) + .append("scrapSource", getScrapSource()) + .append("scrapType", getScrapType()) + .append("status", getStatus()) + .append("auditBy", getAuditBy()) + .append("auditTime", getAuditTime()) + .append("auditRemark", getAuditRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("fileUrl", getFileUrl()) + .append("companyId", getCompanyId()) + .append("fileName", getFileName()) + .toString(); + } +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BmQrcodeInfoMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BmQrcodeInfoMapper.java new file mode 100644 index 00000000..cef72dbc --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BmQrcodeInfoMapper.java @@ -0,0 +1,64 @@ +package com.bonus.sgzb.material.mapper; + +import com.bonus.sgzb.material.domain.BmQrcodeInfo; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 二维码管理bm_qrcode_infoMapper接口 + * + * @author bonus + * @date 2023-12-15 + */ +@Mapper +public interface BmQrcodeInfoMapper +{ + /** + * 查询二维码管理bm_qrcode_info + * + * @param qrId 二维码管理bm_qrcode_info主键 + * @return 二维码管理bm_qrcode_info + */ + public BmQrcodeInfo selectBmQrcodeInfoByQrId(Long qrId); + + /** + * 查询二维码管理bm_qrcode_info列表 + * + * @param bmQrcodeInfo 二维码管理bm_qrcode_info + * @return 二维码管理bm_qrcode_info集合 + */ + public List selectBmQrcodeInfoList(BmQrcodeInfo bmQrcodeInfo); + + /** + * 新增二维码管理bm_qrcode_info + * + * @param bmQrcodeInfo 二维码管理bm_qrcode_info + * @return 结果 + */ + public int insertBmQrcodeInfo(BmQrcodeInfo bmQrcodeInfo); + + /** + * 修改二维码管理bm_qrcode_info + * + * @param bmQrcodeInfo 二维码管理bm_qrcode_info + * @return 结果 + */ + public int updateBmQrcodeInfo(BmQrcodeInfo bmQrcodeInfo); + + /** + * 删除二维码管理bm_qrcode_info + * + * @param qrId 二维码管理bm_qrcode_info主键 + * @return 结果 + */ + public int deleteBmQrcodeInfoByQrId(Long qrId); + + /** + * 批量删除二维码管理bm_qrcode_info + * + * @param qrIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBmQrcodeInfoByQrIds(Long[] qrIds); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ScrapApplyDetailsMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ScrapApplyDetailsMapper.java new file mode 100644 index 00000000..32d58d43 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ScrapApplyDetailsMapper.java @@ -0,0 +1,64 @@ +package com.bonus.sgzb.material.mapper; + +import com.bonus.sgzb.material.domain.ScrapApplyDetails; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 报废任务详细scrap_apply_detailsMapper接口 + * + * @author bonus + * @date 2023-12-15 + */ +@Mapper +public interface ScrapApplyDetailsMapper +{ + /** + * 查询报废任务详细scrap_apply_details + * + * @param id 报废任务详细scrap_apply_details主键 + * @return 报废任务详细scrap_apply_details + */ + public ScrapApplyDetails selectScrapApplyDetailsById(Long id); + + /** + * 查询报废任务详细scrap_apply_details列表 + * + * @param scrapApplyDetails 报废任务详细scrap_apply_details + * @return 报废任务详细scrap_apply_details集合 + */ + public List selectScrapApplyDetailsList(ScrapApplyDetails scrapApplyDetails); + + /** + * 新增报废任务详细scrap_apply_details + * + * @param scrapApplyDetails 报废任务详细scrap_apply_details + * @return 结果 + */ + public int insertScrapApplyDetails(ScrapApplyDetails scrapApplyDetails); + + /** + * 修改报废任务详细scrap_apply_details + * + * @param scrapApplyDetails 报废任务详细scrap_apply_details + * @return 结果 + */ + public int updateScrapApplyDetails(ScrapApplyDetails scrapApplyDetails); + + /** + * 删除报废任务详细scrap_apply_details + * + * @param id 报废任务详细scrap_apply_details主键 + * @return 结果 + */ + public int deleteScrapApplyDetailsById(Long id); + + /** + * 批量删除报废任务详细scrap_apply_details + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteScrapApplyDetailsByIds(Long[] ids); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IScrapApplyDetailsService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IScrapApplyDetailsService.java new file mode 100644 index 00000000..99b188c9 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IScrapApplyDetailsService.java @@ -0,0 +1,62 @@ +package com.bonus.sgzb.material.service; + +import com.bonus.sgzb.material.domain.ScrapApplyDetails; + +import java.util.List; + +/** + * 报废任务详细scrap_apply_detailsService接口 + * + * @author bonus + * @date 2023-12-15 + */ +public interface IScrapApplyDetailsService +{ + /** + * 查询报废任务详细scrap_apply_details + * + * @param id 报废任务详细scrap_apply_details主键 + * @return 报废任务详细scrap_apply_details + */ + public ScrapApplyDetails selectScrapApplyDetailsById(Long id); + + /** + * 查询报废任务详细scrap_apply_details列表 + * + * @param scrapApplyDetails 报废任务详细scrap_apply_details + * @return 报废任务详细scrap_apply_details集合 + */ + public List selectScrapApplyDetailsList(ScrapApplyDetails scrapApplyDetails); + + /** + * 新增报废任务详细scrap_apply_details + * + * @param scrapApplyDetails 报废任务详细scrap_apply_details + * @return 结果 + */ + public int insertScrapApplyDetails(ScrapApplyDetails scrapApplyDetails); + + /** + * 修改报废任务详细scrap_apply_details + * + * @param scrapApplyDetails 报废任务详细scrap_apply_details + * @return 结果 + */ + public int updateScrapApplyDetails(ScrapApplyDetails scrapApplyDetails); + + /** + * 批量删除报废任务详细scrap_apply_details + * + * @param ids 需要删除的报废任务详细scrap_apply_details主键集合 + * @return 结果 + */ + public int deleteScrapApplyDetailsByIds(Long[] ids); + + /** + * 删除报废任务详细scrap_apply_details信息 + * + * @param id 报废任务详细scrap_apply_details主键 + * @return 结果 + */ + public int deleteScrapApplyDetailsById(Long id); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java index d728ac2d..2a1e8ed1 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java @@ -51,7 +51,12 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService @Override public PurchaseCheckInfo selectPurchaseCheckInfoByTaskId(Long taskId) { - return purchaseCheckInfoMapper.selectPurchaseCheckInfoByTaskId(taskId); + PurchaseCheckInfo purchaseCheckInfo = purchaseCheckInfoMapper.selectPurchaseCheckInfoByTaskId(taskId); + PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails(); + purchaseCheckDetails.setTaskId(purchaseCheckInfo.getTaskId()); + List purchaseCheckDetailsList = purchaseCheckDetailsMapper.selectPurchaseCheckDetailsList(purchaseCheckDetails); + purchaseCheckInfo.setCheckDetailsList(purchaseCheckDetailsList); + return purchaseCheckInfo; } /** @@ -100,7 +105,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService { TmTask task = new TmTask(); // 暂定的状态字典表 - task.setTaskType(14); + task.setTaskType(23); task.setTaskStatus(24); // 采购单号 task.setCode(purchaseCodeRule()); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java index 2dff7cf7..c9fa602a 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java @@ -8,8 +8,10 @@ import java.util.List; import com.alibaba.fastjson.JSONObject; import com.bonus.sgzb.base.api.domain.MaMachine; import com.bonus.sgzb.base.api.domain.TmTask; +import com.bonus.sgzb.material.domain.BmQrcodeInfo; import com.bonus.sgzb.material.domain.MaInputRecord; import com.bonus.sgzb.material.domain.PurchaseMacodeInfo; +import com.bonus.sgzb.material.mapper.BmQrcodeInfoMapper; import com.bonus.sgzb.material.mapper.PurchaseMacodeInfoMapper; import com.bonus.sgzb.material.mapper.TaskMapper; import com.bonus.sgzb.material.service.IPurchaseMacodeInfoService; @@ -34,6 +36,9 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService @Resource private TaskMapper taskMapper; + @Resource + private BmQrcodeInfoMapper qrcodeInfoMapper; + /** @@ -82,9 +87,10 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService for (PurchaseMacodeInfo purchaseMacodeInfo : purchaseMacodeInfoList) { MaMachine maMachine = new MaMachine(); - maMachine.setTypeId(purchaseMacodeInfo.getTypeId()); + Long typeId = purchaseMacodeInfo.getTypeId(); + maMachine.setTypeId(typeId); // 查询机具类型前三级名称 - JSONObject jsonObject = purchaseMacodeInfoMapper.getTypeNameByTypeId(purchaseMacodeInfo.getTypeId()); + JSONObject jsonObject = purchaseMacodeInfoMapper.getTypeNameByTypeId(typeId); String specsName = jsonObject.getString("specsName"); String typeName = jsonObject.getString("typeName"); String itemTypeName = jsonObject.getString("itemTypeName"); @@ -105,6 +111,14 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService maMachine.setMaCode(purchaseMacodeInfo.getMaCode()); purchaseMacodeInfoMapper.maMachineAdd(maMachine); + // 二维码存储 + BmQrcodeInfo bmQrcodeInfo = new BmQrcodeInfo(); + bmQrcodeInfo.setTypeId(typeId); + bmQrcodeInfo.setQrCode(purchaseMacodeInfo.getQrCode()); + bmQrcodeInfo.setTaskId(purchaseMacodeInfo.getTaskId()); + bmQrcodeInfo.setCreateTime(new Date()); + qrcodeInfoMapper.insertBmQrcodeInfo(bmQrcodeInfo); + // 修改新购机具编码 purchaseMacodeInfo.setUpdateTime(DateUtils.getNowDate()); purchaseMacodeInfoMapper.updatePurchaseMacodeInfo(purchaseMacodeInfo); @@ -157,6 +171,8 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService int i1 = count + i; // 编码规则 String codingRule = "NXJJ" + typeCode + format + specsCode + "-000" + i1; + // 二维码 + String code = format + "000" + i1; list.add(codingRule); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java new file mode 100644 index 00000000..2c6429b1 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java @@ -0,0 +1,96 @@ +package com.bonus.sgzb.material.service.impl; + +import java.util.List; +import com.bonus.sgzb.common.core.utils.DateUtils; +import com.bonus.sgzb.material.domain.ScrapApplyDetails; +import com.bonus.sgzb.material.mapper.ScrapApplyDetailsMapper; +import com.bonus.sgzb.material.service.IScrapApplyDetailsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 报废任务详细scrap_apply_detailsService业务层处理 + * + * @author bonus + * @date 2023-12-15 + */ +@Service +public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService +{ + @Autowired + private ScrapApplyDetailsMapper scrapApplyDetailsMapper; + + /** + * 查询报废任务详细scrap_apply_details + * + * @param id 报废任务详细scrap_apply_details主键 + * @return 报废任务详细scrap_apply_details + */ + @Override + public ScrapApplyDetails selectScrapApplyDetailsById(Long id) + { + return scrapApplyDetailsMapper.selectScrapApplyDetailsById(id); + } + + /** + * 查询报废任务详细scrap_apply_details列表 + * + * @param scrapApplyDetails 报废任务详细scrap_apply_details + * @return 报废任务详细scrap_apply_details + */ + @Override + public List selectScrapApplyDetailsList(ScrapApplyDetails scrapApplyDetails) + { + return scrapApplyDetailsMapper.selectScrapApplyDetailsList(scrapApplyDetails); + } + + /** + * 新增报废任务详细scrap_apply_details + * + * @param scrapApplyDetails 报废任务详细scrap_apply_details + * @return 结果 + */ + @Override + public int insertScrapApplyDetails(ScrapApplyDetails scrapApplyDetails) + { + scrapApplyDetails.setCreateTime(DateUtils.getNowDate()); + return scrapApplyDetailsMapper.insertScrapApplyDetails(scrapApplyDetails); + } + + /** + * 修改报废任务详细scrap_apply_details + * + * @param scrapApplyDetails 报废任务详细scrap_apply_details + * @return 结果 + */ + @Override + public int updateScrapApplyDetails(ScrapApplyDetails scrapApplyDetails) + { + scrapApplyDetails.setUpdateTime(DateUtils.getNowDate()); + return scrapApplyDetailsMapper.updateScrapApplyDetails(scrapApplyDetails); + } + + /** + * 批量删除报废任务详细scrap_apply_details + * + * @param ids 需要删除的报废任务详细scrap_apply_details主键 + * @return 结果 + */ + @Override + public int deleteScrapApplyDetailsByIds(Long[] ids) + { + return scrapApplyDetailsMapper.deleteScrapApplyDetailsByIds(ids); + } + + /** + * 删除报废任务详细scrap_apply_details信息 + * + * @param id 报废任务详细scrap_apply_details主键 + * @return 结果 + */ + @Override + public int deleteScrapApplyDetailsById(Long id) + { + return scrapApplyDetailsMapper.deleteScrapApplyDetailsById(id); + } +} diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BmQrcodeInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BmQrcodeInfoMapper.xml new file mode 100644 index 00000000..aa58b695 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BmQrcodeInfoMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + select qr_id, qr_code, type_id, qr_type, task_id, create_by, create_time, update_by, update_time, remark, company_id from bm_qrcode_info + + + + + + + + insert into bm_qrcode_info + + qr_code, + type_id, + qr_type, + task_id, + create_by, + create_time, + update_by, + update_time, + remark, + company_id, + + + #{qrCode}, + #{typeId}, + #{qrType}, + #{taskId}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{companyId}, + + + + + update bm_qrcode_info + + qr_code = #{qrCode}, + type_id = #{typeId}, + qr_type = #{qrType}, + task_id = #{taskId}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + company_id = #{companyId}, + + where qr_id = #{qrId} + + + + delete from bm_qrcode_info where qr_id = #{qrId} + + + + delete from bm_qrcode_info where qr_id in + + #{qrId} + + + \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckDetailsMapper.xml index 41b6fae5..023fa9df 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckDetailsMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckDetailsMapper.xml @@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select pcd.id,pcd.task_id, pcd.type_id, pcd.purchase_price, pcd.purchase_num, pcd.check_num, pcd.check_result, pcd.supplier_id, pcd.status, msi.supplier, pcd.create_by, pcd.production_time, pcd.create_time, pcd.check_url_name, pcd.check_url, pcd.file_name, pcd.file_url,pcd.update_by, pcd.update_time, pcd.remark, pcd.company_id, - mt1.type_name typeName,mt.type_name specificationType + mt1.type_name machineTypeName,mt.type_name specificationType from purchase_check_details pcd left join ma_type mt on pcd.type_id = mt.type_id left join ma_type mt1 on mt.parent_id = mt1.type_id diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml new file mode 100644 index 00000000..76af8c25 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, task_id, parent_id, ma_id, type_id, scrap_num, scrap_source, scrap_type, status, audit_by, audit_time, audit_remark, create_by, create_time, update_by, update_time, remark, file_url, company_id, file_name from scrap_apply_details + + + + + + + + insert into scrap_apply_details + + id, + task_id, + parent_id, + ma_id, + type_id, + scrap_num, + scrap_source, + scrap_type, + status, + audit_by, + audit_time, + audit_remark, + create_by, + create_time, + update_by, + update_time, + remark, + file_url, + company_id, + file_name, + + + #{id}, + #{taskId}, + #{parentId}, + #{maId}, + #{typeId}, + #{scrapNum}, + #{scrapSource}, + #{scrapType}, + #{status}, + #{auditBy}, + #{auditTime}, + #{auditRemark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{fileUrl}, + #{companyId}, + #{fileName}, + + + + + update scrap_apply_details + + task_id = #{taskId}, + parent_id = #{parentId}, + ma_id = #{maId}, + type_id = #{typeId}, + scrap_num = #{scrapNum}, + scrap_source = #{scrapSource}, + scrap_type = #{scrapType}, + status = #{status}, + audit_by = #{auditBy}, + audit_time = #{auditTime}, + audit_remark = #{auditRemark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + file_url = #{fileUrl}, + company_id = #{companyId}, + file_name = #{fileName}, + + where id = #{id} + + + + delete from scrap_apply_details where id = #{id} + + + + delete from scrap_apply_details where id in + + #{id} + + + \ No newline at end of file diff --git a/sgzb-modules/sgzb-system/pom.xml b/sgzb-modules/sgzb-system/pom.xml index aea7397e..163e457a 100644 --- a/sgzb-modules/sgzb-system/pom.xml +++ b/sgzb-modules/sgzb-system/pom.xml @@ -99,6 +99,11 @@ io.netty netty-codec-http + + org.apache.poi + poi-scratchpad + 4.1.1 +