diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java index af2927ab..7d72ab42 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java @@ -22,8 +22,18 @@ public class MaMachine extends BaseEntity { /** * 类型ID */ - @ApiModelProperty(value = "类型ID") + @ApiModelProperty(value = "资产属性id") private long propId; + /** + * 物品种类 + */ + @ApiModelProperty(value = "物品种类id") + private long itemId; + /** + * 设备类型 + */ + @ApiModelProperty(value = "设备类型id") + private long deviceId; /** * 物品种类 */ @@ -151,246 +161,12 @@ public class MaMachine extends BaseEntity { private String labelCode; + @ApiModelProperty(value = "筛选名称") + private String keyWord; + @ApiModelProperty(value = "开始时间") + private String beginTime; - public void setMaId(long maId) { - this.maId = maId; - } - - - public long getTypeId() { - return typeId; - } - - public void setTypeId(long typeId) { - this.typeId = typeId; - } - - - public String getMaCode() { - return maCode; - } - - public void setMaCode(String maCode) { - this.maCode = maCode; - } - - - public String getPreCode() { - return preCode; - } - - public void setPreCode(String preCode) { - this.preCode = preCode; - } - - - public String getMaStatus() { - return maStatus; - } - - public void setMaStatus(String maStatus) { - this.maStatus = maStatus; - } - - - public String getQrCode() { - return qrCode; - } - - public void setQrCode(String qrCode) { - this.qrCode = qrCode; - } - - - public String getBuyPrice() { - return buyPrice; - } - - public void setBuyPrice(String buyPrice) { - this.buyPrice = buyPrice; - } - - - public String getMaVender() { - return maVender; - } - - public void setMaVender(String maVender) { - this.maVender = maVender; - } - - - public String getOutFacTime() { - return outFacTime; - } - - public void setOutFacTime(String outFacTime) { - this.outFacTime = outFacTime; - } - - - public String getOutFacCode() { - return outFacCode; - } - - public void setOutFacCode(String outFacCode) { - this.outFacCode = outFacCode; - } - - - public String getAssetsCode() { - return assetsCode; - } - - public void setAssetsCode(String assetsCode) { - this.assetsCode = assetsCode; - } - - - public String getCheckMan() { - return checkMan; - } - - public void setCheckMan(String checkMan) { - this.checkMan = checkMan; - } - - - public String getThisCheckTime() { - return thisCheckTime; - } - - public void setThisCheckTime(String thisCheckTime) { - this.thisCheckTime = thisCheckTime; - } - - - public String getNextCheckTime() { - return nextCheckTime; - } - - public void setNextCheckTime(String nextCheckTime) { - this.nextCheckTime = nextCheckTime; - } - - - public String getGpsCode() { - return gpsCode; - } - - public void setGpsCode(String gpsCode) { - this.gpsCode = gpsCode; - } - - - public String getRfidCode() { - return rfidCode; - } - - public void setRfidCode(String rfidCode) { - this.rfidCode = rfidCode; - } - - - public String getErpCode() { - return erpCode; - } - - public void setErpCode(String erpCode) { - this.erpCode = erpCode; - } - - - public String getTransferCode() { - return transferCode; - } - - public void setTransferCode(String transferCode) { - this.transferCode = transferCode; - } - - - public String getInOutNum() { - return inOutNum; - } - - public void setInOutNum(String inOutNum) { - this.inOutNum = inOutNum; - } - - - public String getBuyTask() { - return buyTask; - } - - public void setBuyTask(String buyTask) { - this.buyTask = buyTask; - } - - - public String getOwnHouse() { - return ownHouse; - } - - public void setOwnHouse(String ownHouse) { - this.ownHouse = ownHouse; - } - - - public String getCompanyId() { - return companyId; - } - - public void setCompanyId(String companyId) { - this.companyId = companyId; - } - - public String getItemType() { - return itemType; - } - - public void setItemType(String itemType) { - this.itemType = itemType; - } - - public String getDeviceType() { - return deviceType; - } - - public void setDeviceType(String deviceType) { - this.deviceType = deviceType; - } - - public String getSpecificationType() { - return specificationType; - } - - public void setSpecificationType(String specificationType) { - this.specificationType = specificationType; - } - - public String getMaStatusName() { - return maStatusName; - } - - public void setMaStatusName(String maStatusName) { - this.maStatusName = maStatusName; - } - - public String getLabelCode() { - return labelCode; - } - - public void setLabelCode(String labelCode) { - this.labelCode = labelCode; - } - - public long getPropId() { - return propId; - } - - public void setPropId(long propId) { - this.propId = propId; - } + @ApiModelProperty(value = "结束时间") + private String endTime; } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaMachineLabel.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachineLabel.java similarity index 97% rename from sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaMachineLabel.java rename to sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachineLabel.java index c7d3b3b9..3ce57f8c 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaMachineLabel.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachineLabel.java @@ -1,4 +1,4 @@ -package com.bonus.sgzb.base.domain; +package com.bonus.sgzb.base.api.domain; import com.bonus.sgzb.common.core.annotation.Excel; import com.bonus.sgzb.common.core.web.domain.BaseEntity; diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/LeaseOutDetailsController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/LeaseOutDetailsController.java index 597e4426..44bdd5f1 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/LeaseOutDetailsController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/LeaseOutDetailsController.java @@ -34,13 +34,13 @@ public class LeaseOutDetailsController extends BaseController { /** * 根据code编码查询设备信息 - * @param mCode 机具编码 + * @param maCode 机具编码 * @return 设备信息 */ @Log(title = "根据code编码获取设备信息", businessType = BusinessType.QUERY) @GetMapping("/getMaMachineByCode") - public TableDataInfo getMaMachineByCode(@RequestParam(value = "maCode") String mCode) { - return getDataTable(leaseOutDetailsService.getMaMachineByCode(mCode)); + public TableDataInfo getMaMachineByCode(@RequestParam(value = "maCode") String maCode) { + return getDataTable(leaseOutDetailsService.getMaMachineByCode(maCode)); } /** diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/BackApplyInfo.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/BackApplyInfo.java index 57bcff3d..d3bbe862 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/BackApplyInfo.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/BackApplyInfo.java @@ -1,5 +1,6 @@ package com.bonus.sgzb.app.domain; +import io.swagger.models.auth.In; import lombok.Data; /** @@ -86,8 +87,46 @@ public class BackApplyInfo { private String lotId; private String unitId; private String backTime; + private Integer maId; /** * 机具管理方式 */ private String manageType; + /** + * 合格数量 + */ + private Integer passNum; + /** + * 维修数量 + */ + private Integer maintenanceNum; + /** + * 报废数量 + */ + private Integer scrapNum; + + /** + * 退料数量 + */ + private Integer backNum; + + /** + * 退料数量 + */ + private String backStatus; + + /** + * 合格入库数量 + */ + private String inputNum; + + /** + * 任务类型 + */ + private Integer taskType; + + /** + * 任务id + */ + private Integer taskId; } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java index 204ed090..2acfa378 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java @@ -61,19 +61,19 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService { // 更新 (ma_machine 设备表)的状态 int updateMaMachineStatus = leaseOutDetailsMapper.updateMaMachineStatus(record); // 插入(tm_task_agreement 任务协议表)协议信息 - int insertAgreementInfo = leaseOutDetailsMapper.insertAgreementInfo(record); + // int insertAgreementInfo = leaseOutDetailsMapper.insertAgreementInfo(record); // 进行状态判断 if (updateLeaseApplyDetailsOutNum > 0) { if (insertSelectiveNum > 0) { if (updateMaTypeStockNum > 0) { - if (updateMaMachineStatus > 0) { - if (insertAgreementInfo > 0) { + // if (updateMaMachineStatus > 0) { + // if (insertAgreementInfo > 0) { return AjaxResult.success("领料出库成功!"); - } - return AjaxResult.error("领料出库失败,插入任务协议信息错误!"); - } - return AjaxResult.error("领料出库失败,最后更新设备状态错误!"); + // } + // return AjaxResult.error("领料出库失败,插入任务协议信息错误!"); + // } + // return AjaxResult.error("领料出库失败,最后更新设备状态错误!"); } return AjaxResult.error("出库失败,更新设备规格库存数量时出错!"); } @@ -83,8 +83,8 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService { } /** - * @param maMachine - * @return + * @param maCode 编码ID + * @return 数据 */ @Override public List getMaMachineByCode(String maCode) { diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaLabelBindController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaLabelBindController.java index cbfd2bb2..42124fe6 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaLabelBindController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaLabelBindController.java @@ -93,7 +93,8 @@ public class MaLabelBindController extends BaseController @PostMapping public AjaxResult add(@RequestBody MaLabelBindVO maLabelBindVO) { - return toAjax(maLabelBindService.insertMaLabelBind(maLabelBindVO)); + + return maLabelBindService.insertMaLabelBind(maLabelBindVO); } /** diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaMachineLabelController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaMachineLabelController.java index 023f7e2d..0787dbc7 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaMachineLabelController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaMachineLabelController.java @@ -2,7 +2,7 @@ package com.bonus.sgzb.base.controller; -import com.bonus.sgzb.base.domain.MaMachineLabel; +import com.bonus.sgzb.base.api.domain.MaMachineLabel; import com.bonus.sgzb.base.service.IMaMachineLabelService; import com.bonus.sgzb.common.core.web.controller.BaseController; import com.bonus.sgzb.common.core.web.domain.AjaxResult; diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaHouseSet.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaHouseSet.java index be0734d0..080c02fc 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaHouseSet.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaHouseSet.java @@ -15,6 +15,9 @@ public class MaHouseSet { */ @ApiModelProperty(value="仓库ID") private long houseId; + + @ApiModelProperty(value="仓库名称") + private String houseName; /** * 机具类型ID */ @@ -255,4 +258,12 @@ public class MaHouseSet { public void setMaCode(String maCode) { this.maCode = maCode; } + + public String getHouseName() { + return houseName; + } + + public void setHouseName(String houseName) { + this.houseName = houseName; + } } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaMachineLabelMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaMachineLabelMapper.java index efa723e5..fc296693 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaMachineLabelMapper.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaMachineLabelMapper.java @@ -1,6 +1,6 @@ package com.bonus.sgzb.base.mapper; -import com.bonus.sgzb.base.domain.MaMachineLabel; +import com.bonus.sgzb.base.api.domain.MaMachineLabel; import org.apache.ibatis.annotations.Mapper; import java.util.Date; diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/IMaLabelBindService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/IMaLabelBindService.java index 9a196a5a..87f97be3 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/IMaLabelBindService.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/IMaLabelBindService.java @@ -2,6 +2,7 @@ package com.bonus.sgzb.base.service; import com.bonus.sgzb.base.vo.MaLabelBindVO; +import com.bonus.sgzb.common.core.web.domain.AjaxResult; import java.util.List; @@ -41,7 +42,7 @@ public interface IMaLabelBindService * @param maLabelBindVO 机具设备标签ma_label_bind * @return 结果 */ - public int insertMaLabelBind(MaLabelBindVO maLabelBindVO); + public AjaxResult insertMaLabelBind(MaLabelBindVO maLabelBindVO); /** * 修改机具设备标签ma_label_bind diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/IMaMachineLabelService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/IMaMachineLabelService.java index 8082059e..b26a790b 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/IMaMachineLabelService.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/IMaMachineLabelService.java @@ -1,8 +1,6 @@ package com.bonus.sgzb.base.service; -import com.bonus.sgzb.base.domain.MaMachineLabel; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Service; +import com.bonus.sgzb.base.api.domain.MaMachineLabel; import java.util.List; diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaLabelBindServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaLabelBindServiceImpl.java index cbcebc3e..686901eb 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaLabelBindServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaLabelBindServiceImpl.java @@ -4,12 +4,10 @@ import com.bonus.sgzb.base.api.domain.MaMachine; import com.bonus.sgzb.base.mapper.MaLabelBindMapper; import com.bonus.sgzb.base.service.IMaLabelBindService; import com.bonus.sgzb.base.vo.MaLabelBindVO; -import com.bonus.sgzb.common.core.utils.StringHelper; -import lombok.extern.flogger.Flogger; +import com.bonus.sgzb.common.core.web.domain.AjaxResult; import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.util.ArrayList; import java.util.List; /** @@ -66,13 +64,13 @@ public class MaLabelBindServiceImpl implements IMaLabelBindService * @return 结果 */ @Override - public int insertMaLabelBind(MaLabelBindVO maLabelBind) + public AjaxResult insertMaLabelBind(MaLabelBindVO maLabelBind) { int i = 0; int b =0; MaLabelBindVO bean = maLabelBindMapper.selectMaMachineMaId(maLabelBind.getMaCode()); if(null != bean){ - return b; + return AjaxResult.error("设备编码已绑定!!!"); }else { MaMachine maMachine =new MaMachine(); maMachine.setMaCode(maLabelBind.getMaCode()); @@ -84,7 +82,7 @@ public class MaLabelBindServiceImpl implements IMaLabelBindService b=maLabelBindMapper.updateMaLabelBindMaIds(maLabelBind); i = maLabelBindMapper.insertMaLabelBindS(maLabelBind); } - return i; + return AjaxResult.success("绑定成功"); } /** diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineLabelServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineLabelServiceImpl.java index 2320c25e..f6d0865b 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineLabelServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineLabelServiceImpl.java @@ -1,6 +1,6 @@ package com.bonus.sgzb.base.service.impl; -import com.bonus.sgzb.base.domain.MaMachineLabel; +import com.bonus.sgzb.base.api.domain.MaMachineLabel; import com.bonus.sgzb.base.mapper.MaMachineLabelMapper; import com.bonus.sgzb.base.service.IMaMachineLabelService; import com.bonus.sgzb.common.core.utils.DateUtils; diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaHouseSetMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaHouseSetMapper.xml index df14eb13..10af974e 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaHouseSetMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaHouseSetMapper.xml @@ -91,12 +91,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - + insert into ma_machine_label label_code, diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml index 0d3c7320..b32675e9 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml @@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -37,9 +38,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaTypeFileMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaTypeFileMapper.xml index f1623879..5e5e32b3 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaTypeFileMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaTypeFileMapper.xml @@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where type_id = #{typeId} and file_type = #{fileType} - + delete from ma_type_file where type_id = #{typeId} and file_type = #{fileType} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java index 1177bc8b..08e98bf0 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java @@ -52,7 +52,7 @@ public class BackApplyController extends BaseController { */ @ApiOperation(value = "获取在用物料列表") @GetMapping("/getMaterialList") - public TableDataInfo getMaterialList(@RequestBody BackApplyInfo bean) + public TableDataInfo getMaterialList(BackApplyInfo bean) { startPage(); List list = backApplyService.getMaterialList(bean); @@ -64,7 +64,7 @@ public class BackApplyController extends BaseController { */ @ApiOperation(value = "退料申请详情") @GetMapping("/getView") - public TableDataInfo getView(@RequestBody BackApplyInfo bean) + public TableDataInfo getView(BackApplyInfo bean) { startPage(); List list = backApplyService.getView(bean); @@ -86,7 +86,7 @@ public class BackApplyController extends BaseController { */ @ApiOperation(value = "退料申请删除") @GetMapping("/del") - public AjaxResult del(@RequestBody BackApplyInfo bean) + public AjaxResult del(BackApplyInfo bean) { return backApplyService.del(bean); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseMacodeInfoController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseMacodeInfoController.java index 0fcee176..6a1e9c37 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseMacodeInfoController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/PurchaseMacodeInfoController.java @@ -86,21 +86,6 @@ public class PurchaseMacodeInfoController extends BaseController return purchaseMacodeInfoService.insertPurchaseMacodeInfo(purchaseMacodeInfoList); } - /** - * 生成设备编号 - */ - @ApiOperation(value = "生成设备编号") - @PostMapping("/equipmentNumber") - public AjaxResult generateEquipmentNumber(@RequestBody EquipmentNumberVO equipmentNumberVO) throws Exception { - Long typeId = equipmentNumberVO.getTypeId(); - if (typeId == null) { - throw new Exception("类型typeId为空!"); - } - if (equipmentNumberVO.getCount() == 0) { - throw new Exception("生成数量为0!"); - } - return success(purchaseMacodeInfoService.generateEquipmentNumber(equipmentNumberVO)); - } /** * 修改新购验收编号管理 @@ -112,7 +97,7 @@ public class PurchaseMacodeInfoController extends BaseController } /** - * 修改新购验收编号管理 + * 修改新购验收编号管理,暂时不用 */ @ApiOperation(value = "修改编码管理的入库状态") @PutMapping("/manageStatus") diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseMacodeInfoMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseMacodeInfoMapper.java index 2dcb949d..68fab2fd 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseMacodeInfoMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/PurchaseMacodeInfoMapper.java @@ -2,6 +2,7 @@ package com.bonus.sgzb.material.mapper; import com.alibaba.fastjson.JSONObject; import com.bonus.sgzb.base.api.domain.MaMachine; +import com.bonus.sgzb.base.api.domain.MaMachineLabel; import com.bonus.sgzb.base.api.domain.MaType; import com.bonus.sgzb.material.domain.MaInputRecord; import com.bonus.sgzb.material.domain.PurchaseMacodeInfo; @@ -102,4 +103,8 @@ public interface PurchaseMacodeInfoMapper { int selectMaCode(String maCode); int updateMacodeByType(PurchaseMacodeInfo purchaseMacodeInfo); + + int selectLableNumByMonth(Date nowDate); + + int insertMaMachineLabel(MaMachineLabel maMachineLabel); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IPurchaseMacodeInfoService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IPurchaseMacodeInfoService.java index e069255b..eadb2a3c 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IPurchaseMacodeInfoService.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/IPurchaseMacodeInfoService.java @@ -1,6 +1,7 @@ package com.bonus.sgzb.material.service; import com.alibaba.fastjson.JSONObject; +import com.bonus.sgzb.base.api.domain.MaMachineLabel; import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.material.domain.MaInputRecord; import com.bonus.sgzb.material.domain.PurchaseMacodeInfo; @@ -65,7 +66,7 @@ public interface IPurchaseMacodeInfoService */ public int deletePurchaseMacodeInfoByTaskId(Long taskId); - JSONObject generateEquipmentNumber(EquipmentNumberVO equipmentNumberVO); + String generateEquipmentNumber(MaMachineLabel maMachineLabel); int deletePurchaseMacodeInfoById(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 e88422c5..3d93fb33 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 @@ -5,6 +5,7 @@ import java.util.Date; import java.util.List; import com.bonus.sgzb.base.api.domain.TmTask; +import com.bonus.sgzb.common.security.utils.SecurityUtils; import com.bonus.sgzb.material.domain.BmNoticeInfo; import com.bonus.sgzb.material.domain.PurchaseCheckDetails; import com.bonus.sgzb.material.domain.PurchaseCheckInfo; @@ -112,6 +113,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService task.setCode(purchaseCodeRule()); task.setCreateTime(DateUtils.getNowDate()); task.setCompanyId(purchaseCheckInfo.getCompanyId()); + task.setCreateBy(SecurityUtils.getUsername()); // 创建任务信息 taskMapper.insertTmTask(task); purchaseCheckInfo.setTaskId(task.getTaskId()); 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 3d04a4d9..17cadf5e 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,6 +8,7 @@ import java.util.List; import com.alibaba.fastjson.JSONObject; import com.bonus.sgzb.base.api.domain.MaMachine; +import com.bonus.sgzb.base.api.domain.MaMachineLabel; import com.bonus.sgzb.base.api.domain.MaType; import com.bonus.sgzb.base.api.domain.TmTask; import com.bonus.sgzb.common.core.utils.StringUtils; @@ -95,15 +96,22 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService } PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails(); for (PurchaseMacodeInfo purchaseMacodeInfo : purchaseMacodeInfoList) { + Long taskId = purchaseMacodeInfo.getTaskId(); + TmTask task = taskMapper.selectTmTaskByTaskId(taskId); Long typeId = purchaseMacodeInfo.getTypeId(); String maCode = purchaseMacodeInfo.getMaCode(); purchaseCheckDetails.setTypeId(typeId); purchaseCheckDetails.setTaskId(purchaseMacodeInfo.getTaskId()); + + MaMachineLabel maLabel = new MaMachineLabel(); + String qrCode = generateEquipmentNumber(maLabel); + if (StringUtils.isNotEmpty(maCode)) { MaMachine maMachine = new MaMachine(); maMachine.setTypeId(typeId); maMachine.setMaStatus("14"); - maMachine.setQrCode(purchaseMacodeInfo.getQrCode()); + maMachine.setQrCode(qrCode); + maMachine.setBuyTask(task.getCode()); // 设备原厂编号 String fixCode = purchaseMacodeInfo.getFixCode(); if ("0".equals(fixCode)) { @@ -118,16 +126,7 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService maMachine.setCreateBy(SecurityUtils.getUsername()); purchaseMacodeInfoMapper.maMachineAdd(maMachine); } - String qrCode = purchaseMacodeInfo.getQrCode(); - // 二维码存储 - if (StringUtils.isNotEmpty(qrCode)) { - BmQrcodeInfo bmQrcodeInfo = new BmQrcodeInfo(); - bmQrcodeInfo.setTypeId(typeId); - bmQrcodeInfo.setQrCode(qrCode); - bmQrcodeInfo.setTaskId(purchaseMacodeInfo.getTaskId()); - bmQrcodeInfo.setCreateTime(new Date()); - qrcodeInfoMapper.insertBmQrcodeInfo(bmQrcodeInfo); - } + purchaseMacodeInfo.setStatus("0"); purchaseMacodeInfo.setCreateTime(DateUtils.getNowDate()); purchaseMacodeInfoMapper.insertPurchaseMacodeInfo(purchaseMacodeInfo); @@ -215,55 +214,27 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService /** * 生成设备编号 * - * @param equipmentNumberVO 类型id,生成数量 + * @param maMachineLabel 类型id,生成数量 * @return 编码结果 */ @Override - public JSONObject generateEquipmentNumber(EquipmentNumberVO equipmentNumberVO) { - Long typeId = equipmentNumberVO.getTypeId(); - SimpleDateFormat sdf = new SimpleDateFormat("yyMM"); + public String generateEquipmentNumber(MaMachineLabel maMachineLabel) { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); Date nowDate = DateUtils.getNowDate(); - String format = sdf.format(nowDate); - - JSONObject jsonObject = purchaseMacodeInfoMapper.getTypeByTypeId(typeId); - String typeCode = jsonObject.getString("modelCode"); - String specsCode = jsonObject.getString("specsCode"); - //序列号 - int count = purchaseMacodeInfoMapper.getSerialNumber(typeId, nowDate) + 1; - List list = new ArrayList<>(); - List codeList = new ArrayList<>(); - for (int i = 0; i < equipmentNumberVO.getCount(); i++) { - int i1 = count + i; - // 编码规则 - String codingRule = "NSJJ" + specsCode + format + typeCode; - String codeNum = ""; - String code = format; - String code1 = format; - if (i1 > 9 && i1 < 100) { - codeNum = "-00" + i1; - code1 = "-00" + i1; - } else if (i1 > 99 && i1 < 1000) { - codeNum = "-0" + i1; - code1 = "-0" + i1; - } else { - codeNum = "-000" + i1; - code1 = "-000" + i1; - } - codingRule = codingRule + codeNum; - code = code + code1; - // 二维码 - int i2 = purchaseMacodeInfoMapper.selectMachineByMaCode(codingRule); - if (i2 <= 0) { - list.add(codingRule); - } - codeList.add(code); + String format = dateFormat.format(nowDate); + int lableNum = purchaseMacodeInfoMapper.selectLableNumByMonth(nowDate) + 1; + String code=""; + if (lableNum>9 && lableNum<100){ + code = format + "-00" + lableNum; + }else if (lableNum>99 && lableNum<1000){ + code = format + "-0" + lableNum; + }else { + code = format + "-000" + lableNum; } - - JSONObject result = new JSONObject(); - result.put("equipmentNum", list); - result.put("twoDimensionalCode", codeList); - - return result; + maMachineLabel.setIsBind("0"); + maMachineLabel.setLabelCode(code); + purchaseMacodeInfoMapper.insertMaMachineLabel(maMachineLabel); + return code; } /** @@ -278,7 +249,7 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService } /** - * 修改编码管理的入库状态 + * 修改编码管理的入库状态,暂时不用 * * @param maInputVO 入库信息 * @return 结果 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 ba6a973d..9da62c3c 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 @@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join tm_task tk on pci.task_id = tk.task_id left join (select id,name from sys_dic where p_id = 23) dict on tk.task_status = dict.id left join sys_user su on pci.purchaser = su.user_id - where task_type = 23 and tk.task_status in (24,25,26,27) + where task_type = 23 and tk.code = #{code} and pci.purchase_time = #{purchaseTime} and pci.arrival_time = #{arrivalTime} @@ -144,7 +144,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select type_id typeId, type_name, parent_id, status, num, unit_id, manage_type, lease_price, buy_price, pay_price, @@ -260,7 +279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + update ma_type set num = #{num} where type_id = #{typeId} diff --git a/sgzb-modules/sgzb-system/pom.xml b/sgzb-modules/sgzb-system/pom.xml index 163e457a..96019531 100644 --- a/sgzb-modules/sgzb-system/pom.xml +++ b/sgzb-modules/sgzb-system/pom.xml @@ -102,7 +102,7 @@ org.apache.poi poi-scratchpad - 4.1.1 + 4.1.2 @@ -123,5 +123,5 @@ - + \ No newline at end of file diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesCode.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesCode.vue index 5b0177b9..04568889 100644 --- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesCode.vue +++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesCode.vue @@ -108,7 +108,7 @@ - +
-
@@ -146,10 +146,14 @@ - + + + =this.form.checkNum){ - this.$modal.msgError("生成编码数量不可超过采购验收数量!!!"); - }else{ - for(let i = 0; i < this.form.count; i++) { - let obj = { - typeName:this.form.typeName, - specificationType:this.form.specificationType, - typeId: this.form.typeId, - taskId: this.form.taskId, - assetsCode:'', - isFixed:this.form.isFixed, - } - this.newCodeList.push(obj) - } - console.log(this.newCodeList,'this.newCodeList') - this.codeList = this.getCodeList.concat(this.newCodeList) - } + // if(this.codeList.length>=this.form.checkNum){ + // this.$modal.msgError("生成编码数量不可超过采购验收数量!!!"); + // }else{ + // for(let i = 0; i < this.form.count; i++) { + // let obj = { + // typeName:this.form.typeName, + // specificationType:this.form.specificationType, + // typeId: this.form.typeId, + // taskId: this.form.taskId, + // assetsCode:'', + // isFixed:this.form.isFixed, + // } + // this.newCodeList.push(obj) + // } + // console.log(this.newCodeList,'this.newCodeList') + // this.codeList = this.getCodeList.concat(this.newCodeList) + // } }, //填充按钮 fillingCodeList(){ console.log(Number(this.form.str)) this.codeList = [] let num = Number(this.form.str) - console.log(Number(this.form.str1)) + // console.log(Number(this.form.str1)) let num1 = Number(this.form.str1) let count= num1-num+1;//生成数量 - + console.log() let sum = count + this.form.bindNum; console.log(sum) - if(sum>this.form.checkNum){ - this.$modal.msgError("编码数量已超过验收数量"); - }else{ + // if(sum>this.form.checkNum){ + // this.$modal.msgError("已绑定编码"+this.form.bindNum+"个,总数量已超过验收数量,请调整后缀范围。"); + // }else{ if(num1>num){ for(let i = 0; i < count; i++) { let obj = { @@ -380,14 +389,16 @@ export default { specificationType:this.form.specificationType, typeId: this.form.typeId, taskId: this.form.taskId, - maCode:this.form.exCode+(i+num), + maCode:this.form.exCode+("00000" + (num+i)).slice(-4), assetsCode:'', isFixed:this.form.isFixed, } this.codeList.push(obj) } + }else{ + this.$modal.msgError("编码后缀范围输入格式不正确"); } - } + // } }, /** 提交按钮 */ @@ -407,15 +418,14 @@ export default { }else{ editPurchaseMacode(this.codeList).then(response => { console.log(response.data) - if(response.data && response.length>0){ + if(response.data && response.data.length>0){ this.codeList = response.data; + this.$modal.msgError("编码绑定失败,存在重复编码,请重新输入"); }else{ - this.$modal.msgSuccess("绑定成功"); + this.$modal.msgSuccess("编码绑定成功"); this.open = false; this.getList(); - } - - + } }); } @@ -434,13 +444,19 @@ export default { }); }, delCode(row) { - const maCode = row.maCode ; - this.$modal.confirm('是否确认删除该数据项?').then(function() { - return delMacodeList(maCode); - }).then(() => { - this.getdetailmaCodeList(row); - this.$modal.msgSuccess("删除成功"); - }).catch(() => {}); + console.log(row) + this.codeList.forEach((item,index) => { + if(item.maCode==row.maCode){ + this.codeList.splice(index,1) + } + }); + // const maCode = row.maCode ; + // this.$modal.confirm('是否确认删除该数据项?').then(function() { + // return delMacodeList(maCode); + // }).then(() => { + // this.getdetailmaCodeList(row); + // this.$modal.msgSuccess("删除成功"); + // }).catch(() => {}); }, // 返回列表页 jumpList(){ diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue index d3121124..43a300e6 100644 --- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue +++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesList.vue @@ -76,7 +76,19 @@ - + + + + + + + diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue index 9cb19e2b..ce1b6287 100644 --- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue +++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue @@ -118,9 +118,10 @@ - + @@ -135,6 +136,7 @@ size="mini" type="text" icon="el-icon-edit" + v-if="scope.row.taskStatus=='26'" @click="handleUpdate(scope.row)" >审核 @@ -253,12 +255,15 @@ - + - + @@ -266,11 +271,13 @@ 通过 不通过 @@ -453,16 +460,17 @@ export default { row.taskId = this.query.taskId; let obj = { taskId:this.query.taskId, - checkResult:'1',//1 审核通过 2 驳回 -必填 maId:row.maId, + inputNum:row.checkNum, maCode:row.maCode, typeId:row.typeId, - - // remark:row.remark, - // repairNum:row.repairNum, } - let param =[obj] + let param ={ + taskId:this.query.taskId, + checkResult:'1', + inputRecordList:[obj] + } changePutinStatus(param).then(response => { if(response.code==200){ this.$modal.msgSuccess("审批成功"); @@ -477,11 +485,17 @@ export default { console.log(this.ids) this.ids.forEach(item => { item.taskId = this.query.taskId; - item.checkType = '1' - item.type= item.manageType//0.编号 1.计数 + item.typeId= item.typeId + item.maId= item.maId + item.inputNum= item.checkNum + item.maCode= item.maCode }); - - changePutinStatus(this.ids).then(response => { + let param ={ + taskId:this.query.taskId, + checkResult:'1', + inputRecordList:this.ids + } + changePutinStatus(param).then(response => { if(response.code==200){ this.$modal.msgSuccess("审批成功"); this.getDialogTable(); @@ -497,16 +511,17 @@ export default { row.taskId = this.query.taskId; let obj = { taskId:this.query.taskId, - id:row.id, - checkType:'2',//1 审核通过 2 驳回 -必填 - type:row.manageType,//0.编号 1.计数 maId:row.maId, + maCode:row.maCode, + inputNum:row.checkNum, typeId:row.typeId, - remark:row.remark, - repairNum:row.repairNum, } - let param =[obj] + let param ={ + taskId:this.query.taskId, + checkResult:'2', + inputRecordList:[obj] + } changePutinStatus(param).then(response => { if(response.code==200){ this.$modal.msgSuccess("审批成功"); @@ -521,11 +536,18 @@ export default { console.log(this.ids) this.ids.forEach(item => { item.taskId = this.query.taskId; - item.checkType = '2' - item.type=item.manageType + item.typeId= item.typeId + item.maId= item.maId + item.inputNum= item.checkNum + item.maCode= item.maCode }); + let param ={ + taskId:this.query.taskId, + checkResult:'2', + inputRecordList:this.ids + } - changePutinStatus(this.ids).then(response => { + changePutinStatus(param).then(response => { if(response.code==200){ this.$modal.msgSuccess("审批成功"); this.getDialogTable(); diff --git a/sgzb-ui/src/views/store/shelves/shelvesConfig.vue b/sgzb-ui/src/views/store/shelves/shelvesConfig.vue index c3d26f7c..a9c85bd8 100644 --- a/sgzb-ui/src/views/store/shelves/shelvesConfig.vue +++ b/sgzb-ui/src/views/store/shelves/shelvesConfig.vue @@ -99,17 +99,17 @@ - + - - - - - + + + + + - 删除 + >删除 --> @@ -355,16 +355,7 @@ export default { status: undefined, deptId: undefined }, - // 列信息 - columns: [ - { key: 0, label: `用户编号`, visible: true }, - { key: 1, label: `用户名称`, visible: true }, - { key: 2, label: `用户昵称`, visible: true }, - { key: 3, label: `部门`, visible: true }, - { key: 4, label: `手机号码`, visible: true }, - { key: 5, label: `状态`, visible: true }, - { key: 6, label: `创建时间`, visible: true } - ], + // 表单校验 rules: { userName: [ @@ -432,8 +423,8 @@ export default { }, // 节点单击事件 handleNodeClick(data) { - this.queryParams.deptId = data.id; - this.handleQuery(); + // this.queryParams.deptId = data.id; + // this.handleQuery(); }, // 取消按钮 diff --git a/sgzb-ui/src/views/store/tools/devices.vue b/sgzb-ui/src/views/store/tools/devices.vue index 0b48c134..e8178f5b 100644 --- a/sgzb-ui/src/views/store/tools/devices.vue +++ b/sgzb-ui/src/views/store/tools/devices.vue @@ -1,57 +1,72 @@ + - - + + @@ -104,12 +120,13 @@