diff --git a/src/main/java/com/huaheng/pc/check/checkingRegister/controller/CheckingRegisterController.java b/src/main/java/com/huaheng/pc/check/checkingRegister/controller/CheckingRegisterController.java index c197e8a..a611dea 100644 --- a/src/main/java/com/huaheng/pc/check/checkingRegister/controller/CheckingRegisterController.java +++ b/src/main/java/com/huaheng/pc/check/checkingRegister/controller/CheckingRegisterController.java @@ -130,10 +130,12 @@ public class CheckingRegisterController extends BaseController { IPage<CheckingRegister> iPage = checkingRegisterService.page(page, lambdaQueryWrapper); if (isDetailNull){ if (iPage.getTotal() == 0){ + //空list List emptyList = checkingRegisterService.emptyList(checkingRegister.getCheckDetailId()); return getMpDataTable(emptyList, Long.valueOf(emptyList.size())); } if (!"20".equals(checkDetail.getStatus())){ + //未完成质检list List notCompleteList = checkingRegisterService.notCompleteList(checkingRegister.getCheckDetailId()); return getMpDataTable(notCompleteList, Long.valueOf(notCompleteList.size())); } @@ -143,10 +145,12 @@ public class CheckingRegisterController extends BaseController { List<CheckingRegister> list = checkingRegisterService.list(lambdaQueryWrapper); if (isDetailNull){ if (list.size() == 0){ + //空list List emptyList = checkingRegisterService.emptyList(checkingRegister.getCheckDetailId()); return getMpDataTable(emptyList, Long.valueOf(emptyList.size())); } if (!"20".equals(checkDetail.getStatus())){ + //未完成质检list List notCompleteList = checkingRegisterService.notCompleteList(checkingRegister.getCheckDetailId()); return getMpDataTable(notCompleteList, Long.valueOf(notCompleteList.size())); } diff --git a/src/main/java/com/huaheng/pc/config/cycleCountPreference/controller/cycleCountPreferenceController.java b/src/main/java/com/huaheng/pc/config/cycleCountPreference/controller/cycleCountPreferenceController.java index 6769def..1e981b5 100644 --- a/src/main/java/com/huaheng/pc/config/cycleCountPreference/controller/cycleCountPreferenceController.java +++ b/src/main/java/com/huaheng/pc/config/cycleCountPreference/controller/cycleCountPreferenceController.java @@ -65,9 +65,11 @@ public class cycleCountPreferenceController extends BaseController { .le(StringUtils.isNotEmpty(createdEnd), CycleCountPreference::getCreated, createdEnd)//创建时间范围 .eq(CycleCountPreference::getWarehouseCode, ShiroUtils.getWarehouseCode()) //仓库 .eq(StringUtils.isNotEmpty(cycleCountPreference.getCode()), CycleCountPreference::getCode, cycleCountPreference.getCode())//首选项编码 - .eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptLocation()),CycleCountPreference::getPromptLocation,cycleCountPreference.getPromptLocation())//提示货位 + + /*.eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptLocation()),CycleCountPreference::getPromptLocation,cycleCountPreference.getPromptLocation())//提示货位 .eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptLpn()),CycleCountPreference::getPromptLpn,cycleCountPreference.getPromptLpn())//提示PLN .eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptItem()),CycleCountPreference::getPromptItem,cycleCountPreference.getPromptItem())//提示物料 + */ .eq(StringUtils.isNotEmpty(cycleCountPreference.getLastUpdatedBy()),CycleCountPreference::getLastUpdatedBy,cycleCountPreference.getLastUpdatedBy())//更新人 .eq(StringUtils.isNotEmpty(cycleCountPreference.getCreatedBy()),CycleCountPreference::getCreatedBy,cycleCountPreference.getCreatedBy())//创建人 diff --git a/src/main/java/com/huaheng/pc/config/cycleCountPreference/domain/CycleCountPreference.java b/src/main/java/com/huaheng/pc/config/cycleCountPreference/domain/CycleCountPreference.java index 048d7bb..1225c3c 100644 --- a/src/main/java/com/huaheng/pc/config/cycleCountPreference/domain/CycleCountPreference.java +++ b/src/main/java/com/huaheng/pc/config/cycleCountPreference/domain/CycleCountPreference.java @@ -48,35 +48,35 @@ public class CycleCountPreference implements Serializable { */ @TableField(value = "promptLocation") @ApiModelProperty(value="系统提示货位") - private String promptLocation; + private Boolean promptLocation; /** - * 系统提示LPN + * 系统提示容器 */ @TableField(value = "promptLpn") - @ApiModelProperty(value="系统提示LPN") - private String promptLpn; + @ApiModelProperty(value="系统提示容器") + private Boolean promptLpn; /** * 系统提示物料 */ @TableField(value = "promptItem") @ApiModelProperty(value="系统提示物料") - private String promptItem; + private Boolean promptItem; /** * 显示库存数量 */ @TableField(value = "promptQuantity") @ApiModelProperty(value="显示库存数量") - private Integer promptQuantity; + private Boolean promptQuantity; /** * 允许添加库存 */ @TableField(value = "allowAddNewInventory") @ApiModelProperty(value="允许添加库存") - private Integer allowAddNewInventory; + private Boolean allowAddNewInventory; /** * 有效 @@ -153,7 +153,7 @@ public class CycleCountPreference implements Serializable { */ @TableField(value = "countByPiece") @ApiModelProperty(value="RF逐件盘点") - private Integer countByPiece; + private Boolean countByPiece; private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/config/station/domain/Station.java b/src/main/java/com/huaheng/pc/config/station/domain/Station.java new file mode 100644 index 0000000..70eadf5 --- /dev/null +++ b/src/main/java/com/huaheng/pc/config/station/domain/Station.java @@ -0,0 +1,75 @@ +package com.huaheng.pc.config.station.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * Created by Enzo Cotter on 2019/10/11. + */ + +@ApiModel(value="com.huaheng.pc.config.station.domain.Station") +@Data +@TableName(value = "station") +public class Station implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + @ApiModelProperty(value="null") + private Integer id; + + /** + * 编码 + */ + @TableField(value = "code") + @ApiModelProperty(value="编码") + private String code; + + /** + * 状态 + */ + @TableField(value = "status") + @ApiModelProperty(value="状态") + private Integer status; + + /** + * 仓库编码 + */ + @TableField(value = "warehouseCode") + @ApiModelProperty(value="仓库编码") + private String warehouseCode; + + /** + * 创建时间 + */ + @TableField(value = "created") + @ApiModelProperty(value="创建时间") + private Date created; + + /** + * 创建者 + */ + @TableField(value = "createdBy") + @ApiModelProperty(value="创建者") + private String createdBy; + + /** + * 更新时间 + */ + @TableField(value = "lastUpdated") + @ApiModelProperty(value="更新时间") + private Date lastUpdated; + + /** + * 更新者 + */ + @TableField(value = "lastUpdatedBy") + @ApiModelProperty(value="更新者") + private String lastUpdatedBy; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/config/station/mapper/StationMapper.java b/src/main/java/com/huaheng/pc/config/station/mapper/StationMapper.java new file mode 100644 index 0000000..bc6daa8 --- /dev/null +++ b/src/main/java/com/huaheng/pc/config/station/mapper/StationMapper.java @@ -0,0 +1,11 @@ +package com.huaheng.pc.config.station.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.huaheng.pc.config.station.domain.Station; + +/** + * Created by Enzo Cotter on 2019/10/11. + */ + +public interface StationMapper extends BaseMapper<Station> { +} \ No newline at end of file diff --git a/src/main/java/com/huaheng/pc/config/station/service/StationService.java b/src/main/java/com/huaheng/pc/config/station/service/StationService.java new file mode 100644 index 0000000..700a323 --- /dev/null +++ b/src/main/java/com/huaheng/pc/config/station/service/StationService.java @@ -0,0 +1,16 @@ +package com.huaheng.pc.config.station.service; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.huaheng.pc.config.station.domain.Station; +import com.huaheng.pc.config.station.mapper.StationMapper; +/** + * Created by Enzo Cotter on 2019/10/11. + */ + +@Service +public class StationService extends ServiceImpl<StationMapper, Station> { + +} diff --git a/src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java b/src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java index fab073e..aed5c23 100644 --- a/src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java +++ b/src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java @@ -165,6 +165,10 @@ public class adjustDetailController extends BaseController { if(StringUtils.isEmpty(adjustDetailEdit.getAgreeBy()) || adjustDetailEdit.getStatus() < 1 ){ return AjaxResult.error("单据未审批不允许调整"); } + //不能重复调整 + if(adjustDetailEdit.getStatus() >= 3){ + return AjaxResult.error("不能重复调整!"); + } adjustDetailService.updateAdjustDetail(adjustDetailEdit); } return AjaxResult.success("调整下发成功!"); diff --git a/src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailServiceImpl.java b/src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailServiceImpl.java index de35612..724fd2c 100644 --- a/src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailServiceImpl.java +++ b/src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailServiceImpl.java @@ -45,6 +45,8 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj @Resource private CycleCountDetailService cycleCountDetailService; @Resource + private AdjustHeaderService adjustHeaderService; + @Resource private MaterialService materialService; @Resource private CheckDetailService checkDetailService; @@ -72,10 +74,14 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj @Transactional @Override public AjaxResult addDetails(AdjustDetail adjustDetail) { - //数据直接插入表里 - //查询主单据 - + //查询主单据 + AdjustHeader adjustHeader = new AdjustHeader(); + adjustHeader.setCode(adjustDetail.getAdjustCode()); + adjustHeader.setWarehouseCode(adjustDetail.getWarehouseCode()); + adjustHeader.setCompanyCode(adjustDetail.getCompanyCode()); + LambdaQueryWrapper<AdjustHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(adjustHeader); + adjustHeader = adjustHeaderService.getOne(lambdaQueryWrapper); //检查库存 if((adjustDetail.getInventoryDetailId()) != null){ InventoryDetail inventoryDetail = inventoryDetailService.getById(adjustDetail.getInventoryDetailId()); @@ -103,17 +109,16 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj if(!material.getName().equals(adjustDetail.getMaterialName())){ return AjaxResult.error("物料名称错误!"); } - }else{ return AjaxResult.error("物料编码错误!"); } + adjustDetail.setProblemType(adjustHeader.getProblemType());//调整类型 adjustDetail.setMaterialUnit(material.getUnit()); adjustDetail.setMaterialSpec(material.getSpec()); adjustDetail.setCreated(new Date()); adjustDetail.setCreatedBy(ShiroUtils.getLoginName()); adjustDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); adjustDetail.setLastUpdated(new Date()); - this.saveOrUpdate(adjustDetail); return AjaxResult.success("新增调整明细成功!"); @@ -157,7 +162,7 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj AjaxResult.error("该单据已调整,不允许再次调整!" ); } //查询调整的库存明细 - InventoryDetail inventoryDetail ; + InventoryDetail inventoryDetail; //调整单中不带库存明细时不查询 if(adjustDetail.getInventoryDetailId() != null) { inventoryDetail = inventoryDetailService.getById(adjustDetail.getInventoryDetailId()); @@ -166,23 +171,16 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj return AjaxResult.error("调整单和所调整库存的库位容器不符,前检查数据"); } //验证该条库存是不是正在使用,验证库存明细 - /*Location location = new Location(); + Location location = new Location(); location.setCode(inventoryDetail.getLocationCode()); location.setWarehouseCode(inventoryDetail.getWarehouseCode()); LambdaQueryWrapper<Location> lambdaQueryWrapper = Wrappers.lambdaQuery(location); location = locationService.getOne(lambdaQueryWrapper); if (!location.getStatus().equals("empty")) { return AjaxResult.error (inventoryDetail.getId() + "库存非空闲,请等待其他任务完成再进行调整!"); - }*/ - - //判断调整哪一个属性值 - /*以下方法有待验证讨论,BigDecimal传入null,如何避免传入0?*/ - - //把BigDecimal类型转换成String再判断null - - String toQtyString = adjustDetail.getToQty().toString(); //调整后库存 - String gapQtyString = adjustDetail.getGapQty().toString(); //调整变动数量 - if (StringUtils.isNotEmpty(toQtyString) || StringUtils.isNotEmpty(gapQtyString)) { + } + //判断调整库存状态还是数量 + if (adjustDetail.getToQty() != null || adjustDetail.getGapQty() != null) { //调整数量 updateAdjustDetailNumber(adjustDetail, inventoryDetail); } @@ -240,9 +238,10 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj inventoryDetail.setQty(adjustDetail.getToQty());//调整后的数量 inventoryDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); inventoryDetail.setLastUpdated(new Date()); - inventoryDetailService.saveOrUpdate(inventoryDetail); - - } + Boolean j = inventoryDetailService.saveOrUpdate(inventoryDetail); + if(j == false){ + throw new SecurityException("调整修改库存失败!"); + } } //写入库存交易记录 InventoryTransaction inventoryTransaction = new InventoryTransaction(); inventoryTransaction.setWarehouseCode(inventoryDetail.getWarehouseCode()); @@ -256,8 +255,8 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj inventoryTransaction.setMaterialUnit(inventoryDetail.getMaterialUnit()); inventoryTransaction.setTaskQty(adjustDetail.getGapQty()); inventoryTransaction.setInventorySts(inventoryDetail.getInventorySts()); - inventoryTransaction.setReferCode(inventoryDetail.getReferCode()); - inventoryTransaction.setReferDetailId(inventoryDetail.getReferDetailId()); + inventoryTransaction.setReferCode(adjustDetail.getAdjustCode()); + inventoryTransaction.setReferDetailId(adjustDetail.getId().toString()); inventoryTransaction.setBatch(inventoryDetail.getBatch()); inventoryTransaction.setLot(inventoryDetail.getLot()); inventoryTransaction.setProjectNo(inventoryDetail.getProjectNo()); @@ -281,8 +280,10 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj // inventoryTransaction.setBillCode(); inventoryTransaction.setBillDetailId(inventoryDetail.getReceiptDetailId()); inventoryTransaction.setSupplierCode(inventoryDetail.getSupplierCode()); - inventoryTransactionService.saveOrUpdate(inventoryTransaction); - + Boolean k = inventoryTransactionService.saveOrUpdate(inventoryTransaction); + if(k == false){ + throw new SecurityException("调整单库存交易生成失败!"); + } } /** @@ -295,11 +296,12 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj //修改库存的状态 inventoryDetail.setInventorySts(adjustDetail.getToInventorySts());//修改为调整库存 + inventoryDetail.setExpirationDate(adjustDetail.getExpirationDate()); inventoryDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); inventoryDetail.setLastUpdated(new Date()); inventoryDetailService.saveOrUpdate(inventoryDetail); - //写入库存交易,库存交易2条一条出,一条入 + //写入库存交易,2条一条出,一条入 //调整出 InventoryTransaction inventoryTransaction = new InventoryTransaction(); inventoryTransaction.setWarehouseCode(inventoryDetail.getWarehouseCode()); @@ -313,8 +315,8 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj inventoryTransaction.setMaterialUnit(inventoryDetail.getMaterialUnit()); inventoryTransaction.setTaskQty(BigDecimal.ZERO);//数量不变 inventoryTransaction.setInventorySts(adjustDetail.getFromInventorySts());//状态 - inventoryTransaction.setReferCode(inventoryDetail.getReferCode()); - inventoryTransaction.setReferDetailId(inventoryDetail.getReferDetailId()); + inventoryTransaction.setReferCode(adjustDetail.getAdjustCode()); + inventoryTransaction.setReferDetailId(adjustDetail.getId().toString()); inventoryTransaction.setBatch(inventoryDetail.getBatch()); inventoryTransaction.setLot(inventoryDetail.getLot()); inventoryTransaction.setProjectNo(inventoryDetail.getProjectNo()); @@ -346,8 +348,8 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj inventoryTransaction2.setMaterialUnit(inventoryDetail.getMaterialUnit()); inventoryTransaction2.setTaskQty(BigDecimal.ZERO);//数量不变 inventoryTransaction2.setInventorySts(inventoryDetail.getInventorySts());//状态 - inventoryTransaction2.setReferCode(inventoryDetail.getReferCode()); - inventoryTransaction2.setReferDetailId(inventoryDetail.getReferDetailId()); + inventoryTransaction.setReferCode(adjustDetail.getAdjustCode()); + inventoryTransaction.setReferDetailId(adjustDetail.getId().toString()); inventoryTransaction2.setBatch(inventoryDetail.getBatch()); inventoryTransaction2.setLot(inventoryDetail.getLot()); inventoryTransaction2.setProjectNo(inventoryDetail.getProjectNo()); diff --git a/src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java b/src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java index 817579f..cc23162 100644 --- a/src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java +++ b/src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java @@ -289,6 +289,10 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R lambdaDetails.eq(ReceiptDetail::getReceiptId, id); List<ReceiptDetail> receiptDetails = this.list(lambdaDetails); + // 判断入库明细是否为空 + if (receiptDetails.isEmpty()){ + throw new ServiceException("不存在入库明细"); + } //查询出头表信息 ReceiptHeader receiptHeader = receiptHeaderService.getById(id); Integer minStatus = Integer.parseInt(receiptDetails.get(0).getProcessStamp()); @@ -362,7 +366,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R //如果明细中需要质检,则判断是否已经生成质检单 if ("0".equals(receiptDetail.getQcCheck())){ LambdaQueryWrapper<CheckHeader> lambda = Wrappers.lambdaQuery(); - lambda.eq(CheckHeader::getReferCode, receiptDetail.getReceiptCode()); + lambda.eq(CheckHeader::getCode, receiptDetail.getReceiptCode()); CheckHeader checkHeader = checkHeaderService.getOne(lambda); if (checkHeader == null){ return true; diff --git a/src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java b/src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java index c932d14..b231d2b 100644 --- a/src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java +++ b/src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java @@ -24,6 +24,7 @@ import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailServiceImpl; import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader; import com.huaheng.pc.receipt.receiptHeader.mapper.ReceiptHeaderMapper; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.lang.ref.WeakReference; @@ -161,10 +162,10 @@ public class ReceiptHeaderService extends ServiceImpl<ReceiptHeaderMapper, Recei //判断是否已经生成了质检单 LambdaQueryWrapper<CheckHeader> checkHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); - checkHeaderLambdaQueryWrapper.eq(CheckHeader::getReferCode, receiptHeader.getCode()); + checkHeaderLambdaQueryWrapper.eq(CheckHeader::getCode, receiptHeader.getCode()); CheckHeader checkHeaderQuery = checkHeaderService.getOne(checkHeaderLambdaQueryWrapper); if (checkHeaderQuery != null){ - throw new ServiceException("质检表已生成"); + throw new ServiceException("质检单已生成"); } //创建质检头表 CheckHeader checkHeader = new CheckHeader(); @@ -260,6 +261,7 @@ public class ReceiptHeaderService extends ServiceImpl<ReceiptHeaderMapper, Recei * @param ids 头表id字符串 * @return */ + @Transactional public AjaxResult addPool(String ids){ List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); for (Integer id : idList){ @@ -269,6 +271,12 @@ public class ReceiptHeaderService extends ServiceImpl<ReceiptHeaderMapper, Recei if (list.size() != 0){ for (ReceiptDetail receiptDetail : list){ if (Integer.parseInt(receiptDetail.getProcessStamp()) < 100){ + //判断入库明细是否需要审核 + ReceiptDetail beforeReceiptDetail = receiptDetailService.queryflow(receiptDetail); + if (Integer.parseInt(beforeReceiptDetail.getProcessStamp()) == 5 || Integer.parseInt(beforeReceiptDetail.getProcessStamp()) == 100){ + throw new ServiceException("请先提交审核"); + } + //加入订单池 receiptDetail.setProcessStamp("100"); ReceiptDetail receiptDetail1 = receiptDetailService.queryflow(receiptDetail); if (!receiptDetailService.updateById(receiptDetail1)){ @@ -282,6 +290,6 @@ public class ReceiptHeaderService extends ServiceImpl<ReceiptHeaderMapper, Recei //更新头表状态 receiptDetailService.updateReceiptHeaderLastStatus(id); } - return AjaxResult.success(""); + return AjaxResult.success("加入成功"); } } diff --git a/src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java b/src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java index ac39e43..bd493fc 100644 --- a/src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java +++ b/src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java @@ -112,7 +112,7 @@ public class ReceivingService { //物料类别中定位规则为空时,查询入库首选项 LambdaQueryWrapper<ConfigValue> configValueLambda = Wrappers.lambdaQuery(); configValueLambda.eq(ConfigValue::getWarehouseCode, ShiroUtils.getWarehouseCode()) - .eq(ConfigValue::getModuleType, "入库") + .eq(ConfigValue::getModuleType, "receipt") .eq(ConfigValue::getRecordType, "入库首选项"); ConfigValue configValue = configValueService.getOne(configValueLambda); LambdaQueryWrapper<ReceiptPreference> lambdaQueryWrapper = Wrappers.lambdaQuery(); diff --git a/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java b/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java index d1df8e2..7bca22d 100644 --- a/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java +++ b/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java @@ -152,7 +152,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea ReceiptContainerHeader record =new ReceiptContainerHeader(); record.setStatus((short)0); record.setId(taskHeader.getAllocationHeadId()); - if (receiptContainerHeaderService.updateById(record)){throw new ServiceException("回滚组盘明细失败");} + if (!receiptContainerHeaderService.updateById(record)){throw new ServiceException("回滚组盘明细失败");} } //根据任务类型来更新货箱状态 //修改关联的货箱状态 @@ -1179,8 +1179,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!receiptDetailService.updateById(detail)){ throw new ServiceException("更新入库单详情失败"); } - //更新头表状态 - receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); } } } else { diff --git a/src/main/resources/mybatis/config/CycleCountPreferenceMapper.xml b/src/main/resources/mybatis/config/CycleCountPreferenceMapper.xml index 6205b44..ee9d6e7 100644 --- a/src/main/resources/mybatis/config/CycleCountPreferenceMapper.xml +++ b/src/main/resources/mybatis/config/CycleCountPreferenceMapper.xml @@ -7,11 +7,11 @@ <result column="code" jdbcType="VARCHAR" property="code" /> <result column="name" jdbcType="VARCHAR" property="name" /> <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> - <result column="promptLocation" jdbcType="VARCHAR" property="promptLocation" /> - <result column="promptLpn" jdbcType="VARCHAR" property="promptLpn" /> - <result column="promptItem" jdbcType="VARCHAR" property="promptItem" /> - <result column="promptQuantity" jdbcType="INTEGER" property="promptQuantity" /> - <result column="allowAddNewInventory" jdbcType="INTEGER" property="allowAddNewInventory" /> + <result column="promptLocation" jdbcType="BOOLEAN" property="promptLocation" /> + <result column="promptLpn" jdbcType="BOOLEAN" property="promptLpn" /> + <result column="promptItem" jdbcType="BOOLEAN" property="promptItem" /> + <result column="promptQuantity" jdbcType="BOOLEAN" property="promptQuantity" /> + <result column="allowAddNewInventory" jdbcType="BOOLEAN" property="allowAddNewInventory" /> <result column="Enable" jdbcType="BOOLEAN" property="enable" /> <result column="created" jdbcType="TIMESTAMP" property="created" /> <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> @@ -22,7 +22,7 @@ <result column="userDef2" jdbcType="VARCHAR" property="userDef2" /> <result column="userDef3" jdbcType="VARCHAR" property="userDef3" /> <result column="processStamp" jdbcType="VARCHAR" property="processStamp" /> - <result column="countByPiece" jdbcType="INTEGER" property="countByPiece" /> + <result column="countByPiece" jdbcType="BOOLEAN" property="countByPiece" /> </resultMap> <sql id="Base_Column_List"> <!--@mbg.generated--> diff --git a/src/main/resources/mybatis/config/StationMapper.xml b/src/main/resources/mybatis/config/StationMapper.xml new file mode 100644 index 0000000..40c50ce --- /dev/null +++ b/src/main/resources/mybatis/config/StationMapper.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.huaheng.pc.config.station.mapper.StationMapper"> + <resultMap id="BaseResultMap" type="com.huaheng.pc.config.station.domain.Station"> + <!--@mbg.generated--> + <!--@Table station--> + <id column="id" jdbcType="INTEGER" property="id" /> + <result column="code" jdbcType="VARCHAR" property="code" /> + <result column="status" jdbcType="INTEGER" property="status" /> + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> + <result column="created" jdbcType="TIMESTAMP" property="created" /> + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" /> + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" /> + </resultMap> + <sql id="Base_Column_List"> + <!--@mbg.generated--> + id, code, `status`, warehouseCode, created, createdBy, lastUpdated, lastUpdatedBy + </sql> +</mapper> \ No newline at end of file diff --git a/src/main/resources/templates/check/checkHeader/checkHeader.html b/src/main/resources/templates/check/checkHeader/checkHeader.html index 350d130..ad0f638 100644 --- a/src/main/resources/templates/check/checkHeader/checkHeader.html +++ b/src/main/resources/templates/check/checkHeader/checkHeader.html @@ -130,7 +130,7 @@ var receiptTypes = [[${@receiptTypeService.getType()}]]; var checkHeaderStatus = [[${@dict.getType('checkHeaderStatus')}]]; var checkDetailStatus = [[${@dict.getType('checkDetailStatus')}]]; - var inventorySts = [[${@dict.getType('inventoryStatus')}]]; + var inventorySts = [[${@dict.getType('inventorySts')}]]; var printFlag = [[${@permission.hasPermi('check:checkHeader:report')}]]; var addFlag= [[${@permission.hasPermi('check:checkHeader:add')}]]; var datas = [[${@dict.getType('sys_normal_disable')}]]; diff --git a/src/main/resources/templates/config/cycleCountPreference/add.html b/src/main/resources/templates/config/cycleCountPreference/add.html index fce118b..1f5648b 100644 --- a/src/main/resources/templates/config/cycleCountPreference/add.html +++ b/src/main/resources/templates/config/cycleCountPreference/add.html @@ -17,54 +17,85 @@ <input id="name" name="name" class="form-control" type="text"> </div> </div> + <div class="form-group"> - <label class="col-sm-3 control-label">系统提示货位:</label> + <label class="col-sm-3 control-label">系统提示库位:</label> <div class="col-sm-8"> - <input id="promptLocation" name="promptLocation" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="promptLocation" name="promptLocation"> + <label class="onoffswitch-label" for="promptLocation"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> + <div class="form-group"> - <label class="col-sm-3 control-label">系统提示LPN:</label> - <div class="col-sm-8"> - <input id="promptLpn" name="promptLpn" class="form-control" type="text"> - </div> - </div> - <!-- <div class="form-group"> - <label class="col-sm-3 control-label">允许超收:</label> + <label class="col-sm-3 control-label">系统提示容器:</label> <div class="col-sm-8"> <div class="onoffswitch"> - <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="allowOverReceiving" name="allowOverReceiving"> - <label class="onoffswitch-label" for="allowOverReceiving"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="promptLpn" name="promptLpn"> + <label class="onoffswitch-label" for="promptLpn"> <span class="onoffswitch-inner"></span> <span class="onoffswitch-switch"></span> </label> </div> - </div> - </div>--> + </div> + </div> + <div class="form-group"> <label class="col-sm-3 control-label">系统提示物料:</label> <div class="col-sm-8"> - <input id="promptItem" name="promptItem" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="promptItem" name="promptItem"> + <label class="onoffswitch-label" for="promptLpn"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> + <div class="form-group"> <label class="col-sm-3 control-label">显示库存数量:</label> <div class="col-sm-8"> - <input id="promptQuantity" name="promptQuantity" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="promptQuantity" name="promptQuantity"> + <label class="onoffswitch-label" for="promptQuantity"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> - <div class="form-group"> + +<!-- <div class="form-group"> <label class="col-sm-3 control-label">允许添加库存:</label> <div class="col-sm-8"> - <input id="allowAddNewInventory" name="allowAddNewInventory" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="allowAddNewInventory" name="allowAddNewInventory"> + <label class="onoffswitch-label" for="allowAddNewInventory"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> - </div> - <div class="form-group"> + </div>--> + +<!-- <div class="form-group"> <label class="col-sm-3 control-label">RF逐件盘点:</label> <div class="col-sm-8"> - <input id="countByPiece" name="countByPiece" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="countByPiece" name="countByPiece"> + <label class="onoffswitch-label" for="countByPiece"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> - </div> + </div>--> + <!--<div class="form-group"> <label class="col-sm-3 control-label">数据版本:</label> <div class="col-sm-8"> @@ -98,7 +129,6 @@ <div class="form-group"> <label class="col-sm-3 control-label">是否有效:</label> <div class="col-sm-8"> - <!--<input id="enable" name="enable" class="form-control" type="text">--> <div class="onoffswitch"> <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable"> <label class="onoffswitch-label" for="enable"> diff --git a/src/main/resources/templates/config/cycleCountPreference/cycleCountPreference.html b/src/main/resources/templates/config/cycleCountPreference/cycleCountPreference.html index f4b9817..146cf63 100644 --- a/src/main/resources/templates/config/cycleCountPreference/cycleCountPreference.html +++ b/src/main/resources/templates/config/cycleCountPreference/cycleCountPreference.html @@ -19,7 +19,7 @@ 提示物料:<input type="text" name="promptItem"/> </li> <li> - 提示LPN:<input type="text" name="promptLpn"/> + 提示容器:<input type="text" name="promptLpn"/> </li> <li> 更新人:<input type="text" name="lastUpdatedBy"/> @@ -34,8 +34,8 @@ <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/> </li> <li> + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('cycleCountPreference-form')"><i class="fa fa-refresh"></i> 清除选择</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> - <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('cycleCountPreference-form')"><i class="fa fa-refresh"></i> 重置</a> <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> </li> </ul> @@ -89,11 +89,11 @@ }, { field : 'promptLocation', - title : '系统提示货位', + title : '系统提示库位', }, { field : 'promptLpn', - title : '系统提示LPN' + title : '系统提示容器' }, { field : 'promptItem', @@ -105,7 +105,8 @@ }, { field : 'allowAddNewInventory', - title : '允许添加库存' + title : '允许添加库存', + visible : false }, { field : 'Enable', @@ -144,9 +145,9 @@ { field : 'countByPiece', title : 'RF逐件盘点' , - visible:true + visible : false }, - { + /*{ field : 'userDef1', title : '自定义字段1' , visible:false @@ -160,14 +161,14 @@ field : 'userDef3', title : '自定义字段3' , visible:false - }, + },*/ { title: '操作', align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('<a class="btn btn-success btn-xs " href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>修改</a> '); + //actions.push('<a class="btn btn-success btn-xs " href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>修改</a> '); actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>'); return actions.join(''); } diff --git a/src/main/resources/templates/config/material/material.html b/src/main/resources/templates/config/material/material.html index 0b48f64..ee1183b 100644 --- a/src/main/resources/templates/config/material/material.html +++ b/src/main/resources/templates/config/material/material.html @@ -162,7 +162,17 @@ }, { field : 'autoGenSerialNum', - title : '自动生成序列号' , + title : '自动生成序列号', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + if (value == 0){ + actions.push("<span class='badge badge-primary'>自动生成</span>"); + } else { + actions.push("<span class='badge badge-primary'>不自动生成</span>"); + } + return actions.join(''); + } }, { field : 'autoGenSerialNumFormat', diff --git a/src/main/resources/templates/inventory/adjustDetail/add.html b/src/main/resources/templates/inventory/adjustDetail/add.html index d5d3095..96d37e3 100644 --- a/src/main/resources/templates/inventory/adjustDetail/add.html +++ b/src/main/resources/templates/inventory/adjustDetail/add.html @@ -101,7 +101,7 @@ <input id="materialUnit" name="materialUnit" class="form-control" type="text"> </div> </div>--> - <div class="form-group"> + <!--<div class="form-group"> <label class="col-sm-3 control-label">调整类型:</label> <div class="col-sm-8"> <select id="problemType" name="problemType" class="form-control" @@ -109,9 +109,9 @@ <option th:each="dict : ${problemType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> </select> - <!--<input id="problemType" name="problemType" class="form-control" type="text" >--> + <!–<input id="problemType" name="problemType" class="form-control" type="text" >–> </div> - </div> + </div>--> <div class="form-group"> <label class="col-sm-3 control-label">属性号:</label> <div class="col-sm-8"> @@ -143,8 +143,8 @@ <label class="col-sm-3 control-label">调整前库存状态:</label> <div class="col-sm-8"> <select id="fromInventorySts" name="fromInventorySts" class="form-control" - th:with="fromInventorySts=${@dict.getType('inventoryStatus')}"> - <option th:each="dict : ${fromInventorySts}" th:text="${dict['dictLabel']}" + th:with="fromInventoryStatus=${@dict.getType('inventorySts')}"> + <option th:each="dict : ${fromInventoryStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> </select> </div> @@ -153,22 +153,12 @@ <label class="col-sm-3 control-label">调整后库存状态:</label> <div class="col-sm-8"> <select id="toInventorySts" name="toInventorySts" class="form-control" - th:with="toInventorySts=${@dict.getType('inventoryStatus')}"> - <option th:each="dict : ${toInventorySts}" th:text="${dict['dictLabel']}" + th:with="toInventoryStatus=${@dict.getType('inventorySts')}"> + <option th:each="dict : ${toInventoryStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> </select> </div> </div> - <!--<div class="form-group"> - <label class="col-sm-3 control-label">调整状态:</label> - <div class="col-sm-8"> - <select id="status" name="status" class="form-control" - th:with="status=${@dict.getType('inventoryStatus')}"> - <option th:each="dict : ${status}" th:text="${dict['dictLabel']}" - th:value="${dict['dictValue']}"></option> - </select> - </div> - </div>--> <div class="form-group"> <label class="col-sm-3 control-label">重量:</label> <div class="col-sm-8"> @@ -228,9 +218,6 @@ adjustCode: { required: true, }, - problemType: { - required: true, - }, materialCode: { required: true, }, diff --git a/src/main/resources/templates/inventory/adjustDetail/adjustDetail.html b/src/main/resources/templates/inventory/adjustDetail/adjustDetail.html index d7fb880..327eb53 100644 --- a/src/main/resources/templates/inventory/adjustDetail/adjustDetail.html +++ b/src/main/resources/templates/inventory/adjustDetail/adjustDetail.html @@ -420,7 +420,7 @@ $.modal.alertWarning("请至少选择一条记录"); return; } - $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!" + $.modal.confirm("注意:该操作将更改库存数量或属性,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!" , function() { var url = prefix + "/adjustEdit"; var data = { "ids": rows.join() }; diff --git a/src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html b/src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html index d57afe3..b2bda68 100644 --- a/src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html +++ b/src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html @@ -99,7 +99,7 @@ <div th:include="include :: footer"></div> <script th:inline="javascript"> var prefix = ctx + "inventory/inventoryDetail"; - var inventoryStatus = [[${@dict.getType('inventoryStatus')}]]; + var inventoryStatus = [[${@dict.getType('inventorySts')}]]; $(function () { update(); }); @@ -158,7 +158,15 @@ }, { field: 'qty', - title: '数量' + title: '库存数量' + }, + { + field: 'inventorySts', + title: '库存状态', + align: 'center', + formatter: function (value, row, index) { + return $.table.selectDictLabel(inventoryStatus, value); + } }, { field: 'taskQty', @@ -215,14 +223,6 @@ sortable: true, visible: false }, - { - field: 'inventorySts', - title: '库存状态', - align: 'center', - formatter: function (value, row, index) { - return $.table.selectDictLabel(inventoryStatus, value); - } - }, { field: 'referCode', diff --git a/src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html b/src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html index 8c83724..c35f1ef 100644 --- a/src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html +++ b/src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html @@ -94,7 +94,7 @@ <script th:inline="javascript"> var editFlag = [[${@permission.hasPermi('inventoryHeader:inventoryTransaction:edit')}]]; var prefix = ctx + "inventory/inventoryTransaction"; - var inventoryStatus=[[${@dict.getType('inventoryStatus')}]]; + var inventoryStatus=[[${@dict.getType('inventorySts')}]]; var inventoryTransactionType = [[${@dict.getType('inventoryTransactionType')}]]; $(function() { $("#bootstrap-table").bootstrapTable({ diff --git a/src/main/resources/templates/receipt/receiving/add.html b/src/main/resources/templates/receipt/receiving/add.html index bf1dd02..122b86b 100644 --- a/src/main/resources/templates/receipt/receiving/add.html +++ b/src/main/resources/templates/receipt/receiving/add.html @@ -140,6 +140,7 @@ $("input[name='openQty']").val(urlParms.openQty); $("input[name='inventorySts']").val(urlParms.inventorySts); $("input[name='materialUnit']").val(urlParms.materialUnit); + $("input[name='qty']").val(urlParms.totalQty-urlParms.openQty); $("input[name='qty']").focus(); diff --git a/src/main/resources/templates/task/taskHeader/taskHeader.html b/src/main/resources/templates/task/taskHeader/taskHeader.html index c7cc364..4a393ae 100644 --- a/src/main/resources/templates/task/taskHeader/taskHeader.html +++ b/src/main/resources/templates/task/taskHeader/taskHeader.html @@ -146,7 +146,7 @@ sortOrder: "desc", search: false, clickToSelect:true, - queryParams:"InternalTaskType="+[[${InternalTaskType}]], + queryParams: queryParams, columns: [{ checkbox: true }, @@ -491,6 +491,17 @@ $.modal.open("空托盘出库",prefix+"/emptyOut") } + function queryParams(params) { + return { + InternalTaskType: +[[${InternalTaskType}]], + // 传递参数查询参数 + pageSize: params.limit, + pageNum: params.offset / params.limit + 1, + searchValue: params.search, + orderByColumn: params.sort, + isAsc: params.order + }; + }; </script> </body> </html> \ No newline at end of file