Compare commits

...

10 Commits

25 changed files with 1061 additions and 61 deletions

View File

@ -6,7 +6,8 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:dm://172.16.99.19:5236/WMS_DJ?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:dm://30.30.2.24:5237/WMS_GJ?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# url: jdbc:dm://172.16.99.19:5236/WMS_DJ?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: SYSDBA
password: SYSDBA
# 从库数据源

View File

@ -19,7 +19,7 @@ ktg-mes:
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 8080
port: 8081
servlet:
# 应用的访问路径
context-path: /

View File

@ -0,0 +1,121 @@
<?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.ktg.mes.wm.mapper.WmsSupplierMapper">
<resultMap type="WmsSupplier" id="WmsSupplierResult">
<result property="id" column="ID" />
<result property="supplierName" column="SUPPLIER_NAME" />
<result property="supplierTypeName" column="SUPPLIER_TYPE_NAME" />
<result property="supplierTypeCode" column="SUPPLIER_TYPE_CODE" />
<result property="contactName" column="CONTACT_NAME" />
<result property="contactPhone" column="CONTACT_PHONE" />
<result property="contactEmail" column="CONTACT_EMAIL" />
<result property="contactAddress" column="CONTACT_ADDRESS" />
<result property="region" column="REGION" />
<result property="website" column="WEBSITE" />
<result property="createBy" column="CREATE_BY" />
<result property="createTime" column="CREATE_TIME" />
<result property="updateBy" column="UPDATE_BY" />
<result property="updateTime" column="UPDATE_TIME" />
<result property="isDelete" column="IS_DELETE" />
</resultMap>
<sql id="selectWmsSupplierVo">
select ID, SUPPLIER_NAME, SUPPLIER_TYPE_NAME, SUPPLIER_TYPE_CODE, CONTACT_NAME, CONTACT_PHONE, CONTACT_EMAIL, CONTACT_ADDRESS, REGION, WEBSITE, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, IS_DELETE from WMS_SUPPLIER
</sql>
<select id="selectWmsSupplierList" parameterType="WmsSupplier" resultMap="WmsSupplierResult">
<include refid="selectWmsSupplierVo"/>
<where>
<if test="supplierName != null and supplierName != ''"> and SUPPLIER_NAME like concat('%', #{supplierName}, '%')</if>
<if test="supplierTypeName != null and supplierTypeName != ''"> and SUPPLIER_TYPE_NAME like concat('%', #{supplierTypeName}, '%')</if>
<if test="supplierTypeCode != null and supplierTypeCode != ''"> and SUPPLIER_TYPE_CODE = #{supplierTypeCode}</if>
<if test="contactName != null and contactName != ''"> and CONTACT_NAME like concat('%', #{contactName}, '%')</if>
<if test="contactPhone != null and contactPhone != ''"> and CONTACT_PHONE = #{contactPhone}</if>
<if test="contactEmail != null and contactEmail != ''"> and CONTACT_EMAIL = #{contactEmail}</if>
<if test="contactAddress != null and contactAddress != ''"> and CONTACT_ADDRESS = #{contactAddress}</if>
<if test="region != null and region != ''"> and REGION = #{region}</if>
<if test="website != null and website != ''"> and WEBSITE = #{website}</if>
<if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
<if test="createTime != null and createTime != ''"> and CREATE_TIME = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
<if test="updateTime != null and updateTime != ''"> and UPDATE_TIME = #{updateTime}</if>
<if test="isDelete != null and isDelete != ''"> and IS_DELETE = #{isDelete}</if>
</where>
</select>
<select id="selectWmsSupplierById" parameterType="Long" resultMap="WmsSupplierResult">
<include refid="selectWmsSupplierVo"/>
where ID = #{id}
</select>
<insert id="insertWmsSupplier" parameterType="WmsSupplier" useGeneratedKeys="true" keyProperty="id">
insert into WMS_SUPPLIER
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="supplierName != null">SUPPLIER_NAME,</if>
<if test="supplierTypeName != null">SUPPLIER_TYPE_NAME,</if>
<if test="supplierTypeCode != null">SUPPLIER_TYPE_CODE,</if>
<if test="contactName != null">CONTACT_NAME,</if>
<if test="contactPhone != null">CONTACT_PHONE,</if>
<if test="contactEmail != null">CONTACT_EMAIL,</if>
<if test="contactAddress != null">CONTACT_ADDRESS,</if>
<if test="region != null">REGION,</if>
<if test="website != null">WEBSITE,</if>
<if test="createBy != null">CREATE_BY,</if>
<if test="createTime != null">CREATE_TIME,</if>
<if test="updateBy != null">UPDATE_BY,</if>
<if test="updateTime != null">UPDATE_TIME,</if>
<if test="isDelete != null">IS_DELETE,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="supplierName != null">#{supplierName},</if>
<if test="supplierTypeName != null">#{supplierTypeName},</if>
<if test="supplierTypeCode != null">#{supplierTypeCode},</if>
<if test="contactName != null">#{contactName},</if>
<if test="contactPhone != null">#{contactPhone},</if>
<if test="contactEmail != null">#{contactEmail},</if>
<if test="contactAddress != null">#{contactAddress},</if>
<if test="region != null">#{region},</if>
<if test="website != null">#{website},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDelete != null">#{isDelete},</if>
</trim>
</insert>
<update id="updateWmsSupplier" parameterType="WmsSupplier">
update WMS_SUPPLIER
<trim prefix="SET" suffixOverrides=",">
<if test="supplierName != null">SUPPLIER_NAME = #{supplierName},</if>
<if test="supplierTypeName != null">SUPPLIER_TYPE_NAME = #{supplierTypeName},</if>
<if test="supplierTypeCode != null">SUPPLIER_TYPE_CODE = #{supplierTypeCode},</if>
<if test="contactName != null">CONTACT_NAME = #{contactName},</if>
<if test="contactPhone != null">CONTACT_PHONE = #{contactPhone},</if>
<if test="contactEmail != null">CONTACT_EMAIL = #{contactEmail},</if>
<if test="contactAddress != null">CONTACT_ADDRESS = #{contactAddress},</if>
<if test="region != null">REGION = #{region},</if>
<if test="website != null">WEBSITE = #{website},</if>
<if test="createBy != null">CREATE_BY = #{createBy},</if>
<if test="createTime != null">CREATE_TIME = #{createTime},</if>
<if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
<if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
<if test="isDelete != null">IS_DELETE = #{isDelete},</if>
</trim>
where ID = #{id}
</update>
<delete id="deleteWmsSupplierById" parameterType="Long">
delete from WMS_SUPPLIER where ID = #{id}
</delete>
<delete id="deleteWmsSupplierByIds" parameterType="String">
delete from WMS_SUPPLIER where ID in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -321,13 +321,13 @@ public class BaseKnifeController extends BaseController {
return AjaxResult.error("该计划单已存在,请更换重试");
// 齐套性检查
AjaxResult ajaxResult = this.checkForAlignment(productionArrangements.getProcessCodeList());
AjaxResult ajaxResult = this.checkForAlignment(productionArrangements.getProcessCodes());
if (Integer.parseInt(String.valueOf(ajaxResult.get("code"))) != 200) {
return AjaxResult.error(ajaxResult.get("msg").toString(), ajaxResult.get("data"));
}
// 验证bom工艺
List<BaseTechnologyBom> technologyBomList = baseTechnologyBomService.selectBaseTechnologyBomListByProcessCodeList(productionArrangements.getProcessCodeList());
List<BaseTechnologyBom> technologyBomList = baseTechnologyBomService.selectBaseTechnologyBomListByProcessCodeList(productionArrangements.getProcessCodes());
if (technologyBomList.isEmpty() || technologyBomList.size() == 1 && technologyBomList.get(0).getKnifeCode() == null)
return AjaxResult.error("未检测到工艺bom项");
@ -337,7 +337,7 @@ public class BaseKnifeController extends BaseController {
// 参数列表
Map<String, Object> params = new HashMap<>();
params.put("planCode", productionArrangements.getPlanSheet());
params.put("processCodeList", productionArrangements.getProcessCodeList());
params.put("processCodeList", productionArrangements.getProcessCodes());
params.put("processUnit", productionArrangements.getProcessUnit());
// 构建日志
@ -579,7 +579,7 @@ public class BaseKnifeController extends BaseController {
}
// 添加生产准备记录
productionArrangements.setProcessCode(productionArrangements.getProcessCodeList().toString());
productionArrangements.setProcessCode(productionArrangements.getProcessCodes().toString());
productionArrangements.setProcessUnit(productionArrangements.getProcessUnit());
productionArrangements.setStatus(0);
productionArrangements.setCreateTime(DateUtils.getNowDate());
@ -994,7 +994,7 @@ public class BaseKnifeController extends BaseController {
// 验证失败的rfid
ArrayList<String> errorList = new ArrayList<>();
for (String s : split) {
if (baseKnifeService.isDuplicateRfid(rfid)) {
if (baseKnifeService.isDuplicateRfid(s)) {
errorList.add(s);
}
}

View File

@ -12,10 +12,7 @@ import com.ktg.mes.md.domain.*;
import com.ktg.mes.md.mapper.WmsOutPlanDetailEntityMapper;
import com.ktg.mes.md.mapper.WmsOutPlanMapper;
import com.ktg.mes.md.mapper.WmsOutTaskMapper;
import com.ktg.mes.md.service.IBaseKnifeService;
import com.ktg.mes.md.service.IBaseTechnologyBomService;
import com.ktg.mes.md.service.IBomRouteService;
import com.ktg.mes.md.service.IMdItemService;
import com.ktg.mes.md.service.*;
import com.ktg.mes.wm.domain.*;
import com.ktg.mes.wm.service.IWmStorageAreaService;
import com.ktg.mes.wm.service.IWmsInPlanService;
@ -46,6 +43,9 @@ public class InventoryBatchController extends BaseController
@Autowired
private IBaseKnifeService baseKnifeService;
@Autowired
private IInventoryBatchService inventoryBatchService;
@Autowired
private IMdItemService mdItemService;
@ -78,25 +78,7 @@ public class InventoryBatchController extends BaseController
public TableDataInfo list(InventoryBatch inventoryBatch) {
startPage();
List<InventoryBatch> result = new ArrayList<>();
WmsOutTask wmsOutTaskWrapper = new WmsOutTask();
wmsOutTaskWrapper.setBatchNum(inventoryBatch.getBatchNum());
wmsOutTaskWrapper.setMdItemCode(inventoryBatch.getMdItemCode());
List<WmsOutTask> outTaskList = wmsOutTaskMapper.selectWmsOutTaskList(wmsOutTaskWrapper);
outTaskList.forEach(outTask -> {
InventoryBatch inventoryBatchOut = new InventoryBatch();
inventoryBatchOut.setId(outTask.getWmsOutTaskId());
inventoryBatchOut.setBatchNum(outTask.getBatchNum());
inventoryBatchOut.setMdItemCode(outTask.getMdItemCode());
inventoryBatchOut.setMdItemName(outTask.getMdItemName());
inventoryBatchOut.setMdItemUnit(outTask.getMdItemUnit());
inventoryBatchOut.setMdItemNum(outTask.getTaskNumber());
inventoryBatchOut.setInOrOut(0);
inventoryBatchOut.setDateTime(outTask.getCreateTime());
inventoryBatchOut.setStatus(outTask.getTaskState());
result.add(inventoryBatchOut);
});
List<InventoryBatch> result = inventoryBatchService.selectInventoryBatchList(inventoryBatch);
return getDataTable(result);
}

View File

@ -31,12 +31,12 @@ public class WmsOutTaskController extends BaseController {
/**
* 查询出库任务列表
* 开放 查询出库任务列表
*/
@GetMapping("/open/incompleteList/{planSheet}")
public TableDataInfo openList(@PathVariable String planSheet) {
@GetMapping("/open/list")
public TableDataInfo openList(WmsOutTask wmsOutTask) {
startPage();
List<WmsOutTask> list = wmsOutTaskService.selectWmsOutTaskIncompleteList(planSheet);
List<WmsOutTask> list = wmsOutTaskService.selectWmsOutTaskList(wmsOutTask);
return getDataTable(list);
}

View File

@ -117,6 +117,12 @@ public class WmsOutPlanDetailEntity extends BaseEntity {
@Excel(name = "是否对刀")
private Integer isToolSetting;
/**
* 对刀参数
*/
@Excel(name = "对刀参数")
private String toolSettingParam;
public void setWmsOutPlanDetailEntityId(Long wmsOutPlanDetailEntityId) {
this.wmsOutPlanDetailEntityId = wmsOutPlanDetailEntityId;
}
@ -261,6 +267,14 @@ public class WmsOutPlanDetailEntity extends BaseEntity {
this.isToolSetting = isToolSetting;
}
public String getToolSettingParam() {
return toolSettingParam;
}
public void setToolSettingParam(String toolSettingParam) {
this.toolSettingParam = toolSettingParam;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

View File

@ -0,0 +1,73 @@
package com.ktg.mes.md.service;
import com.ktg.mes.md.domain.BaseKnife;
import com.ktg.mes.md.domain.InventoryBatch;
import java.util.List;
/**
* 工具台账Service接口
*
* @author yinjinlu
* @date 2024-10-31
*/
public interface IInventoryBatchService
{
/**
* 查询工具台账
*
* @param baseKnifeId 工具台账主键
* @return 工具台账
*/
public BaseKnife selectBaseKnifeByBaseKnifeId(Long baseKnifeId);
/**
* 查询库存批次列表
*
* @param inventoryBatch 库存批次
* @return 库存批次集合
*/
public List<InventoryBatch> selectInventoryBatchList(InventoryBatch inventoryBatch);
/**
* 新增工具台账
*
* @param baseKnife 工具台账
* @return 结果
*/
public int insertBaseKnife(BaseKnife baseKnife);
/**
* 修改工具台账
*
* @param baseKnife 工具台账
* @return 结果
*/
public int updateBaseKnife(BaseKnife baseKnife);
/**
* 批量删除工具台账
*
* @param baseKnifeIds 需要删除的工具台账主键集合
* @return 结果
*/
public int deleteBaseKnifeByBaseKnifeIds(Long[] baseKnifeIds);
/**
* 删除工具台账信息
*
* @param baseKnifeId 工具台账主键
* @return 结果
*/
public int deleteBaseKnifeByBaseKnifeId(Long baseKnifeId);
public int resetBaseKnifeByBaseKnifeId(Long baseKnifeId);
/**
* 查询台账RFID是否重复
*
* @param rfid rfid
* @return 结果
*/
public Boolean isDuplicateRfid(String rfid);
}

View File

@ -110,7 +110,8 @@ public class BaseKnifeServiceImpl implements IBaseKnifeService {
hashMap.put("wmStorageAreaCode", wmsOutPlanDetail.getWmStorageAreaCode()); // 库位编码
hashMap.put("wmStorageAreaName", wmsOutPlanDetail.getWmStorageAreaName()); // 库位名称
hashMap.put("detailStatus", wmsOutPlanDetail.getDetailState()); // 明细状态
hashMap.put("isToolSetting", nowWmsOutPlanDetailEntity.getIsToolSetting()); // 明细状态
hashMap.put("isToolSetting", nowWmsOutPlanDetailEntity.getIsToolSetting()); // 是否对刀
hashMap.put("toolSettingParam", nowWmsOutPlanDetailEntity.getToolSettingParam()); // 对刀参数
/* 实体 */
String outTime = null;
if (nowWmsOutPlanDetailEntity.getCreateTime() != null)

View File

@ -0,0 +1,184 @@
package com.ktg.mes.md.service.impl;
import com.ktg.common.utils.DateUtils;
import com.ktg.mes.md.domain.*;
import com.ktg.mes.md.mapper.*;
import com.ktg.mes.md.service.IInventoryBatchService;
import com.ktg.mes.wm.domain.WmsInPlanDetailEntity;
import com.ktg.mes.wm.domain.WmsInTask;
import com.ktg.mes.wm.mapper.WmsInPlanDetailEntityMapper;
import com.ktg.mes.wm.mapper.WmsInTaskMapper;
import com.ktg.mes.wm.service.impl.WmsInPlanDetailEntityServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import static org.apache.commons.lang3.SystemUtils.getUserName;
/**
* 库存批次Service业务层处理
*
* @author yinjinlu
* @date 2024-10-31
*/
@Service
public class InventoryBatchServiceImpl implements IInventoryBatchService {
@Autowired
private BaseKnifeMapper baseKnifeMapper;
@Autowired
private WmsOutPlanMapper wmsOutPlanMapper;
@Autowired
private WmsOutPlanDetailEntityMapper wmsOutPlanDetailEntityMapper;
@Autowired
private WmsOutTaskMapper wmsOutTaskMapper;
@Autowired
private WmsInTaskMapper wmsInTaskMapper;
@Autowired
private WmsBusinessTypeMapper wmsBusinessTypeMapper;
@Autowired
private WmsInPlanDetailEntityMapper wmsInPlanDetailEntityMapper;
/**
* 查询工具台账
*
* @param baseKnifeId 工具台账主键
* @return 工具台账
*/
@Override
public BaseKnife selectBaseKnifeByBaseKnifeId(Long baseKnifeId) {
BaseKnife baseKnife = baseKnifeMapper.selectBaseKnifeByBaseKnifeId(baseKnifeId);
// 查询基础物料
if ("PRODUCT".equals(baseKnife.getItemOrProduct())) {
BaseKnife baseKnifeWrapper = new BaseKnife();
baseKnifeWrapper.setParentId(baseKnife.getBaseKnifeId());
baseKnife.setBaseKnifeList(baseKnifeMapper.selectBaseKnifeList(baseKnifeWrapper));
}
return baseKnife;
}
@Override
public List<InventoryBatch> selectInventoryBatchList(InventoryBatch inventoryBatch) {
List<InventoryBatch> result = new ArrayList<>();
WmsOutTask wmsOutTaskWrapper = new WmsOutTask();
wmsOutTaskWrapper.setBatchNum(inventoryBatch.getBatchNum());
wmsOutTaskWrapper.setMdItemCode(inventoryBatch.getMdItemCode());
List<WmsOutTask> outTaskList = wmsOutTaskMapper.selectWmsOutTaskList(wmsOutTaskWrapper);
outTaskList.forEach(outTask -> {
InventoryBatch inventoryBatchOut = new InventoryBatch();
inventoryBatchOut.setId(outTask.getWmsOutTaskId());
inventoryBatchOut.setBatchNum(outTask.getBatchNum());
inventoryBatchOut.setMdItemCode(outTask.getMdItemCode());
inventoryBatchOut.setMdItemName(outTask.getMdItemName());
inventoryBatchOut.setMdItemUnit(outTask.getMdItemUnit());
inventoryBatchOut.setMdItemNum(outTask.getTaskNumber());
inventoryBatchOut.setInOrOut(0);
inventoryBatchOut.setDateTime(outTask.getCreateTime());
inventoryBatchOut.setStatus(outTask.getTaskState());
result.add(inventoryBatchOut);
});
// 构建入库信息
WmsInTask wmsINTaskWrapper = new WmsInTask();
wmsINTaskWrapper.setBatch(inventoryBatch.getBatchNum());
wmsINTaskWrapper.setMaterialCode(inventoryBatch.getMdItemCode());
List<WmsInTask> inTaskList = wmsInTaskMapper.selectWmsInTaskList(wmsINTaskWrapper);
inTaskList.forEach(inTask -> {
InventoryBatch inventoryBatchIn = new InventoryBatch();
inventoryBatchIn.setId(inTask.getId());
inventoryBatchIn.setBatchNum(inTask.getBatch());
inventoryBatchIn.setMdItemCode(inTask.getMaterialCode());
inventoryBatchIn.setMdItemName(inTask.getMaterialName());
inventoryBatchIn.setMdItemUnit(inTask.getMaterialUnit());
inventoryBatchIn.setMdItemNum(inTask.getActualInQuantity());
inventoryBatchIn.setInOrOut(1);
inventoryBatchIn.setDateTime(inTask.getCreateTime());
inventoryBatchIn.setStatus("1");
result.add(inventoryBatchIn);
});
return result;
}
/**
* 新增工具台账
*
* @param baseKnife 工具台账
* @return 结果
*/
@Transactional
@Override
public int insertBaseKnife(BaseKnife baseKnife) {
baseKnife.setCreateTime(DateUtils.getNowDate());
baseKnife.setCreateBy(getUserName());
int rows = baseKnifeMapper.insertBaseKnife(baseKnife);
return rows;
}
/**
* 修改工具台账
*
* @param baseKnife 工具台账
* @return 结果
*/
@Transactional
@Override
public int updateBaseKnife(BaseKnife baseKnife) {
baseKnife.setUpdateTime(DateUtils.getNowDate());
baseKnife.setUpdateBy(getUserName());
return baseKnifeMapper.updateBaseKnife(baseKnife);
}
/**
* 批量删除工具台账
*
* @param baseKnifeIds 需要删除的工具台账主键
* @return 结果
*/
@Transactional
@Override
public int deleteBaseKnifeByBaseKnifeIds(Long[] baseKnifeIds) {
return baseKnifeMapper.deleteBaseKnifeByBaseKnifeIds(baseKnifeIds);
}
/**
* 删除工具台账信息
*
* @param baseKnifeId 工具台账主键
* @return 结果
*/
@Transactional
@Override
public int deleteBaseKnifeByBaseKnifeId(Long baseKnifeId) {
return baseKnifeMapper.deleteBaseKnifeByBaseKnifeId(baseKnifeId);
}
@Override
public int resetBaseKnifeByBaseKnifeId(Long baseKnifeId) {
return baseKnifeMapper.resetBaseKnife(baseKnifeId);
}
/**
* 查询台账RFID是否重复
*
* @param rfid rfid
* @return 结果
*/
public Boolean isDuplicateRfid(String rfid){
return baseKnifeMapper.isDuplicateRfid(rfid);
}
}

View File

@ -5,6 +5,7 @@ import com.ktg.common.core.controller.BaseController;
import com.ktg.common.core.domain.AjaxResult;
import com.ktg.common.core.page.TableDataInfo;
import com.ktg.common.enums.BusinessType;
import com.ktg.common.utils.StringUtils;
import com.ktg.common.utils.poi.ExcelUtil;
import com.ktg.mes.md.domain.BaseKnife;
import com.ktg.mes.md.domain.MdItem;
@ -23,6 +24,8 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Stream;
/**
* 入库任务Controller
@ -55,6 +58,16 @@ public class WmsInTaskController extends BaseController {
return getDataTable(list);
}
/**
* 查询入库任务列表
*/
@GetMapping("/open/list")
public TableDataInfo openList(WmsInTask wmsInTask) {
startPage();
List<WmsInTask> list = wmsInTaskService.selectWmsInTaskList(wmsInTask);
return getDataTable(list);
}
/**
* 导出入库任务列表
*/
@ -130,8 +143,8 @@ public class WmsInTaskController extends BaseController {
wmsInPlanDetailEntity.setPlanDetailsId(wmsInTask.getDetailInId());
List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList = wmsInPlanDetailEntityService.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntity);
// 入库类型为整刀回库 拆刀回库
if (Objects.equals(wmsInTask.getPlanTypeId(), "9") || Objects.equals(wmsInTask.getPlanTypeId(), "15")) {
// 入库类型为整刀回库
if (Objects.equals(wmsInTask.getPlanTypeId(), "9")) {
wmsInPlanDetailEntityList.forEach(planDetailEntity -> {
BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId());
// 计算消耗寿命
@ -144,12 +157,29 @@ public class WmsInTaskController extends BaseController {
baseKnife.setIsLocked(0);
// 设置工具状态 已入库
baseKnife.setKnifeFineState(1);
if (!planDetailEntity.getRfid().isEmpty()) {
if (StringUtils.isNotEmpty(planDetailEntity.getRfid())) {
baseKnife.setRfid(planDetailEntity.getRfid());
}
// 更新台账状态
baseKnifeService.updateBaseKnife(baseKnife);
});
} else if (Objects.equals(wmsInTask.getPlanTypeId(), "15")) {
// 拆刀回库
wmsInPlanDetailEntityList.forEach(planDetailEntity -> {
BaseKnife baseKnife = baseKnifeService.selectBaseKnifeByBaseKnifeId(planDetailEntity.getKnifeId());
// 设置工具状态 已拆刀
baseKnife.setKnifeFineState(4);
// 更新整刀台账状态
baseKnifeService.updateBaseKnife(baseKnife);
// 查询刀柄
Optional<BaseKnife> bladeOpt = baseKnife.getBaseKnifeList().stream().filter(item -> item.getItemOrProduct().equals("ITEM")).findFirst();
if (bladeOpt.isPresent()) {
// 设置状态为 解锁
bladeOpt.get().setIsLocked(0);
bladeOpt.get().setKnifeFineState(1);
baseKnifeService.updateBaseKnife(bladeOpt.get());
}
});
} else if (Objects.equals(wmsInTask.getPlanTypeId(), "7")) {
// 入库类型为刀柄入库
wmsInPlanDetailEntityList.forEach(planDetailEntity -> {

View File

@ -0,0 +1,104 @@
package com.ktg.mes.wm.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ktg.common.annotation.Log;
import com.ktg.common.core.controller.BaseController;
import com.ktg.common.core.domain.AjaxResult;
import com.ktg.common.enums.BusinessType;
import com.ktg.mes.wm.domain.WmsSupplier;
import com.ktg.mes.wm.service.IWmsSupplierService;
import com.ktg.common.utils.poi.ExcelUtil;
import com.ktg.common.core.page.TableDataInfo;
/**
* 供应商基础信息Controller
*
* @author yinjinlu
* @date 2024-11-20
*/
@RestController
@RequestMapping("/wm/wmsSupplier")
public class WmsSupplierController extends BaseController
{
@Autowired
private IWmsSupplierService wmsSupplierService;
/**
* 查询供应商基础信息列表
*/
@PreAuthorize("@ss.hasPermi('wm:wmsSupplier:list')")
@GetMapping("/list")
public TableDataInfo list(WmsSupplier wmsSupplier)
{
startPage();
List<WmsSupplier> list = wmsSupplierService.selectWmsSupplierList(wmsSupplier);
return getDataTable(list);
}
/**
* 导出供应商基础信息列表
*/
@PreAuthorize("@ss.hasPermi('wm:wmsSupplier:export')")
@Log(title = "供应商基础信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, WmsSupplier wmsSupplier)
{
List<WmsSupplier> list = wmsSupplierService.selectWmsSupplierList(wmsSupplier);
ExcelUtil<WmsSupplier> util = new ExcelUtil<WmsSupplier>(WmsSupplier.class);
util.exportExcel(response, list, "供应商基础信息数据");
}
/**
* 获取供应商基础信息详细信息
*/
@PreAuthorize("@ss.hasPermi('wm:wmsSupplier:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(wmsSupplierService.selectWmsSupplierById(id));
}
/**
* 新增供应商基础信息
*/
@PreAuthorize("@ss.hasPermi('wm:wmsSupplier:add')")
@Log(title = "供应商基础信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WmsSupplier wmsSupplier)
{
return toAjax(wmsSupplierService.insertWmsSupplier(wmsSupplier));
}
/**
* 修改供应商基础信息
*/
@PreAuthorize("@ss.hasPermi('wm:wmsSupplier:edit')")
@Log(title = "供应商基础信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WmsSupplier wmsSupplier)
{
return toAjax(wmsSupplierService.updateWmsSupplier(wmsSupplier));
}
/**
* 删除供应商基础信息
*/
@PreAuthorize("@ss.hasPermi('wm:wmsSupplier:remove')")
@Log(title = "供应商基础信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(wmsSupplierService.deleteWmsSupplierByIds(ids));
}
}

View File

@ -29,7 +29,7 @@ public class ProductionArrangements extends BaseEntity
private String processCode;
@Excel(name = "工序号")
private List<String> processCodeList;
private List<String> processCodes;
@Excel(name = "工序号")
private String processUnit;
@ -94,12 +94,12 @@ public class ProductionArrangements extends BaseEntity
this.processUnit = processUnit;
}
public List<String> getProcessCodeList() {
return processCodeList;
public List<String> getProcessCodes() {
return processCodes;
}
public void setProcessCodeList(List<String> processCodeList) {
this.processCodeList = processCodeList;
public void setProcessCodes(List<String> processCodes) {
this.processCodes = processCodes;
}
public Integer getStatus()
@ -149,7 +149,7 @@ public class ProductionArrangements extends BaseEntity
"productionArrangementsId='" + productionArrangementsId + '\'' +
", planSheet='" + planSheet + '\'' +
", processCode='" + processCode + '\'' +
", processCodeList=" + processCodeList +
", processCodes=" + processCodes +
", processUnit='" + processUnit + '\'' +
", status=" + status +
", attr1='" + attr1 + '\'' +

View File

@ -72,6 +72,9 @@ public class WmsInPlanDetailEntity extends BaseEntity {
* 库位名称
*/
private String cellName;
private String cellX;
private String cellY;
private String cellZ;
/**
* 明细批次
*/
@ -186,6 +189,30 @@ public class WmsInPlanDetailEntity extends BaseEntity {
this.cellName = cellName;
}
public String getCellX() {
return cellX;
}
public void setCellX(String cellX) {
this.cellX = cellX;
}
public String getCellY() {
return cellY;
}
public void setCellY(String cellY) {
this.cellY = cellY;
}
public String getCellZ() {
return cellZ;
}
public void setCellZ(String cellZ) {
this.cellZ = cellZ;
}
public String getDetailBatch() {
return detailBatch;
}
@ -237,6 +264,9 @@ public class WmsInPlanDetailEntity extends BaseEntity {
.append("planType", getPlanType())
.append("cellCode", getCellCode())
.append("cellName", getCellName())
.append("cellX", getCellX())
.append("cellY", getCellY())
.append("cellZ", getCellZ())
.append("warehouseName", getWarehouseName())
.append("warehouseCode", getWarehouseCode())
.append("warehouseTypeName", getWarehouseTypeName())

View File

@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.ktg.common.annotation.Excel;
import com.ktg.common.core.domain.BaseEntity;
import java.util.List;
/**
* 入库任务对象 WMS_IN_TASK
*
@ -118,12 +120,19 @@ public class WmsInTask extends BaseEntity {
*/
private String materialName;
/**
* 物料单位
*/
private String materialUnit;
/**
* 入库明细ID
*/
@Excel(name = "入库明细ID")
private Long detailInId;
private List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList;
public void setId(Long id) {
this.id = id;
}
@ -276,6 +285,22 @@ public class WmsInTask extends BaseEntity {
this.materialName = materialName;
}
public String getMaterialUnit() {
return materialUnit;
}
public void setMaterialUnit(String materialUnit) {
this.materialUnit = materialUnit;
}
public List<WmsInPlanDetailEntity> getWmsInPlanDetailEntityList() {
return wmsInPlanDetailEntityList;
}
public void setWmsInPlanDetailEntityList(List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList) {
this.wmsInPlanDetailEntityList = wmsInPlanDetailEntityList;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@ -303,6 +328,7 @@ public class WmsInTask extends BaseEntity {
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())
.append("detailInId", getDetailInId())
.append("wmsInPlanDetailEntityList", getWmsInPlanDetailEntityList())
.toString();
}
}

View File

@ -0,0 +1,181 @@
package com.ktg.mes.wm.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ktg.common.annotation.Excel;
import com.ktg.common.core.domain.BaseEntity;
/**
* 供应商基础信息对象 WMS_SUPPLIER
*
* @author yinjinlu
* @date 2024-11-20
*/
public class WmsSupplier extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String supplierName;
/** 供应商类型名称 */
@Excel(name = "供应商类型名称")
private String supplierTypeName;
/** 供应商类型编码 */
@Excel(name = "供应商类型编码")
private String supplierTypeCode;
/** 主要联系人姓名 */
@Excel(name = "主要联系人姓名")
private String contactName;
/** 联系人电话 */
@Excel(name = "联系人电话")
private String contactPhone;
/** 联系人电子邮箱 */
@Excel(name = "联系人电子邮箱")
private String contactEmail;
/** 联系地址 */
@Excel(name = "联系地址")
private String contactAddress;
/** 供应商所在地理位置/地区 */
@Excel(name = "供应商所在地理位置/地区")
private String region;
/** 供应商公司官网 */
@Excel(name = "供应商公司官网")
private String website;
/** $column.columnComment */
@Excel(name = "供应商公司官网")
private String isDelete;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setSupplierName(String supplierName)
{
this.supplierName = supplierName;
}
public String getSupplierName()
{
return supplierName;
}
public void setSupplierTypeName(String supplierTypeName)
{
this.supplierTypeName = supplierTypeName;
}
public String getSupplierTypeName()
{
return supplierTypeName;
}
public void setSupplierTypeCode(String supplierTypeCode)
{
this.supplierTypeCode = supplierTypeCode;
}
public String getSupplierTypeCode()
{
return supplierTypeCode;
}
public void setContactName(String contactName)
{
this.contactName = contactName;
}
public String getContactName()
{
return contactName;
}
public void setContactPhone(String contactPhone)
{
this.contactPhone = contactPhone;
}
public String getContactPhone()
{
return contactPhone;
}
public void setContactEmail(String contactEmail)
{
this.contactEmail = contactEmail;
}
public String getContactEmail()
{
return contactEmail;
}
public void setContactAddress(String contactAddress)
{
this.contactAddress = contactAddress;
}
public String getContactAddress()
{
return contactAddress;
}
public void setRegion(String region)
{
this.region = region;
}
public String getRegion()
{
return region;
}
public void setWebsite(String website)
{
this.website = website;
}
public String getWebsite()
{
return website;
}
public void setIsDelete(String isDelete)
{
this.isDelete = isDelete;
}
public String getIsDelete()
{
return isDelete;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("supplierName", getSupplierName())
.append("supplierTypeName", getSupplierTypeName())
.append("supplierTypeCode", getSupplierTypeCode())
.append("contactName", getContactName())
.append("contactPhone", getContactPhone())
.append("contactEmail", getContactEmail())
.append("contactAddress", getContactAddress())
.append("region", getRegion())
.append("website", getWebsite())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDelete", getIsDelete())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ktg.mes.wm.mapper;
import java.util.List;
import com.ktg.mes.wm.domain.WmsSupplier;
/**
* 供应商基础信息Mapper接口
*
* @author yinjinlu
* @date 2024-11-20
*/
public interface WmsSupplierMapper
{
/**
* 查询供应商基础信息
*
* @param id 供应商基础信息主键
* @return 供应商基础信息
*/
public WmsSupplier selectWmsSupplierById(Long id);
/**
* 查询供应商基础信息列表
*
* @param wmsSupplier 供应商基础信息
* @return 供应商基础信息集合
*/
public List<WmsSupplier> selectWmsSupplierList(WmsSupplier wmsSupplier);
/**
* 新增供应商基础信息
*
* @param wmsSupplier 供应商基础信息
* @return 结果
*/
public int insertWmsSupplier(WmsSupplier wmsSupplier);
/**
* 修改供应商基础信息
*
* @param wmsSupplier 供应商基础信息
* @return 结果
*/
public int updateWmsSupplier(WmsSupplier wmsSupplier);
/**
* 删除供应商基础信息
*
* @param id 供应商基础信息主键
* @return 结果
*/
public int deleteWmsSupplierById(Long id);
/**
* 批量删除供应商基础信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteWmsSupplierByIds(Long[] ids);
}

View File

@ -5,15 +5,15 @@ import com.ktg.mes.wm.domain.WmsInTask;
/**
* 入库任务Service接口
*
*
* @author yinjinlu
* @date 2024-11-01
*/
public interface IWmsInTaskService
public interface IWmsInTaskService
{
/**
* 查询入库任务
*
*
* @param id 入库任务主键
* @return 入库任务
*/
@ -21,7 +21,7 @@ public interface IWmsInTaskService
/**
* 查询入库任务列表
*
*
* @param wmsInTask 入库任务
* @return 入库任务集合
*/
@ -29,7 +29,7 @@ public interface IWmsInTaskService
/**
* 新增入库任务
*
*
* @param wmsInTask 入库任务
* @return 结果
*/
@ -37,7 +37,7 @@ public interface IWmsInTaskService
/**
* 修改入库任务
*
*
* @param wmsInTask 入库任务
* @return 结果
*/
@ -45,7 +45,7 @@ public interface IWmsInTaskService
/**
* 批量删除入库任务
*
*
* @param ids 需要删除的入库任务主键集合
* @return 结果
*/
@ -53,7 +53,7 @@ public interface IWmsInTaskService
/**
* 删除入库任务信息
*
*
* @param id 入库任务主键
* @return 结果
*/

View File

@ -0,0 +1,61 @@
package com.ktg.mes.wm.service;
import java.util.List;
import com.ktg.mes.wm.domain.WmsSupplier;
/**
* 供应商基础信息Service接口
*
* @author yinjinlu
* @date 2024-11-20
*/
public interface IWmsSupplierService
{
/**
* 查询供应商基础信息
*
* @param id 供应商基础信息主键
* @return 供应商基础信息
*/
public WmsSupplier selectWmsSupplierById(Long id);
/**
* 查询供应商基础信息列表
*
* @param wmsSupplier 供应商基础信息
* @return 供应商基础信息集合
*/
public List<WmsSupplier> selectWmsSupplierList(WmsSupplier wmsSupplier);
/**
* 新增供应商基础信息
*
* @param wmsSupplier 供应商基础信息
* @return 结果
*/
public int insertWmsSupplier(WmsSupplier wmsSupplier);
/**
* 修改供应商基础信息
*
* @param wmsSupplier 供应商基础信息
* @return 结果
*/
public int updateWmsSupplier(WmsSupplier wmsSupplier);
/**
* 批量删除供应商基础信息
*
* @param ids 需要删除的供应商基础信息主键集合
* @return 结果
*/
public int deleteWmsSupplierByIds(Long[] ids);
/**
* 删除供应商基础信息信息
*
* @param id 供应商基础信息主键
* @return 结果
*/
public int deleteWmsSupplierById(Long id);
}

View File

@ -79,6 +79,9 @@ public class WmsInPlanDetailEntityServiceImpl implements IWmsInPlanDetailEntityS
// 设置库位信息
entity.setCellCode(wmStorageArea.getAreaCode());
entity.setCellName(wmStorageArea.getAreaName());
entity.setCellX(wmStorageArea.getPositionX().toString());
entity.setCellY(wmStorageArea.getPositionY().toString());
entity.setCellZ(wmStorageArea.getPositionZ().toString());
// 查询库区信息
WmStorageLocation wmStorageLocation = wmStorageLocationMapper.selectWmStorageLocationByLocationId(wmStorageArea.getLocationId());
// 查询库房信息

View File

@ -1,6 +1,7 @@
package com.ktg.mes.wm.service.impl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.ktg.common.utils.DateUtils;
@ -8,6 +9,8 @@ import com.ktg.generator.util.MultiModuleCodeGenerator;
import com.ktg.mes.md.domain.MdItem;
import com.ktg.mes.md.mapper.MdItemMapper;
import com.ktg.mes.md.service.IMdItemService;
import com.ktg.mes.wm.domain.WmsInPlanDetailEntity;
import com.ktg.mes.wm.service.IWmsInPlanDetailEntityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktg.mes.wm.mapper.WmsInTaskMapper;
@ -24,9 +27,10 @@ import com.ktg.mes.wm.service.IWmsInTaskService;
public class WmsInTaskServiceImpl implements IWmsInTaskService {
@Autowired
private WmsInTaskMapper wmsInTaskMapper;
@Autowired
private MdItemMapper mdItemMapper;
@Autowired
private IWmsInPlanDetailEntityService wmsInPlanDetailEntityService;
/**
* 查询入库任务
@ -51,6 +55,11 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService {
wmsInTaskMapper.selectWmsInTaskList(wmsInTask).forEach(task -> {
MdItem mdItem = mdItemMapper.selectMdItemByCode(task.getMaterialCode());
task.setMaterialName(mdItem.getItemName());
WmsInPlanDetailEntity wmsInPlanDetailEntityQuery = new WmsInPlanDetailEntity();
wmsInPlanDetailEntityQuery.setPlanDetailsId(task.getDetailInId());
List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList = wmsInPlanDetailEntityService.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntityQuery);
task.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList);
wmsInTaskList.add(task);
});
return wmsInTaskList;

View File

@ -0,0 +1,96 @@
package com.ktg.mes.wm.service.impl;
import java.util.List;
import com.ktg.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktg.mes.wm.mapper.WmsSupplierMapper;
import com.ktg.mes.wm.domain.WmsSupplier;
import com.ktg.mes.wm.service.IWmsSupplierService;
/**
* 供应商基础信息Service业务层处理
*
* @author yinjinlu
* @date 2024-11-20
*/
@Service
public class WmsSupplierServiceImpl implements IWmsSupplierService
{
@Autowired
private WmsSupplierMapper wmsSupplierMapper;
/**
* 查询供应商基础信息
*
* @param id 供应商基础信息主键
* @return 供应商基础信息
*/
@Override
public WmsSupplier selectWmsSupplierById(Long id)
{
return wmsSupplierMapper.selectWmsSupplierById(id);
}
/**
* 查询供应商基础信息列表
*
* @param wmsSupplier 供应商基础信息
* @return 供应商基础信息
*/
@Override
public List<WmsSupplier> selectWmsSupplierList(WmsSupplier wmsSupplier)
{
return wmsSupplierMapper.selectWmsSupplierList(wmsSupplier);
}
/**
* 新增供应商基础信息
*
* @param wmsSupplier 供应商基础信息
* @return 结果
*/
@Override
public int insertWmsSupplier(WmsSupplier wmsSupplier)
{
wmsSupplier.setCreateTime(DateUtils.getNowDate());
return wmsSupplierMapper.insertWmsSupplier(wmsSupplier);
}
/**
* 修改供应商基础信息
*
* @param wmsSupplier 供应商基础信息
* @return 结果
*/
@Override
public int updateWmsSupplier(WmsSupplier wmsSupplier)
{
wmsSupplier.setUpdateTime(DateUtils.getNowDate());
return wmsSupplierMapper.updateWmsSupplier(wmsSupplier);
}
/**
* 批量删除供应商基础信息
*
* @param ids 需要删除的供应商基础信息主键
* @return 结果
*/
@Override
public int deleteWmsSupplierByIds(Long[] ids)
{
return wmsSupplierMapper.deleteWmsSupplierByIds(ids);
}
/**
* 删除供应商基础信息信息
*
* @param id 供应商基础信息主键
* @return 结果
*/
@Override
public int deleteWmsSupplierById(Long id)
{
return wmsSupplierMapper.deleteWmsSupplierById(id);
}
}

View File

@ -369,6 +369,12 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
public AjaxResult createInTaskByWmsZdTask(WmsZdTask zdTask) {
String batchNum = "ZZPC001";
// 获取订单下的台账集合
BaseKnife baseKnifeWrapper = new BaseKnife();
baseKnifeWrapper.setZdTaskId(zdTask.getWmsZdTaskId());
baseKnifeWrapper.setMbbBdMrlId(zdTask.getmProductId());
List<BaseKnife> baseKnifeList = baseKnifeMapper.selectBaseKnifeNotValidList(baseKnifeWrapper);
// 整刀入库计划, 根据图号查询入库计划如果不存在生成计划存在则往计划中添加任务
WmStorageArea wmStorageArea = wmStorageAreaMapper.selectWmStorageAreaByAreaId(zdTask.getAreaId());
WmsInPlan wmsInPlan = wmsInPlanService.selectWmsInPlanByPlanCode(zdTask.getCode());
@ -392,6 +398,14 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
wmsInPlanDetails.setQuantity(zdTask.getProductIdQty().toString());
wmsInPlanDetails.setQuantityIn(zdTask.getProductIdQty().toString());
wmsInPlanDetails.setPlanInStatus("0");
// 构建入库明细实体
List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList = new ArrayList<>();
baseKnifeList.forEach(baseKnife -> {
WmsInPlanDetailEntity wmsInPlanDetailEntity = new WmsInPlanDetailEntity();
wmsInPlanDetailEntity.setKnifeId(baseKnife.getBaseKnifeId());
wmsInPlanDetailEntityList.add(wmsInPlanDetailEntity);
});
wmsInPlanDetails.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList);
wmsInPlanDetailsList.add(wmsInPlanDetails);
wmsInPlanTemp.setWmsInPlanDetailsList(wmsInPlanDetailsList);
wmsInPlanService.insertWmsInPlan(wmsInPlanTemp);
@ -432,10 +446,6 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
wmsInTaskMapper.insertWmsInTask(wmsInTask);
// 刀台账设为有效
BaseKnife baseKnifeWrapper = new BaseKnife();
baseKnifeWrapper.setZdTaskId(zdTask.getWmsZdTaskId());
baseKnifeWrapper.setMbbBdMrlId(zdTask.getmProductId());
List<BaseKnife> baseKnifeList = baseKnifeMapper.selectBaseKnifeNotValidList(baseKnifeWrapper);
baseKnifeList.forEach(baseKnife -> {
baseKnife.setIsValid(0);
baseKnife.setCreateTime(DateUtils.getNowDate());

View File

@ -28,6 +28,7 @@
<result property="safeStock" column="SAFE_STOCK"/>
<result property="standardQuantity" column="STANDARD_QUANTITY"/>
<result property="isToolSetting" column="IS_TOOL_SETTING"/>
<result property="toolSettingParam" column="TOOL_SETTING_PARAM"/>
</resultMap>
<sql id="selectWmsOutPlanDetailEntityVo">
@ -53,7 +54,8 @@
KNIFE_UNIT,
SAFE_STOCK,
STANDARD_QUANTITY,
IS_TOOL_SETTING
IS_TOOL_SETTING,
TOOL_SETTING_PARAM
from WMS_OUT_PLAN_DETAIL_ENTITY
</sql>
@ -83,6 +85,9 @@
<if test="isToolSetting != null and isToolSetting != ''">and IS_TOOL_SETTING =
#{isToolSetting}
</if>
<if test="toolSettingParam != null and toolSettingParam != ''">and TOOL_SETTING_PARAM =
#{isToolSetting}
</if>
</where>
ORDER BY WMS_OUT_PLAN_DETAIL_ID DESC, CREATE_TIME DESC
</select>
@ -119,6 +124,7 @@
<if test="safeStock != null">SAFE_STOCK,</if>
<if test="standardQuantity != null">STANDARD_QUANTITY,</if>
<if test="isToolSetting != null">IS_TOOL_SETTING,</if>
<if test="toolSettingParam != null">TOOL_SETTING_PARAM,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="wmsOutPlanDetailId != null">#{wmsOutPlanDetailId},</if>
@ -143,6 +149,7 @@
<if test="safeStock != null">#{safeStock},</if>
<if test="standardQuantity != null">#{standardQuantity},</if>
<if test="isToolSetting != null">#{isToolSetting},</if>
<if test="toolSettingParam != null">#{toolSettingParam},</if>
</trim>
</insert>
@ -171,6 +178,7 @@
<if test="safeStock != null">SAFE_STOCK = #{safeStock},</if>
<if test="standardQuantity != null">STANDARD_QUANTITY = #{standardQuantity},</if>
<if test="isToolSetting != null">IS_TOOL_SETTING = #{isToolSetting},</if>
<if test="toolSettingParam != null">TOOL_SETTING_PARAM = #{toolSettingParam},</if>
</trim>
where WMS_OUT_PLAN_DETAIL_ENTITY_ID = #{wmsOutPlanDetailEntityId}
</update>

View File

@ -27,6 +27,8 @@
<result property="planInStatus" column="PLAN_IN_STATUS"/>
<result property="planInCode" column="PLAN_IN_CODE"/>
<result property="materialCode" column="MATERIAL_CODE"/>
<result property="materialUnit" column="MATERIAL_UNIT"/>
<result property="materialName" column="MATERIAL_NAME"/>
<result property="detailInId" column="DETAIL_IN_ID"/>
</resultMap>
@ -53,9 +55,12 @@
a.MATERIAL_CODE,
a.DETAIL_IN_ID,
b.AREA_CODE as CELL_CODE,
b.AREA_NAME as CELL_NAME
b.AREA_NAME as CELL_NAME,
c.UNIT_NAME AS MATERIAL_UNIT,
c.ITEM_NAME AS MATERIAL_NAME
from WMS_IN_TASK a
left join WM_STORAGE_AREA b on b.AREA_ID = a.CELL_TGT
left join MD_ITEM c on c.ITEM_ID = a.MATERIAL_ID
</sql>
<select id="selectWmsInTaskList" parameterType="WmsInTask" resultMap="WmsInTaskResult">
@ -76,12 +81,12 @@
<if test="updateTime != null and updateTime != ''">and UPDATE_TIME = #{updateTime}</if>
<if test="isActive != null and isActive != ''">and IS_ACTIVE = #{isActive}</if>
<if test="isDelete != null and isDelete != ''">and IS_DELETE = #{isDelete}</if>
<if test="batch != null and batch != ''">and BATCH = #{batch}</if>
<if test="batch != null and batch != ''">and BATCH like concat('%', #{batch}, '%')</if>
<if test="materialId != null and materialId != ''">and MATERIAL_ID = #{materialId}</if>
<if test="planTypeId != null and planTypeId != ''">and PLAN_TYPE_ID = #{planTypeId}</if>
<if test="planInStatus != null and planInStatus != ''">and PLAN_IN_STATUS = #{planInStatus}</if>
<if test="planInCode != null and planInCode != ''">and PLAN_IN_CODE = #{planInCode}</if>
<if test="materialCode != null and materialCode != ''">and MATERIAL_CODE = #{materialCode}</if>
<if test="materialCode != null and materialCode != ''">and MATERIAL_CODE like concat('%', #{materialCode}, '%')</if>
<if test="detailInId != null and detailInId != ''">and DETAIL_IN_ID = #{detailInId}</if>
</where>
order by a.CREATE_TIME desc