diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/InputRecordController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/InputRecordController.java new file mode 100644 index 00000000..fb5afc45 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/InputRecordController.java @@ -0,0 +1,59 @@ +package com.bonus.sgzb.material.controller; + +import com.bonus.sgzb.common.core.utils.poi.ExcelUtil; +import com.bonus.sgzb.common.core.web.controller.BaseController; +import com.bonus.sgzb.common.core.web.domain.AjaxResult; +import com.bonus.sgzb.common.log.annotation.Log; +import com.bonus.sgzb.common.log.enums.BusinessType; +import com.bonus.sgzb.material.domain.InputRecord; +import com.bonus.sgzb.material.domain.ScrapRecord; +import com.bonus.sgzb.material.service.InputRecordService; +import com.bonus.sgzb.material.service.ScrapRecordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** +* @description 综合查询--机具入库查询 +* @author hay +* @date 2024/2/26 14:15 +*/ +@Api(tags = "综合查询--机具入库查询") +@RestController +@RequestMapping("/inputRecord") +public class InputRecordController extends BaseController { + @Autowired + private InputRecordService inputRecordService; + + /** + * 机具入库查询列表 + */ + @ApiOperation(value = "综合查询--机具入库查询列表") + @GetMapping("/getInputRecordList") + public AjaxResult getInputRecordList(InputRecord bean) { + startPage(); + List list = inputRecordService.getInputRecordList(bean); + return AjaxResult.success(getDataTable(list)); + } + + /** + * 导出综合查询机具入库查询列表 + */ + @ApiOperation("导出综合查询机具入库查询列表") + @Log(title = "导出综合查询机具入库查询列表", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, InputRecord bean) + { + List list = inputRecordService.getInputRecordList(bean); + ExcelUtil util = new ExcelUtil(InputRecord.class); + util.exportExcel(response, list, "综合查询--入库记录"); + } + +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckInfoController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckInfoController.java index 4f537e1e..b1d1e7b0 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckInfoController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckInfoController.java @@ -1,22 +1,25 @@ package com.bonus.sgzb.material.controller; -import com.bonus.sgzb.common.core.utils.poi.ExcelUtil; -import com.bonus.sgzb.common.core.web.controller.BaseController; -import com.bonus.sgzb.common.core.web.domain.AjaxResult; -import com.bonus.sgzb.common.core.web.page.TableDataInfo; -import com.bonus.sgzb.common.log.annotation.Log; -import com.bonus.sgzb.common.log.enums.BusinessType; -import com.bonus.sgzb.material.domain.PurchaseCheckInfo; +import java.util.ArrayList; +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.bonus.sgzb.common.security.utils.SecurityUtils; import com.bonus.sgzb.material.domain.PurchaseInput; import com.bonus.sgzb.material.service.IPurchaseCheckInfoService; +import com.bonus.sgzb.material.domain.PurchaseCheckInfo; +import com.bonus.sgzb.material.service.PurchaseCheckServiceCenterService; import com.bonus.sgzb.material.vo.NoticeInfoVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; +import com.bonus.sgzb.common.log.annotation.Log; +import com.bonus.sgzb.common.log.enums.BusinessType; +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; /** * 新购验收任务 @@ -32,15 +35,25 @@ public class PurchaseCheckInfoController extends BaseController @Autowired private IPurchaseCheckInfoService purchaseCheckInfoService; + @Autowired + private PurchaseCheckServiceCenterService purchaseCheckServiceCenterService; + /** * 查询新购入库任务列表 */ @ApiOperation("查询新购入库任务列表") @GetMapping("/putInList") - public TableDataInfo putInList(PurchaseCheckInfo purchaseCheckInfo) - { + public TableDataInfo putInList(PurchaseCheckInfo purchaseCheckInfo) { startPage(); - List list = purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo); + List list = new ArrayList<>(); + //判断该组织是否开启综合服务中心审核 + Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId(); + int re = purchaseCheckServiceCenterService.selectExamineType(companyId); + if (re > 0) { + list = purchaseCheckInfoService.selectPutInListExamine(purchaseCheckInfo); + }else { + list = purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo); + } return getDataTable(list); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckServiceCenterController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckServiceCenterController.java new file mode 100644 index 00000000..3e263aea --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseCheckServiceCenterController.java @@ -0,0 +1,94 @@ +package com.bonus.sgzb.material.controller; + +import com.bonus.sgzb.common.core.utils.poi.ExcelUtil; +import com.bonus.sgzb.common.core.web.controller.BaseController; +import com.bonus.sgzb.common.core.web.domain.AjaxResult; +import com.bonus.sgzb.common.core.web.page.TableDataInfo; +import com.bonus.sgzb.common.log.annotation.Log; +import com.bonus.sgzb.common.log.enums.BusinessType; +import com.bonus.sgzb.common.security.utils.SecurityUtils; +import com.bonus.sgzb.material.domain.PurchaseCheckInfo; +import com.bonus.sgzb.material.domain.PurchaseInput; +import com.bonus.sgzb.material.domain.PurchaseMacodeInfo; +import com.bonus.sgzb.material.service.IPurchaseCheckInfoService; +import com.bonus.sgzb.material.service.PurchaseCheckServiceCenterService; +import com.bonus.sgzb.material.vo.MaInputVO; +import com.bonus.sgzb.material.vo.NoticeInfoVO; +import com.bonus.sgzb.system.api.domain.SysUser; +import com.bonus.sgzb.system.api.model.LoginUser; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.List; + +/** + * 新购--综合服务中心 + * + * @author bonus + * @date 2023-12-10 + */ +@RestController +@Api(value = "新购--综合服务中心") +@RequestMapping("/purchaseCheckServiceCenter") +public class PurchaseCheckServiceCenterController extends BaseController +{ + @Autowired + private PurchaseCheckServiceCenterService purchaseCheckServiceCenterService; + + /** + * 查询新购入库任务列表 + */ + @ApiOperation("查询新购入库任务列表") + @GetMapping("/putInList") + public TableDataInfo putInList(PurchaseCheckInfo purchaseCheckInfo) + { + startPage(); + List list=new ArrayList<>(); + //判断该组织是否开启综合服务中心审核 + Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId(); + int re =purchaseCheckServiceCenterService.selectExamineType(companyId); + if (re>0){ + list = purchaseCheckServiceCenterService.selectPutInListList(purchaseCheckInfo); + } + return getDataTable(list); + } + + /** + * 获取新购验收编号管理详细信息 + */ + @ApiOperation(value = "新购入库清单明细") + @GetMapping(value = "/putinDetails") + public TableDataInfo putinDetails(PurchaseMacodeInfo purchaseMacodeInfo) + { + startPage(); + return getDataTable(purchaseCheckServiceCenterService.selectPutinDetails(purchaseMacodeInfo)); + } + + /** + * 修改新购验收编号管理,暂时不用 + */ + @ApiOperation(value = "修改编码管理的入库状态") + @PutMapping("/manageStatus") + public AjaxResult modifyManageStatus(@RequestBody MaInputVO maInputVO) throws Exception { + return toAjax(purchaseCheckServiceCenterService.modifyManageStatus(maInputVO)); + } + + + /** + * 导出新购工机具入库 + */ + @ApiOperation("导出新购工机具入库") + @Log(title = "导出新购工机具入库", businessType = BusinessType.EXPORT) + @PostMapping("/putInExport") + public void putInExport(HttpServletResponse response, PurchaseCheckInfo purchaseCheckInfo) + { + List list = purchaseCheckServiceCenterService.putInExportList(purchaseCheckInfo); + ExcelUtil util = new ExcelUtil(PurchaseInput.class); + util.exportExcel(response, list, "新购工机具入库"); + } + +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java new file mode 100644 index 00000000..1762e19f --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java @@ -0,0 +1,219 @@ +package com.bonus.sgzb.material.domain; + +import com.bonus.sgzb.common.core.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** +* @description 综合查询--机具入库查询 +* @author hay +* @date 2024/2/26 14:51 +*/ +@ApiModel(description = "机具入库查询") +@Data +public class InputRecord { + + private static final long serialVersionUID = 2227217051604273598L; + + @ApiModelProperty(value = "") + private Integer id; + + /** + * 机具名称 + */ + @ApiModelProperty(value = "机具名称") + @Excel(name = "机具名称") + private String typeName; + + /** + * 规格ID + */ + @ApiModelProperty(value = "规格ID") + private Integer typeId; + + /** + * 规格型号 + */ + @ApiModelProperty(value = "规格型号") + @Excel(name = "规格型号") + private String typeModelName; + + /** + * 二维码编号 + */ + @ApiModelProperty(value = "二维码编号") + @Excel(name = "二维码编号") + private String qrCode; + + /** + * 设备编码 + */ + @ApiModelProperty(value = "设备编码") + @Excel(name = "设备编码") + private String maCode; + + /** + * 单位 + */ + @ApiModelProperty(value = "单位") + @Excel(name = "单位") + private String unit; + + /** + * 入库数量 + */ + @ApiModelProperty(value = "入库数量") + @Excel(name = "入库数量",cellType = Excel.ColumnType.NUMERIC) + private Double inputNum; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** + * 入库人 + */ + @ApiModelProperty(value = "入库人") + @Excel(name = "入库人") + private String userName; + + /** + * 入库类型 + */ + @ApiModelProperty(value = "入库类型") + @Excel(name = "入库类型") + private String inputType; + + /** + * 单位Id + */ + @ApiModelProperty(value = "单位Id") + private Integer unitId; + + /** + * 往来单位 + */ + @ApiModelProperty(value = "往来单位") + private String unitName; + + /** + * 工程Id + */ + @ApiModelProperty(value = "工程Id") + private Integer proId; + + /** + * 工程名称 + */ + @ApiModelProperty(value = "工程名称") + private String proName; + + /** + * 报废单号 + */ + @ApiModelProperty(value = "报废单号") + private String code; + + /** + * 来源单号 + */ + @ApiModelProperty(value = "来源单号") + private String sourceCode; + + + /** + * 协议号 + */ + @ApiModelProperty(value = "协议号") + private String agreementCode; + + /** + * 报废时间 + */ + @ApiModelProperty(value = "报废时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date scrapTime; + + /** + * 退料人 + */ + @ApiModelProperty(value = "退料人") + private String backPerson; + + + + /** + * 创建者 + */ + @ApiModelProperty(value = "创建者") + private String createBy; + + /** + * 更新者 + */ + @ApiModelProperty(value = "更新者") + private String updateBy; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间 ") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** + * 报废原因 + */ + @ApiModelProperty(value = "报废原因") + private String remark; + + /** + * 关键字 + */ + @ApiModelProperty(value = "关键字") + private String keyWord; + + @ApiModelProperty(value="开始时间") + private String startTime; + + @ApiModelProperty(value="结束时间") + private String endTime; + + + /** + * 设备所属类型 + */ + @ApiModelProperty(value = "数据所属组织") + private Integer companyId; + + /** + * 装备管理方式(0编号 1计数) + */ + @ApiModelProperty(value = "装备管理方式") + private int manageType; + + /** + * 装备管理方式(0编号 1计数) + */ + @ApiModelProperty(value = "装备管理方式名称") + private String manageTypeName; + + /** + * 实时库存 + */ + @ApiModelProperty(value = "实时库存") + private Double num; + +} \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InputRecordMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InputRecordMapper.java new file mode 100644 index 00000000..2eaa6df3 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/InputRecordMapper.java @@ -0,0 +1,23 @@ +package com.bonus.sgzb.material.mapper; + +import com.bonus.sgzb.material.domain.InputRecord; +import com.bonus.sgzb.material.domain.ScrapRecord; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @description 综合查询--机具入库查询 + * @author hay + * @date 2024/2/26 14:19 + */ +@Mapper +public interface InputRecordMapper { + + /** + * 综合查询--机具入库查询 + * @param bean + * @return List + */ + List getInputRecordList(InputRecord bean); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckDetailsMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckDetailsMapper.java index 908d2c44..d545a92d 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckDetailsMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckDetailsMapper.java @@ -142,4 +142,13 @@ public interface PurchaseCheckDetailsMapper { * @return List */ List getAcceptanceForm(PurchaseCheckDetails purchaseCheckDetails); + + /** + * 修改 + * @param purchaseCheckDetails + * @return + */ + int updateStatusByTaskIdTypeId(PurchaseCheckDetails purchaseCheckDetails); + + int updateByTaskId(@Param("taskId") Long taskId,@Param("typeId") Long typeId); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckInfoMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckInfoMapper.java index bfb310f2..6bcbf2a0 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckInfoMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckInfoMapper.java @@ -99,4 +99,11 @@ public interface PurchaseCheckInfoMapper * @return */ List putInExportList(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 查询 + * @param purchaseCheckInfo + * @return + */ + List selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckServiceCenterMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckServiceCenterMapper.java new file mode 100644 index 00000000..8874fbab --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseCheckServiceCenterMapper.java @@ -0,0 +1,209 @@ +package com.bonus.sgzb.material.mapper; + +import com.bonus.sgzb.base.api.domain.MaMachine; +import com.bonus.sgzb.base.api.domain.MaType; +import com.bonus.sgzb.material.domain.*; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 新购验收任务purchase_check_infoMapper接口 + * + * @author bonus + * @date 2023-12-10 + */ +@Mapper +public interface PurchaseCheckServiceCenterMapper +{ + /** + * 查询新购验收任务purchase_check_info + * + * @param taskId 新购验收任务purchase_check_info主键 + * @return 新购验收任务purchase_check_info + */ + public PurchaseCheckInfo selectPurchaseCheckInfoByTaskId(Long taskId); + + /** + * 查询新购验收任务purchase_check_info列表 + * + * @param purchaseCheckInfo 新购验收任务purchase_check_info + * @return 新购验收任务purchase_check_info集合 + */ + public List selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 新增新购验收任务purchase_check_info + * + * @param purchaseCheckInfo 新购验收任务purchase_check_info + * @return 结果 + */ + public int insertPurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 修改新购验收任务purchase_check_info + * + * @param purchaseCheckInfo 新购验收任务purchase_check_info + * @return 结果 + */ + public int updatePurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 删除新购验收任务purchase_check_info + * + * @param taskId 新购验收任务purchase_check_info主键 + * @return 结果 + */ + public int deletePurchaseCheckInfoByTaskId(Long taskId); + + /** + * 批量删除新购验收任务purchase_check_info + * + * @param taskIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deletePurchaseCheckInfoByTaskIds(Long[] taskIds); + + /** + * 查询新购入库任务列表 + * @param taskId + ** @param type 1-验收,2-入库 + * @return + */ + String selectTypeNameByTaskId(@Param("taskId") Long taskId,@Param("type") String type); + + /** + * 插入 + * @param bmNoticeInfo + * @return + */ + int insertBmNoticeInfo(BmNoticeInfo bmNoticeInfo); + + /** + * 查询 + * @param purchaseCheckInfo + * @return + */ + List selectPutInListList(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 新购验收 + * @param purchaseCheckInfo + * @return + */ + List exportList(PurchaseCheckInfo purchaseCheckInfo); + /** + * 新购入库导出 + * @param purchaseCheckInfo + * @return + */ + List putInExportList(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 获取入库清单明细 + * @param purchaseMacodeInfo + * @return + */ + List selectPutinDetails(PurchaseMacodeInfo purchaseMacodeInfo); + + /** + * 修改 + * @param maMachine + * @return + */ + int updateMaMachine(MaMachine maMachine); + + /** + * 查询 + * @param typeId + * @return + */ + MaType selectTypeByTypeId(Long typeId); + + /** + * 修改 + * @param maType + * @return + */ + int updateTypeByTypeId(MaType maType); + + /** + * 插入 + * @param applyDetails + * @return + */ + int insertInputApplyDetails(InputApplyDetails applyDetails); + + /** + * 修改 + * @param purchaseMacodeInfo + * @return + */ + int updateMacodeByType(PurchaseMacodeInfo purchaseMacodeInfo); + + /** + * 插入 + * @param maInputRecord + * @return + */ + int insertMaInputRecord(MaInputRecord maInputRecord); + + /** + * 删除ma_machine表 + * @param maId + * @return 结果 + */ + int deleteMaMachineInfoByMaId(Long maId); + + /** + * 删除ma_machine_label表 + * @param maId + * @return int + */ + int deleteMaMachineLabelByMaId(Long maId); + + /** + * 删除ma_label_bind表 + * @param maId + * @return int + */ + int deleteMaLabelBindByMaId(Long maId); + + /** + * 删除purchase_macode_info表 + * @param taskId + * @param typeId + * @param maCode + * @return + */ + int updatetePurchaseMaCodeInfoByMaCodeAndTaskIdAndTypeId(@Param("taskId") Long taskId,@Param("typeId") Long typeId,@Param("maCode") String maCode); + + /** + * 当全部为已入库的时候任务改为入库状态 + * @param taskId + * @return + */ + Integer selectMacodeInfoStatusByTaskId(Long taskId); + + /** + * 查询组织是否开启审核 + * @param companyId + * @return int + */ + int selectExamineType(Long companyId); + + /** + * 判断是否全部已操作(不通过或通过) + * @param taskId + * @return int + */ + int isOperateAll(Long taskId); + + /** + * 是否为全部不通过 + * @param taskId + * @return + */ + int selectPurchaseCheckDetailsStatus(Long taskId); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IPurchaseCheckInfoService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IPurchaseCheckInfoService.java index 8b4cd8d2..12ccb5e4 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IPurchaseCheckInfoService.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IPurchaseCheckInfoService.java @@ -100,4 +100,11 @@ public interface IPurchaseCheckInfoService * @return */ PurchaseCheckInfo getAcceptanceForm(Long taskId, String keyWord); + + /** + * 查询新购入库任务列表 + * @param purchaseCheckInfo + * @return + */ + List selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/InputRecordService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/InputRecordService.java new file mode 100644 index 00000000..676a831a --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/InputRecordService.java @@ -0,0 +1,21 @@ +package com.bonus.sgzb.material.service; + +import com.bonus.sgzb.material.domain.InputRecord; +import com.bonus.sgzb.material.domain.ScrapRecord; + +import java.util.List; + +/** +* @description 综合查询--机具入库查询 +* @author hay +* @date 2024/2/26 14:19 +*/ +public interface InputRecordService { + + /** + * 综合查询--机具入库查询列表 + * @param bean + * @return List + */ + List getInputRecordList(InputRecord bean); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/PurchaseCheckServiceCenterService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/PurchaseCheckServiceCenterService.java new file mode 100644 index 00000000..5f2eab36 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/PurchaseCheckServiceCenterService.java @@ -0,0 +1,125 @@ +package com.bonus.sgzb.material.service; + +import com.bonus.sgzb.material.domain.PurchaseCheckInfo; +import com.bonus.sgzb.material.domain.PurchaseInput; +import com.bonus.sgzb.material.domain.PurchaseMacodeInfo; +import com.bonus.sgzb.material.vo.MaInputVO; +import com.bonus.sgzb.material.vo.NoticeInfoVO; + +import java.util.List; + +/** + * 新购验收任务purchase_check_infoService接口 + * + * @author bonus + * @date 2023-12-10 + */ +public interface PurchaseCheckServiceCenterService +{ + /** + * 查询新购验收任务purchase_check_info + * @param taskId + * @param keyword + * @return + */ + public PurchaseCheckInfo selectPurchaseCheckInfoByTaskId(Long taskId,String keyword); + + /** + * 查询新购验收任务purchase_check_info列表 + * + * @param purchaseCheckInfo 新购验收任务purchase_check_info + * @return 新购验收任务purchase_check_info集合 + */ + public List selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 新增新购验收任务purchase_check_info + * + * @param purchaseCheckInfo 新购验收任务purchase_check_info + * @return 结果 + */ + public int insertPurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 修改新购验收任务purchase_check_info + * @param purchaseCheckInfo + * @return + * @throws Exception + */ + public int updatePurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo) throws Exception; + + /** + * 批量删除新购验收任务purchase_check_info + * + * @param taskIds 需要删除的新购验收任务purchase_check_info主键集合 + * @return 结果 + */ + public int deletePurchaseCheckInfoByTaskIds(Long[] taskIds); + + /** + * 删除新购验收任务purchase_check_info信息 + * + * @param taskId 新购验收任务purchase_check_info主键 + * @return 结果 + */ + public int deletePurchaseCheckInfoByTaskId(Long taskId); + + /** + * 验收通知 + * @param noticeInfoVO + * @return + * @throws Exception + */ + Boolean insertBmNoticeInfo(NoticeInfoVO noticeInfoVO) throws Exception; + + /** + * 查询新购入库任务列表 + * @param purchaseCheckInfo + * @return + */ + List selectPutInListList(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 新购工机具验收导出 + * @param purchaseCheckInfo + * @return + */ + List exportList(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 新购工机具入库导出 + * @param purchaseCheckInfo + * @return + */ + List putInExportList(PurchaseCheckInfo purchaseCheckInfo); + + /** + * 获取新购验收任务--验收单 + * + * @param taskId + * @param keyWord + * @return + */ + PurchaseCheckInfo getAcceptanceForm(Long taskId, String keyWord); + + /** + * 新购入库清单明细 + * @param purchaseMacodeInfo + * @return List + */ + List selectPutinDetails(PurchaseMacodeInfo purchaseMacodeInfo); + + /** + * 修改编码管理的入库状态 + * @param maInputVO + * @return + */ + int modifyManageStatus(MaInputVO maInputVO); + + /** + * 查询组织是否开启审核 + * @param companyId + * @return int + */ + int selectExamineType(Long companyId); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InputRecordServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InputRecordServiceImpl.java new file mode 100644 index 00000000..ffc9c8b0 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InputRecordServiceImpl.java @@ -0,0 +1,29 @@ +package com.bonus.sgzb.material.service.impl; + +import com.bonus.sgzb.material.domain.InputRecord; +import com.bonus.sgzb.material.domain.ScrapRecord; +import com.bonus.sgzb.material.mapper.InputRecordMapper; +import com.bonus.sgzb.material.mapper.ScrapRecordMapper; +import com.bonus.sgzb.material.service.InputRecordService; +import com.bonus.sgzb.material.service.ScrapRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author hay + * @date 2023/12/20 14:55 + */ +@Service +public class InputRecordServiceImpl implements InputRecordService { + + @Autowired + private InputRecordMapper inputRecordMapper; + + + @Override + public List getInputRecordList(InputRecord bean) { + return inputRecordMapper.getInputRecordList(bean); + } +} 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 13d95e48..6abb027d 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 @@ -96,6 +96,16 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService { return purchaseCheckInfo; } + @Override + public List selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo) { + List purchaseCheckInfos = purchaseCheckInfoMapper.selectPutInListExamine(purchaseCheckInfo); + for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) { + String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"3"); + checkInfo.setPurchasingTypeName(typeName); + } + return purchaseCheckInfos; + } + /** * 查询新购验收任务列表 * diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckServiceCenterServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckServiceCenterServiceImpl.java new file mode 100644 index 00000000..068e367c --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckServiceCenterServiceImpl.java @@ -0,0 +1,356 @@ +package com.bonus.sgzb.material.service.impl; + +import com.bonus.sgzb.base.api.domain.MaMachine; +import com.bonus.sgzb.base.api.domain.MaType; +import com.bonus.sgzb.common.core.utils.DateUtils; +import com.bonus.sgzb.common.security.utils.SecurityUtils; +import com.bonus.sgzb.material.domain.*; +import com.bonus.sgzb.material.mapper.PurchaseCheckDetailsMapper; +import com.bonus.sgzb.material.mapper.PurchaseCheckInfoMapper; +import com.bonus.sgzb.material.mapper.PurchaseCheckServiceCenterMapper; +import com.bonus.sgzb.material.mapper.TaskMapper; +import com.bonus.sgzb.material.service.IPurchaseCheckInfoService; +import com.bonus.sgzb.material.service.PurchaseCheckServiceCenterService; +import com.bonus.sgzb.material.vo.GlobalContants; +import com.bonus.sgzb.material.vo.MaInputVO; +import com.bonus.sgzb.material.vo.NoticeInfoVO; +import com.bonus.sgzb.system.api.RemoteUserService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +/** + * 新购验收任务Service业务层处理 + * + * @author bonus + * @date 2023-12-10 + */ +@Service +public class PurchaseCheckServiceCenterServiceImpl implements PurchaseCheckServiceCenterService { + @Resource + private PurchaseCheckServiceCenterMapper purchaseCheckServiceCenterMapper; + + @Resource + private TaskMapper taskMapper; + + @Resource + private PurchaseCheckDetailsMapper purchaseCheckDetailsMapper; + + @Resource + private PurchaseCheckDetailsMapper checkDetailsMapper; + + @Resource + private RemoteUserService remoteUserService; + + /** + * 查询新购验收任务 + * + * @param taskId 新购验收任务主键 + * @param keyword 关键字筛选 + * @return 新购验收任务 + */ + @Override + public PurchaseCheckInfo selectPurchaseCheckInfoByTaskId(Long taskId, String keyword) { + PurchaseCheckInfo purchaseCheckInfo = purchaseCheckServiceCenterMapper.selectPurchaseCheckInfoByTaskId(taskId); + PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails(); + purchaseCheckDetails.setTaskId(purchaseCheckInfo.getTaskId()); + purchaseCheckDetails.setKeyWord(keyword); + List purchaseCheckDetailsList = purchaseCheckDetailsMapper.selectPurchaseCheckDetailsList(purchaseCheckDetails); + purchaseCheckInfo.setCheckDetailsList(purchaseCheckDetailsList); + return purchaseCheckInfo; + } + + /** + * 查询新购入库任务列表 + * + * @param purchaseCheckInfo 新购入库任务 + * @return 新购入库任务 + */ + @Override + public List selectPutInListList(PurchaseCheckInfo purchaseCheckInfo) { + List purchaseCheckInfos = purchaseCheckServiceCenterMapper.selectPutInListList(purchaseCheckInfo); + for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) { + String typeName = purchaseCheckServiceCenterMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"2"); + checkInfo.setPurchasingTypeName(typeName); + } + return purchaseCheckInfos; + } + + /** + * 获取入库清单明细 + * + * @param purchaseMacodeInfo 查询条件 + * @return 结果 + */ + @Override + public List selectPutinDetails(PurchaseMacodeInfo purchaseMacodeInfo) { + return purchaseCheckServiceCenterMapper.selectPutinDetails(purchaseMacodeInfo); + } + + @Override + public List exportList(PurchaseCheckInfo purchaseCheckInfo) { + return purchaseCheckServiceCenterMapper.exportList(purchaseCheckInfo); + } + + @Override + public List putInExportList(PurchaseCheckInfo purchaseCheckInfo) { + return purchaseCheckServiceCenterMapper.putInExportList(purchaseCheckInfo); + } + + /** + * 新购验收单 + */ + @Override + public PurchaseCheckInfo getAcceptanceForm(Long taskId, String keyword) { + PurchaseCheckInfo purchaseCheckInfo = purchaseCheckServiceCenterMapper.selectPurchaseCheckInfoByTaskId(taskId); + PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails(); + purchaseCheckDetails.setTaskId(purchaseCheckInfo.getTaskId()); + purchaseCheckDetails.setKeyWord(keyword); + List purchaseCheckDetailsList = purchaseCheckDetailsMapper.getAcceptanceForm(purchaseCheckDetails); + purchaseCheckInfo.setCheckDetailsList(purchaseCheckDetailsList); + return purchaseCheckInfo; + } + + /** + * 查询新购验收任务列表 + * + * @param purchaseCheckInfo 新购验收任务 + * @return 新购验收任务 + */ + @Override + public List selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo) { + List purchaseCheckInfos = purchaseCheckServiceCenterMapper.selectPurchaseCheckInfoList(purchaseCheckInfo); + for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) { + String typeName = purchaseCheckServiceCenterMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"1"); + checkInfo.setPurchasingTypeName(typeName); + } + return purchaseCheckInfos; + } + + /** + * 修改编码管理的入库状态,暂时不用 + * + * @param maInputVO 入库信息 + * @return 结果 + */ + @Override + public int modifyManageStatus(MaInputVO maInputVO) { + Long taskId = maInputVO.getTaskId(); + String checkResult = maInputVO.getCheckResult(); + List inputRecordList = maInputVO.getInputRecordList(); + for (MaInputRecord maInputRecord : inputRecordList) { + Long typeId = maInputRecord.getTypeId(); + + //修改编码管理表入库状态 + PurchaseMacodeInfo purchaseMacodeInfo = new PurchaseMacodeInfo(); + purchaseMacodeInfo.setTaskId(taskId); + purchaseMacodeInfo.setTypeId(typeId); + purchaseMacodeInfo.setMaCode(maInputRecord.getMaCode()); + + // 修改验收任务详细表入库数量 + if ("1".equals(checkResult)) { + //修改机具状态为在库 + PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails(); + purchaseCheckDetails.setStatus(6); + purchaseCheckDetails.setTaskId(taskId); + purchaseCheckDetails.setTypeId(typeId); + checkDetailsMapper.updateStatusByTaskIdTypeId(purchaseCheckDetails); + }else { + //删除ma_machine表 + purchaseCheckServiceCenterMapper.deleteMaMachineInfoByMaId(maInputRecord.getMaId()); + //删除ma_machine_label表 + purchaseCheckServiceCenterMapper.deleteMaMachineLabelByMaId(maInputRecord.getMaId()); + //删除ma_label_bind表 + purchaseCheckServiceCenterMapper.deleteMaLabelBindByMaId(maInputRecord.getMaId()); + //修改purchase_macode_info表 + purchaseCheckServiceCenterMapper.updatetePurchaseMaCodeInfoByMaCodeAndTaskIdAndTypeId(taskId,typeId,maInputRecord.getMaCode()); + //修改purchase_check_details表 + checkDetailsMapper.updateByTaskId(taskId,typeId); + } + } + + //判断是否全部已操作(通过或不通过) + int count=purchaseCheckServiceCenterMapper.isOperateAll(taskId); + if (count<=0) { + //是否为全部不通过 + int count1 = purchaseCheckServiceCenterMapper.selectPurchaseCheckDetailsStatus(taskId); + if (count1 <= 0) { + //是则将任务状态改为验收不通过 + TmTask task = new TmTask(); + task.setTaskId(taskId); + task.setTaskStatus(106); + task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); + task.setUpdateTime(DateUtils.getNowDate()); + taskMapper.updateTmTask(task); + } else { + // 当全部操作,修改任务为验收状态 + TmTask task = new TmTask(); + task.setTaskId(taskId); + task.setTaskStatus(105); + task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); + task.setUpdateTime(DateUtils.getNowDate()); + taskMapper.updateTmTask(task); + } + } + return 1; + } + + @Override + public int selectExamineType(Long companyId) { + return purchaseCheckServiceCenterMapper.selectExamineType(companyId); + } + + /** + * 新增新购验收任务 + * + * @param purchaseCheckInfo 新购验收任务 + * @return 结果 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public int insertPurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo) { + TmTask task = new TmTask(); + // 暂定的状态字典表 + task.setTaskType(23); + task.setTaskStatus(24); + // 采购单号 + task.setCode(purchaseCodeRule()); + task.setCreateTime(DateUtils.getNowDate()); + task.setCompanyId(purchaseCheckInfo.getCompanyId()); + task.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); + // 创建任务信息 + taskMapper.insertTmTask(task); + purchaseCheckInfo.setTaskId(task.getTaskId()); + purchaseCheckInfo.setCreateTime(DateUtils.getNowDate()); + + // 批量新增新购任务详情信息 + List checkDetailsList = purchaseCheckInfo.getCheckDetailsList(); + if (checkDetailsList != null) { + for (PurchaseCheckDetails purchaseCheckDetails : checkDetailsList) { + purchaseCheckDetails.setTaskId(task.getTaskId()); + purchaseCheckDetails.setStatus(2); + } + purchaseCheckDetailsMapper.insertPurchaseCheckDetailsList(checkDetailsList); + } + // 新增任务信息 + return purchaseCheckServiceCenterMapper.insertPurchaseCheckInfo(purchaseCheckInfo); + } + + /**采购单号编码生成规则*/ + private String purchaseCodeRule() { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); + Date nowDate = DateUtils.getNowDate(); + String format = dateFormat.format(nowDate); + int taskNum = taskMapper.selectTaskNumByMonth(nowDate, 23) + 1; + String code = ""; + if (taskNum > GlobalContants.NUM1 && taskNum < GlobalContants.NUM2) { + code = "XG" + format + "-00" + taskNum; + } else if (taskNum > GlobalContants.NUM3 && taskNum < GlobalContants.NUM4) { + code = "XG" + format + "-0" + taskNum; + } else { + code = "XG" + format + "-000" + taskNum; + } + return code; + } + + /** + * 修改新购验收任务 + * + * @param purchaseCheckInfo 新购验收任务 + * @return 结果 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public int updatePurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo) throws Exception { + Long taskId = purchaseCheckInfo.getTaskId(); + TmTask task = taskMapper.selectTmTaskByTaskId(taskId); + // 判断当前任务是否为待通知状态 + if (task == null || task.getTaskStatus() != GlobalContants.NUM6) { + throw new Exception("当前任务不可修改!!!"); + } + // 批量新增新购任务详情信息 + List checkDetailsList = purchaseCheckInfo.getCheckDetailsList(); + if (checkDetailsList != null) { + // 先删除全部的任务详情信息 + purchaseCheckDetailsMapper.deleteCheckDetailsByTaskId(taskId); + for (PurchaseCheckDetails purchaseCheckDetails : checkDetailsList) { + purchaseCheckDetails.setTaskId(taskId); + purchaseCheckDetails.setStatus(2); + } + // 添加任务详情信息 + purchaseCheckDetailsMapper.insertPurchaseCheckDetailsList(checkDetailsList); + } + purchaseCheckInfo.setUpdateTime(DateUtils.getNowDate()); + return purchaseCheckServiceCenterMapper.updatePurchaseCheckInfo(purchaseCheckInfo); + } + + /** + * 批量删除新购验收任务 + * + * @param taskIds 需要删除的新购验收任务主键 + * @return 结果 + */ + @Override + public int deletePurchaseCheckInfoByTaskIds(Long[] taskIds) { + return purchaseCheckServiceCenterMapper.deletePurchaseCheckInfoByTaskIds(taskIds); + } + + /** + * 删除新购验收任务信息 + * + * @param taskId 新购验收任务主键 + * @return 结果 + */ + @Override + public int deletePurchaseCheckInfoByTaskId(Long taskId) { + return purchaseCheckServiceCenterMapper.deletePurchaseCheckInfoByTaskId(taskId); + } + + /** + * 验收通知 + * + * @param noticeInfoVO 验收通知内容 + * @return 结果 + */ + @Override + public Boolean insertBmNoticeInfo(NoticeInfoVO noticeInfoVO) throws Exception { + // 任务状态修改 + TmTask task = new TmTask(); + Long taskId = noticeInfoVO.getTaskId(); + if (taskId == null) { + throw new Exception("任务taskId为空!!"); + } + TmTask task1 = taskMapper.selectTmTaskByTaskId(taskId); + if (task1.getTaskStatus() != GlobalContants.NUM6) { + throw new Exception("任务状态不为待通知!!"); + } + task.setTaskId(taskId); + task.setTaskStatus(25); + taskMapper.updateTmTask(task); + // 修改任务详情状态 + purchaseCheckDetailsMapper.updateCheckDetailsByTaskId(taskId); + + String message = noticeInfoVO.getMessage(); + List bmNoticeInfoList = noticeInfoVO.getBmNoticeInfoList(); + if (bmNoticeInfoList.size() <= 0) { + throw new Exception("绑定用户为空"); + } + Boolean send = true; + for (BmNoticeInfo bmNoticeInfo : bmNoticeInfoList) { + bmNoticeInfo.setContent(message); + bmNoticeInfo.setTaskId(taskId); + bmNoticeInfo.setModelName("新购机具验收"); + bmNoticeInfo.setCreateTime(new Date()); + String phone = bmNoticeInfo.getPhone(); + // 短信通知 + send = remoteUserService.send(phone, message); + purchaseCheckServiceCenterMapper.insertBmNoticeInfo(bmNoticeInfo); + } + return send; + } +} diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InputRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InputRecordMapper.xml new file mode 100644 index 00000000..29b08b84 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/InputRecordMapper.xml @@ -0,0 +1,53 @@ + + + + + + \ 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 4630c466..b801411a 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 @@ -259,4 +259,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update purchase_check_details set bind_num = bind_num - 1 , status='5' where task_id = #{taskId} and type_id = #{typeId} + + update purchase_check_details set status = #{status} where task_id = #{taskId} and type_id = #{typeId} + + + update purchase_check_details set bind_num = bind_num - 1 , status='7' where task_id = #{taskId} and type_id = #{typeId} + \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml index e55a11e2..f73bc80c 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml @@ -128,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join ma_type mt1 on mt.parent_id = mt1.type_id where pcd.task_id = #{taskId} and pcd.`status`!=3 + and pcd.`status`!=3 and pcd.`status` !=7 ) t GROUP BY task_id @@ -251,4 +252,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and pci.company_id = #{companyId} ORDER BY pcd.task_id desc + \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckServiceCenterMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckServiceCenterMapper.xml new file mode 100644 index 00000000..f98e7013 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckServiceCenterMapper.xml @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + + select id,task_id, purchase_time, arrival_time, purchaser, create_by, create_time, update_by, update_time, remark, company_id from purchase_check_info + + + + + + + + insert into purchase_check_info + + task_id, + purchase_time, + arrival_time, + purchaser, + create_by, + create_time, + update_by, + update_time, + remark, + company_id, + + + #{taskId}, + #{purchaseTime}, + #{arrivalTime}, + #{purchaser}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{companyId}, + + + + + update purchase_check_info + + purchase_time = #{purchaseTime}, + arrival_time = #{arrivalTime}, + purchaser = #{purchaser}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + company_id = #{companyId}, + + where task_id = #{taskId} + + + update ma_machine set ma_status = #{maStatus} where ma_id = #{maId} + + + update ma_type set num = #{num} where type_id = #{typeId} + + + update purchase_macode_info + set status = #{status} + where task_id = #{taskId} + and type_id = #{typeId} + and ma_code = #{maCode} + + + update + purchase_macode_info + set status='2' + where ma_code = #{maCode} + and task_id = #{taskId} + and type_id = #{typeId} + + + + delete from purchase_check_info where task_id = #{taskId} + + + + delete from purchase_check_info where task_id in + + #{taskId} + + + + delete from ma_machine where ma_id = #{maId} + + + delete from ma_machine_label where ma_id = #{maId} + + + delete from ma_label_bind where ma_id = #{maId} + + + + + + insert into bm_notice_info + + task_id, + content, + notice_user, + phone, + model_name, + create_by, + create_time, + update_by, + update_time, + remark, + company_id, + + + #{taskId}, + #{content}, + #{noticeUser}, + #{phone}, + #{modelName}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{companyId}, + + + + insert into input_apply_details + + task_id, + ma_id, + type_id, + parent_id, + input_num, + input_type, + create_by, + create_time, + update_by, + update_time, + remark, + company_id, + + + #{taskId}, + #{maId}, + #{typeId}, + #{parentId}, + #{inputNum}, + #{inputType}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{companyId}, + + + + insert into ma_input_record + + task_id, + type_id, + ma_id, + input_type, + input_num, + status, + create_by, + create_time, + update_by, + update_time, + remark, + company_id, + + + #{taskId}, + #{typeId}, + #{maId}, + #{inputType}, + #{inputNum}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{companyId}, + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseMacodeInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseMacodeInfoMapper.xml index cce006e9..8e28a5ca 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseMacodeInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseMacodeInfoMapper.xml @@ -379,7 +379,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join ma_type mt on pcd.type_id = mt.type_id left join ma_type mt1 on mt.parent_id = mt1.type_id where pcd.task_id = #{taskId} - and pcd.`status`!=3 + and pcd.`status`!=3 and pcd.`status`!=7 and (mt.type_name like concat('%',#{dictName},'%') or mt1.type_name like concat('%',#{dictName},'%')) diff --git a/sgzb-ui/src/api/store/newDevicesServiceCenterList.js b/sgzb-ui/src/api/store/newDevicesServiceCenterList.js new file mode 100644 index 00000000..6bef5491 --- /dev/null +++ b/sgzb-ui/src/api/store/newDevicesServiceCenterList.js @@ -0,0 +1,75 @@ +import request from '@/utils/request' + +//编辑新购任务 +export function updatePurchaseCheckInfo(data) { + return request({ + url: '/material/purchaseCheckServiceCenter', + method: 'put', + data: data + }) +} + +//消息通知 +export function bmNoticeInfo(data) { + return request({ + url: '/material/purchaseCheckServiceCenter/bmNoticeInfo', + method: 'post', + data: data + }) +} + + +// 新购验收--验收弹窗-确认验收 +export function updatePurchaseCheckDetails(data) { + return request({ + url: '/material/purchaseCheckDetails', + method: 'put', + data: data + }) +} + +//新购验收-入库列表 +export function getPutInList(query) { + return request({ + url: '/material/purchaseCheckServiceCenter/putInList', + method: 'get', + params: query + }) +} +export function getPutinDetailsList(query) { + return request({ + url: '/material/purchaseCheckServiceCenter/putinDetails', + method: 'get', + params: query + }) +} + +// 修改状态-审核 +export function changePutinStatus(data) { + return request({ + url: '/material/purchaseCheckServiceCenter/manageStatus', + method: 'put', + data: data + }) +} + + + +//新购工机具入库单 +export function warehousingEntry(query) { + return request({ + url: '/material/purchaseMacode/warehousingEntry', + method: 'get', + params: query + }) +} + + +//配件入库 配件类型下拉数据 +export function getPartList(query) { + return request({ + url: '/material/purchaseAccessory/getPartList', + method: 'get', + params: query + }) +} diff --git a/sgzb-ui/src/api/stquery/deviceFixQuery.js b/sgzb-ui/src/api/stquery/deviceFixQuery.js index e69de29b..6c8c87af 100644 --- a/sgzb-ui/src/api/stquery/deviceFixQuery.js +++ b/sgzb-ui/src/api/stquery/deviceFixQuery.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +//综合查询 +// 查询领料记录列表 +export function backRecord(query) { + return request({ + url: '/material/backRecord/getBackRecordList', + method: 'get', + params: query + }) +} + +// 列表导出 +export function exportList(params = {}){ + return request({ + url: '/material/backRecord/export', + method: 'post', + data: params + }) +} + +// 获取 来往单位 列表 +export function getUnitData(params = {}){ + return request({ + url: '/system/select/getUnitCbx', + method: 'post', + data: params + }) +} + +// 获取 工程 列表 +export function getProData(params = {}){ + return request({ + url: '/system/select/getSectionEngineeringCbx', + method: 'post', + data: params + }) +} + + + + + + + + + + + + + + diff --git a/sgzb-ui/src/api/stquery/deviceInStoreQuery.js b/sgzb-ui/src/api/stquery/deviceInStoreQuery.js index e69de29b..8f755fce 100644 --- a/sgzb-ui/src/api/stquery/deviceInStoreQuery.js +++ b/sgzb-ui/src/api/stquery/deviceInStoreQuery.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +//综合查询 +// 查询入库记录列表 +export function inputRecord(query) { + return request({ + url: '/material/inputRecord/getInputRecordList', + method: 'get', + params: query + }) +} + +// 列表导出 +export function exportList(params = {}){ + return request({ + url: '/material/inputRecord/export', + method: 'post', + data: params + }) +} + +// 获取 来往单位 列表 +export function getUnitData(params = {}){ + return request({ + url: '/system/select/getUnitCbx', + method: 'post', + data: params + }) +} + +// 获取 工程 列表 +export function getProData(params = {}){ + return request({ + url: '/system/select/getSectionEngineeringCbx', + method: 'post', + data: params + }) +} + + + + + + + + + + + + + + diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue index 4c4103b2..4985b07c 100644 --- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue +++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue @@ -32,7 +32,7 @@ @@ -138,7 +138,7 @@ size="mini" type="success" icon="el-icon-edit" - v-if="scope.row.purchasingStatus!='已入库'&&scope.row.purchasingStatus!='已验收合格'" + v-if="scope.row.purchasingStatus!='已入库'&&scope.row.purchasingStatus!='已验收合格'&&scope.row.purchasingStatus!='待审核'" @click="handleAccept(scope.row)" >验收 验收单 @@ -160,7 +160,7 @@ size="mini" type="danger" icon="el-icon-delete" - v-if="scope.row.purchasingStatus!='已入库'" + v-if="scope.row.purchasingStatus!='已入库'&&scope.row.purchasingStatus!='已验收合格'&&scope.row.purchasingStatus!='待审核'" @click="handleDelete(scope.row)" >删除 @@ -425,7 +425,7 @@ export default { ...this.queryParams }, `新购工机具验收_${new Date().getTime()}.xlsx`) }, - + } }; diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesServiceCenterList.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesServiceCenterList.vue new file mode 100644 index 00000000..1ece5d84 --- /dev/null +++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesServiceCenterList.vue @@ -0,0 +1,677 @@ + + + + diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue index 891d4b87..932cb07c 100644 --- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue +++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue @@ -5,7 +5,7 @@ @@ -47,6 +47,7 @@ @@ -57,12 +58,12 @@ icon="el-icon-zoom-in" @click="handleView(scope.row)" >查看 - + 审核 - + 查询 @@ -146,7 +147,7 @@ - +