parent
9e23408e0a
commit
0f20bd8189
@ -0,0 +1,105 @@
|
||||
package com.hw.mes.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.common.security.annotation.RequiresPermissions;
|
||||
import com.hw.mes.domain.MesBindBarcode;
|
||||
import com.hw.mes.service.IMesBindBarcodeService;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||
import com.hw.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 条码绑定信息Controller
|
||||
*
|
||||
* @author xins
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bindbarcode")
|
||||
public class MesBindBarcodeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMesBindBarcodeService mesBindBarcodeService;
|
||||
|
||||
/**
|
||||
* 查询条码绑定信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:bindbarcode:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MesBindBarcode mesBindBarcode)
|
||||
{
|
||||
startPage();
|
||||
List<MesBindBarcode> list = mesBindBarcodeService.selectMesBindBarcodeList(mesBindBarcode);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出条码绑定信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:bindbarcode:export")
|
||||
@Log(title = "条码绑定信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MesBindBarcode mesBindBarcode)
|
||||
{
|
||||
List<MesBindBarcode> list = mesBindBarcodeService.selectMesBindBarcodeList(mesBindBarcode);
|
||||
ExcelUtil<MesBindBarcode> util = new ExcelUtil<MesBindBarcode>(MesBindBarcode.class);
|
||||
util.exportExcel(response, list, "条码绑定信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取条码绑定信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("mes:bindbarcode:query")
|
||||
@GetMapping(value = "/{bindBarcodeId}")
|
||||
public AjaxResult getInfo(@PathVariable("bindBarcodeId") Long bindBarcodeId)
|
||||
{
|
||||
return success(mesBindBarcodeService.selectMesBindBarcodeByBindBarcodeId(bindBarcodeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增条码绑定信息
|
||||
*/
|
||||
@RequiresPermissions("mes:bindbarcode:add")
|
||||
@Log(title = "条码绑定信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MesBindBarcode mesBindBarcode)
|
||||
{
|
||||
return toAjax(mesBindBarcodeService.insertMesBindBarcode(mesBindBarcode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改条码绑定信息
|
||||
*/
|
||||
@RequiresPermissions("mes:bindbarcode:edit")
|
||||
@Log(title = "条码绑定信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MesBindBarcode mesBindBarcode)
|
||||
{
|
||||
return toAjax(mesBindBarcodeService.updateMesBindBarcode(mesBindBarcode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除条码绑定信息
|
||||
*/
|
||||
@RequiresPermissions("mes:bindbarcode:remove")
|
||||
@Log(title = "条码绑定信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{bindBarcodeIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] bindBarcodeIds)
|
||||
{
|
||||
return toAjax(mesBindBarcodeService.deleteMesBindBarcodeByBindBarcodeIds(bindBarcodeIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesBindBarcode;
|
||||
|
||||
/**
|
||||
* 条码绑定信息Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
public interface MesBindBarcodeMapper
|
||||
{
|
||||
/**
|
||||
* 查询条码绑定信息
|
||||
*
|
||||
* @param bindBarcodeId 条码绑定信息主键
|
||||
* @return 条码绑定信息
|
||||
*/
|
||||
public MesBindBarcode selectMesBindBarcodeByBindBarcodeId(Long bindBarcodeId);
|
||||
|
||||
/**
|
||||
* 查询条码绑定信息列表
|
||||
*
|
||||
* @param mesBindBarcode 条码绑定信息
|
||||
* @return 条码绑定信息集合
|
||||
*/
|
||||
public List<MesBindBarcode> selectMesBindBarcodeList(MesBindBarcode mesBindBarcode);
|
||||
|
||||
/**
|
||||
* 新增条码绑定信息
|
||||
*
|
||||
* @param mesBindBarcode 条码绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesBindBarcode(MesBindBarcode mesBindBarcode);
|
||||
|
||||
/**
|
||||
* 修改条码绑定信息
|
||||
*
|
||||
* @param mesBindBarcode 条码绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesBindBarcode(MesBindBarcode mesBindBarcode);
|
||||
|
||||
/**
|
||||
* 删除条码绑定信息
|
||||
*
|
||||
* @param bindBarcodeId 条码绑定信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBindBarcodeByBindBarcodeId(Long bindBarcodeId);
|
||||
|
||||
/**
|
||||
* 批量删除条码绑定信息
|
||||
*
|
||||
* @param bindBarcodeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBindBarcodeByBindBarcodeIds(Long[] bindBarcodeIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesBindBarcode;
|
||||
|
||||
/**
|
||||
* 条码绑定信息Service接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
public interface IMesBindBarcodeService
|
||||
{
|
||||
/**
|
||||
* 查询条码绑定信息
|
||||
*
|
||||
* @param bindBarcodeId 条码绑定信息主键
|
||||
* @return 条码绑定信息
|
||||
*/
|
||||
public MesBindBarcode selectMesBindBarcodeByBindBarcodeId(Long bindBarcodeId);
|
||||
|
||||
/**
|
||||
* 查询条码绑定信息列表
|
||||
*
|
||||
* @param mesBindBarcode 条码绑定信息
|
||||
* @return 条码绑定信息集合
|
||||
*/
|
||||
public List<MesBindBarcode> selectMesBindBarcodeList(MesBindBarcode mesBindBarcode);
|
||||
|
||||
/**
|
||||
* 新增条码绑定信息
|
||||
*
|
||||
* @param mesBindBarcode 条码绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesBindBarcode(MesBindBarcode mesBindBarcode);
|
||||
|
||||
/**
|
||||
* 修改条码绑定信息
|
||||
*
|
||||
* @param mesBindBarcode 条码绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesBindBarcode(MesBindBarcode mesBindBarcode);
|
||||
|
||||
/**
|
||||
* 批量删除条码绑定信息
|
||||
*
|
||||
* @param bindBarcodeIds 需要删除的条码绑定信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBindBarcodeByBindBarcodeIds(Long[] bindBarcodeIds);
|
||||
|
||||
/**
|
||||
* 删除条码绑定信息信息
|
||||
*
|
||||
* @param bindBarcodeId 条码绑定信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBindBarcodeByBindBarcodeId(Long bindBarcodeId);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.hw.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hw.mes.mapper.MesBindBarcodeMapper;
|
||||
import com.hw.mes.domain.MesBindBarcode;
|
||||
import com.hw.mes.service.IMesBindBarcodeService;
|
||||
|
||||
/**
|
||||
* 条码绑定信息Service业务层处理
|
||||
*
|
||||
* @author xins
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
@Service
|
||||
public class MesBindBarcodeServiceImpl implements IMesBindBarcodeService
|
||||
{
|
||||
@Autowired
|
||||
private MesBindBarcodeMapper mesBindBarcodeMapper;
|
||||
|
||||
/**
|
||||
* 查询条码绑定信息
|
||||
*
|
||||
* @param bindBarcodeId 条码绑定信息主键
|
||||
* @return 条码绑定信息
|
||||
*/
|
||||
@Override
|
||||
public MesBindBarcode selectMesBindBarcodeByBindBarcodeId(Long bindBarcodeId)
|
||||
{
|
||||
return mesBindBarcodeMapper.selectMesBindBarcodeByBindBarcodeId(bindBarcodeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条码绑定信息列表
|
||||
*
|
||||
* @param mesBindBarcode 条码绑定信息
|
||||
* @return 条码绑定信息
|
||||
*/
|
||||
@Override
|
||||
public List<MesBindBarcode> selectMesBindBarcodeList(MesBindBarcode mesBindBarcode)
|
||||
{
|
||||
return mesBindBarcodeMapper.selectMesBindBarcodeList(mesBindBarcode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增条码绑定信息
|
||||
*
|
||||
* @param mesBindBarcode 条码绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMesBindBarcode(MesBindBarcode mesBindBarcode)
|
||||
{
|
||||
mesBindBarcode.setCreateTime(DateUtils.getNowDate());
|
||||
return mesBindBarcodeMapper.insertMesBindBarcode(mesBindBarcode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改条码绑定信息
|
||||
*
|
||||
* @param mesBindBarcode 条码绑定信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMesBindBarcode(MesBindBarcode mesBindBarcode)
|
||||
{
|
||||
mesBindBarcode.setUpdateTime(DateUtils.getNowDate());
|
||||
return mesBindBarcodeMapper.updateMesBindBarcode(mesBindBarcode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除条码绑定信息
|
||||
*
|
||||
* @param bindBarcodeIds 需要删除的条码绑定信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesBindBarcodeByBindBarcodeIds(Long[] bindBarcodeIds)
|
||||
{
|
||||
return mesBindBarcodeMapper.deleteMesBindBarcodeByBindBarcodeIds(bindBarcodeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除条码绑定信息信息
|
||||
*
|
||||
* @param bindBarcodeId 条码绑定信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesBindBarcodeByBindBarcodeId(Long bindBarcodeId)
|
||||
{
|
||||
return mesBindBarcodeMapper.deleteMesBindBarcodeByBindBarcodeId(bindBarcodeId);
|
||||
}
|
||||
}
|
@ -0,0 +1,141 @@
|
||||
<?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.hw.mes.mapper.MesBindBarcodeMapper">
|
||||
|
||||
<resultMap type="MesBindBarcode" id="MesBindBarcodeResult">
|
||||
<result property="bindBarcodeId" column="bind_barcode_id" />
|
||||
<result property="printTime" column="print_time" />
|
||||
<result property="printPerson" column="print_person" />
|
||||
<result property="batchFlag" column="batch_flag" />
|
||||
<result property="bindBarcodeInfo" column="bind_barcode_info" />
|
||||
<result property="barcodeInfo" column="barcode_info" />
|
||||
<result property="weight" column="weight" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="machineName" column="machine_name" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="saleorderCode" column="saleorder_code" />
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="planDetailId" column="plan_detail_id" />
|
||||
<result property="serialNumber" column="serial_number" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="activeFlag" column="active_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesBindBarcodeVo">
|
||||
select bind_barcode_id, print_time, print_person, batch_flag, bind_barcode_info, barcode_info, weight, amount, machine_name, project_no, saleorder_code, plan_id, plan_detail_id, serial_number, remark, active_flag, create_by, create_time, update_by, update_time from mes_bind_barcode
|
||||
</sql>
|
||||
|
||||
<select id="selectMesBindBarcodeList" parameterType="MesBindBarcode" resultMap="MesBindBarcodeResult">
|
||||
<include refid="selectMesBindBarcodeVo"/>
|
||||
<where>
|
||||
<if test="printTime != null "> and print_time = #{printTime}</if>
|
||||
<if test="printPerson != null and printPerson != ''"> and print_person = #{printPerson}</if>
|
||||
<if test="batchFlag != null and batchFlag != ''"> and batch_flag = #{batchFlag}</if>
|
||||
<if test="bindBarcodeInfo != null and bindBarcodeInfo != ''"> and bind_barcode_info = #{bindBarcodeInfo}</if>
|
||||
<if test="barcodeInfo != null and barcodeInfo != ''"> and barcode_info = #{barcodeInfo}</if>
|
||||
<if test="weight != null "> and weight = #{weight}</if>
|
||||
<if test="amount != null "> and amount = #{amount}</if>
|
||||
<if test="machineName != null and machineName != ''"> and machine_name like concat('%', #{machineName}, '%')</if>
|
||||
<if test="projectNo != null and projectNo != ''"> and project_no = #{projectNo}</if>
|
||||
<if test="saleorderCode != null and saleorderCode != ''"> and saleorder_code = #{saleorderCode}</if>
|
||||
<if test="planId != null "> and plan_id = #{planId}</if>
|
||||
<if test="planDetailId != null "> and plan_detail_id = #{planDetailId}</if>
|
||||
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
||||
<if test="activeFlag != null "> and active_flag = #{activeFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesBindBarcodeByBindBarcodeId" parameterType="Long" resultMap="MesBindBarcodeResult">
|
||||
<include refid="selectMesBindBarcodeVo"/>
|
||||
where bind_barcode_id = #{bindBarcodeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesBindBarcode" parameterType="MesBindBarcode" useGeneratedKeys="true" keyProperty="bindBarcodeId">
|
||||
insert into mes_bind_barcode
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="printTime != null">print_time,</if>
|
||||
<if test="printPerson != null">print_person,</if>
|
||||
<if test="batchFlag != null and batchFlag != ''">batch_flag,</if>
|
||||
<if test="bindBarcodeInfo != null and bindBarcodeInfo != ''">bind_barcode_info,</if>
|
||||
<if test="barcodeInfo != null and barcodeInfo != ''">barcode_info,</if>
|
||||
<if test="weight != null">weight,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="machineName != null">machine_name,</if>
|
||||
<if test="projectNo != null">project_no,</if>
|
||||
<if test="saleorderCode != null">saleorder_code,</if>
|
||||
<if test="planId != null">plan_id,</if>
|
||||
<if test="planDetailId != null">plan_detail_id,</if>
|
||||
<if test="serialNumber != null">serial_number,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="activeFlag != null">active_flag,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="printTime != null">#{printTime},</if>
|
||||
<if test="printPerson != null">#{printPerson},</if>
|
||||
<if test="batchFlag != null and batchFlag != ''">#{batchFlag},</if>
|
||||
<if test="bindBarcodeInfo != null and bindBarcodeInfo != ''">#{bindBarcodeInfo},</if>
|
||||
<if test="barcodeInfo != null and barcodeInfo != ''">#{barcodeInfo},</if>
|
||||
<if test="weight != null">#{weight},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="machineName != null">#{machineName},</if>
|
||||
<if test="projectNo != null">#{projectNo},</if>
|
||||
<if test="saleorderCode != null">#{saleorderCode},</if>
|
||||
<if test="planId != null">#{planId},</if>
|
||||
<if test="planDetailId != null">#{planDetailId},</if>
|
||||
<if test="serialNumber != null">#{serialNumber},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="activeFlag != null">#{activeFlag},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesBindBarcode" parameterType="MesBindBarcode">
|
||||
update mes_bind_barcode
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="printTime != null">print_time = #{printTime},</if>
|
||||
<if test="printPerson != null">print_person = #{printPerson},</if>
|
||||
<if test="batchFlag != null and batchFlag != ''">batch_flag = #{batchFlag},</if>
|
||||
<if test="bindBarcodeInfo != null and bindBarcodeInfo != ''">bind_barcode_info = #{bindBarcodeInfo},</if>
|
||||
<if test="barcodeInfo != null and barcodeInfo != ''">barcode_info = #{barcodeInfo},</if>
|
||||
<if test="weight != null">weight = #{weight},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="machineName != null">machine_name = #{machineName},</if>
|
||||
<if test="projectNo != null">project_no = #{projectNo},</if>
|
||||
<if test="saleorderCode != null">saleorder_code = #{saleorderCode},</if>
|
||||
<if test="planId != null">plan_id = #{planId},</if>
|
||||
<if test="planDetailId != null">plan_detail_id = #{planDetailId},</if>
|
||||
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="activeFlag != null">active_flag = #{activeFlag},</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>
|
||||
</trim>
|
||||
where bind_barcode_id = #{bindBarcodeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesBindBarcodeByBindBarcodeId" parameterType="Long">
|
||||
delete from mes_bind_barcode where bind_barcode_id = #{bindBarcodeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesBindBarcodeByBindBarcodeIds" parameterType="String">
|
||||
delete from mes_bind_barcode where bind_barcode_id in
|
||||
<foreach item="bindBarcodeId" collection="array" open="(" separator="," close=")">
|
||||
#{bindBarcodeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,59 @@
|
||||
package com.hw.wms.controller;
|
||||
|
||||
import com.hw.common.core.constant.WmsConstants;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.wms.domain.WmsRawOutstock;
|
||||
import com.hw.wms.domain.WmsRawOutstockDetail;
|
||||
import com.hw.wms.domain.WmsRawReturn;
|
||||
import com.hw.wms.domain.WmsRawReturnDetail;
|
||||
import com.hw.wms.domain.vo.*;
|
||||
import com.hw.wms.service.IWmsRawInstockService;
|
||||
import com.hw.wms.service.IWmsRawOutstockService;
|
||||
import com.hw.wms.service.IWmsRawReturnService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Api Controller,提供给其他Module调用使用
|
||||
*
|
||||
* @author xins
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wms/api")
|
||||
public class WmsApiController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IWmsRawOutstockService wmsRawOutstockService;
|
||||
|
||||
@Autowired
|
||||
private IWmsRawReturnService wmsRawReturnService;
|
||||
|
||||
|
||||
/**
|
||||
* 申请领料
|
||||
*/
|
||||
// @RequiresPermissions("wms:mobile:addrawinstock")
|
||||
@Log(title = "原材料出库记录", businessType = BusinessType.APPLY)
|
||||
@PostMapping(("/applyRawOutstock"))
|
||||
public AjaxResult applyRawOutstock(@Validated @RequestBody WmsRawOutstock wmsRawOutstock) {
|
||||
return toAjax(wmsRawOutstockService.applyRawOutstock(wmsRawOutstock));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 申请退库
|
||||
*/
|
||||
@Log(title = "原材料退库记录", businessType = BusinessType.APPLY)
|
||||
@PostMapping(("/applyRawReturn"))
|
||||
public AjaxResult applyRawReturn(@Validated @RequestBody WmsRawReturn wmsRawReturn) {
|
||||
return toAjax(wmsRawReturnService.applyRawReturn(wmsRawReturn));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.hw.wms.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Description: 原材料AGV出库VO
|
||||
* @ClassName: WmsAgvRawOutstockVo
|
||||
* @Author : xins
|
||||
* @Date :2023-12-22 16:56
|
||||
* @Version :1.0
|
||||
*/
|
||||
@Data
|
||||
public class WmsAgvRawOutstockVo {
|
||||
|
||||
//仓库ID
|
||||
@NotNull(message = "仓库ID必须输入")
|
||||
private Long warehouseId;
|
||||
|
||||
//成品批次
|
||||
@NotNull(message = "物料ID必须输入")
|
||||
private Long materialId;
|
||||
|
||||
//成品批次
|
||||
@NotBlank(message = "生产计划编号必须输入")
|
||||
private String planCode;
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.hw.wms.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Description: 原材料AGV返库分配库位VO
|
||||
* @ClassName: WmsAgvRawReturnVo
|
||||
* @Author : xins
|
||||
* @Date :2023-12-28 18:32
|
||||
* @Version :1.0
|
||||
*/
|
||||
@Data
|
||||
public class WmsAgvRawReturnAssignVo {
|
||||
|
||||
//仓库ID
|
||||
@NotNull(message="仓库ID必须输入")
|
||||
private Long warehouseId;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.hw.wms.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Description: 原材料AGV返库VO
|
||||
* @ClassName: WmsAgvRawReturnVo
|
||||
* @Author : xins
|
||||
* @Date :2023-12-28 18:32
|
||||
* @Version :1.0
|
||||
*/
|
||||
@Data
|
||||
public class WmsAgvRawReturnVo {
|
||||
|
||||
//物料条码
|
||||
@NotBlank(message = "物料条码必须输入")
|
||||
private String materialBarcode;
|
||||
|
||||
@NotBlank(message = "库位编码必须输入")
|
||||
private String locationCode;
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.hw.wms.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class WmsMoveMergeVo {
|
||||
|
||||
//仓库ID
|
||||
@NotNull(message="仓库ID必须输入")
|
||||
private Long warehouseId;
|
||||
|
||||
@NotBlank(message="原库位必须输入")
|
||||
private String oriLocationCode;
|
||||
|
||||
@NotBlank(message="目标库位必须输入")
|
||||
private String targetLocationCode;
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.hw.wms.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Description: 更新入库记录VO
|
||||
* @ClassName: WmsRawInstockVo
|
||||
* @Author : xins
|
||||
* @Date :2023-12-20 17:12
|
||||
* @Version :1.0
|
||||
*/
|
||||
@Data
|
||||
public class WmsProductInstockVo {
|
||||
|
||||
//成品条码
|
||||
@NotBlank(message="成品条码必须输入")
|
||||
private String materialBarcode;
|
||||
|
||||
//成品批次
|
||||
@NotBlank(message="成品批次必须输入")
|
||||
private String productBatch;
|
||||
|
||||
//成品批次
|
||||
@NotNull(message="成品ID必须输入")
|
||||
private Long productId;
|
||||
|
||||
//生产计划ID
|
||||
@NotBlank(message="生产计划编号必须输入")
|
||||
private String planCode;
|
||||
|
||||
//生产计划明细编号
|
||||
private String planDetailCode;
|
||||
//库位编码
|
||||
@NotBlank(message="库位编码必须输入")
|
||||
private String locationCode;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.wms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.wms.domain.WmsProductInstockDetail;
|
||||
|
||||
/**
|
||||
* 成品入库记录明细Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2023-12-25
|
||||
*/
|
||||
public interface WmsProductInstockDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询成品入库记录明细
|
||||
*
|
||||
* @param productInstockDetailId 成品入库记录明细主键
|
||||
* @return 成品入库记录明细
|
||||
*/
|
||||
public WmsProductInstockDetail selectWmsProductInstockDetailByProductInstockDetailId(Long productInstockDetailId);
|
||||
|
||||
/**
|
||||
* 查询成品入库记录明细列表
|
||||
*
|
||||
* @param wmsProductInstockDetail 成品入库记录明细
|
||||
* @return 成品入库记录明细集合
|
||||
*/
|
||||
public List<WmsProductInstockDetail> selectWmsProductInstockDetailList(WmsProductInstockDetail wmsProductInstockDetail);
|
||||
|
||||
/**
|
||||
* 新增成品入库记录明细
|
||||
*
|
||||
* @param wmsProductInstockDetail 成品入库记录明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWmsProductInstockDetail(WmsProductInstockDetail wmsProductInstockDetail);
|
||||
|
||||
/**
|
||||
* 修改成品入库记录明细
|
||||
*
|
||||
* @param wmsProductInstockDetail 成品入库记录明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWmsProductInstockDetail(WmsProductInstockDetail wmsProductInstockDetail);
|
||||
|
||||
/**
|
||||
* 删除成品入库记录明细
|
||||
*
|
||||
* @param productInstockDetailId 成品入库记录明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsProductInstockDetailByProductInstockDetailId(Long productInstockDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除成品入库记录明细
|
||||
*
|
||||
* @param productInstockDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsProductInstockDetailByProductInstockDetailIds(Long[] productInstockDetailIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.wms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.wms.domain.WmsRawInstockDetail;
|
||||
|
||||
/**
|
||||
* 原材料入库记录明细Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2023-12-25
|
||||
*/
|
||||
public interface WmsRawInstockDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询原材料入库记录明细
|
||||
*
|
||||
* @param rawInstockDetailId 原材料入库记录明细主键
|
||||
* @return 原材料入库记录明细
|
||||
*/
|
||||
public WmsRawInstockDetail selectWmsRawInstockDetailByRawInstockDetailId(Long rawInstockDetailId);
|
||||
|
||||
/**
|
||||
* 查询原材料入库记录明细列表
|
||||
*
|
||||
* @param wmsRawInstockDetail 原材料入库记录明细
|
||||
* @return 原材料入库记录明细集合
|
||||
*/
|
||||
public List<WmsRawInstockDetail> selectWmsRawInstockDetailList(WmsRawInstockDetail wmsRawInstockDetail);
|
||||
|
||||
/**
|
||||
* 新增原材料入库记录明细
|
||||
*
|
||||
* @param wmsRawInstockDetail 原材料入库记录明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWmsRawInstockDetail(WmsRawInstockDetail wmsRawInstockDetail);
|
||||
|
||||
/**
|
||||
* 修改原材料入库记录明细
|
||||
*
|
||||
* @param wmsRawInstockDetail 原材料入库记录明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWmsRawInstockDetail(WmsRawInstockDetail wmsRawInstockDetail);
|
||||
|
||||
/**
|
||||
* 删除原材料入库记录明细
|
||||
*
|
||||
* @param rawInstockDetailId 原材料入库记录明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsRawInstockDetailByRawInstockDetailId(Long rawInstockDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除原材料入库记录明细
|
||||
*
|
||||
* @param rawInstockDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWmsRawInstockDetailByRawInstockDetailIds(Long[] rawInstockDetailIds);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.hw.wms.service;
|
||||
|
||||
import com.hw.wms.domain.vo.WmsMoveMergeVo;
|
||||
|
||||
/**
|
||||
* @Description: 移库Service接口
|
||||
* @ClassName: IWmsMoveService
|
||||
* @Author : xins
|
||||
* @Date :2023-12-27 10:53
|
||||
* @Version :1.0
|
||||
*/
|
||||
public interface IWmsMoveMergeService {
|
||||
|
||||
/**
|
||||
* 人工移库
|
||||
* @param wmsMoveMergeVo
|
||||
* @return
|
||||
*/
|
||||
public int manualMove(WmsMoveMergeVo wmsMoveMergeVo, String manualMergeType);
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.hw.wms.service.impl;
|
||||
|
||||
import com.hw.common.core.constant.WmsConstants;
|
||||
import com.hw.wms.domain.WmsBaseWarehouse;
|
||||
import com.hw.wms.domain.WmsProductStock;
|
||||
import com.hw.wms.domain.WmsRawStock;
|
||||
import com.hw.wms.domain.vo.WmsMoveMergeVo;
|
||||
import com.hw.wms.mapper.*;
|
||||
import com.hw.wms.service.IWmsMoveMergeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: 移库合库服务Service业务层处理
|
||||
* @ClassName: WmsMoveServiceImpl
|
||||
* @Author : xins
|
||||
* @Date :2023-12-27 10:54
|
||||
* @Version :1.0
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class WmsMoveMergeServiceImpl implements IWmsMoveMergeService {
|
||||
@Autowired
|
||||
private WmsRawStockMapper wmsRawStockMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsRawInstockMapper wmsRawInstockMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsRawOutstockMapper wmsRawOutstockMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsProductStockMapper wmsProductStockMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsProductInstockMapper wmsProductInstockMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsProductOutstockMapper wmsProductOutstockMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsBaseWarehouseMapper wmsBaseWarehouseMapper;
|
||||
|
||||
/**
|
||||
* 人工移库
|
||||
* @param wmsMoveMergeVo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int manualMove(WmsMoveMergeVo wmsMoveMergeVo,String manualMergeType){
|
||||
Long warehouseId = wmsMoveMergeVo.getWarehouseId();
|
||||
String oriLocationCode = wmsMoveMergeVo.getOriLocationCode();
|
||||
String targetLocationCode = wmsMoveMergeVo.getTargetLocationCode();
|
||||
WmsBaseWarehouse warehouse = wmsBaseWarehouseMapper.selectWmsBaseWarehouseByWarehouseId(warehouseId);
|
||||
String warehouseInstockType = warehouse.getWarehouseInstockType();
|
||||
|
||||
//仓库类型为人工仓库
|
||||
|
||||
//原库位需要有库存,没有占用数量和冻结数量
|
||||
WmsRawStock queryRawStock = new WmsRawStock();
|
||||
|
||||
WmsProductStock queryProductStock = new WmsProductStock();
|
||||
|
||||
//移库时目标库位为空
|
||||
|
||||
//合库是目标库位不为空
|
||||
|
||||
//移库中,锁库位,移库结束解锁库位
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 人工合库
|
||||
* @param wmsMoveMergeVo
|
||||
* @return
|
||||
*/
|
||||
public int manualMerge(WmsMoveMergeVo wmsMoveMergeVo){
|
||||
Long warehouseId = wmsMoveMergeVo.getWarehouseId();
|
||||
String oriLocationCode = wmsMoveMergeVo.getOriLocationCode();
|
||||
String targetLocationCode = wmsMoveMergeVo.getTargetLocationCode();
|
||||
WmsBaseWarehouse warehouse = wmsBaseWarehouseMapper.selectWmsBaseWarehouseByWarehouseId(warehouseId);
|
||||
String warehouseInstockType = warehouse.getWarehouseInstockType();
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void manualRawMoveMerge(){
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
<?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.hw.wms.mapper.WmsProductInstockDetailMapper">
|
||||
|
||||
<resultMap type="WmsProductInstockDetail" id="WmsProductInstockDetailResult">
|
||||
<result property="productInstockDetailId" column="product_instock_detail_id" />
|
||||
<result property="productInstockId" column="product_instock_id" />
|
||||
<result property="locationCode" column="location_code" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productBarcode" column="product_barcode" />
|
||||
<result property="productBatch" column="product_batch" />
|
||||
<result property="executeStatus" column="execute_status" />
|
||||
<result property="erpStatus" column="erp_status" />
|
||||
<result property="planAmount" column="plan_amount" />
|
||||
<result property="instockAmount" column="instock_amount" />
|
||||
<result property="instockBy" column="instock_by" />
|
||||
<result property="instockDate" column="instock_date" />
|
||||
<result property="instockWay" column="instock_way" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateDate" column="update_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmsProductInstockDetailVo">
|
||||
select product_instock_detail_id, product_instock_id, location_code, product_id, product_barcode, product_batch, execute_status, erp_status, plan_amount, instock_amount, instock_by, instock_date, instock_way, update_by, update_date from wms_product_instock_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectWmsProductInstockDetailList" parameterType="WmsProductInstockDetail" resultMap="WmsProductInstockDetailResult">
|
||||
<include refid="selectWmsProductInstockDetailVo"/>
|
||||
<where>
|
||||
<if test="productInstockId != null "> and product_instock_id = #{productInstockId}</if>
|
||||
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
<if test="productBarcode != null and productBarcode != ''"> and product_barcode = #{productBarcode}</if>
|
||||
<if test="productBatch != null and productBatch != ''"> and product_batch = #{productBatch}</if>
|
||||
<if test="executeStatus != null and executeStatus != ''"> and execute_status = #{executeStatus}</if>
|
||||
<if test="erpStatus != null and erpStatus != ''"> and erp_status = #{erpStatus}</if>
|
||||
<if test="planAmount != null "> and plan_amount = #{planAmount}</if>
|
||||
<if test="instockAmount != null "> and instock_amount = #{instockAmount}</if>
|
||||
<if test="instockBy != null and instockBy != ''"> and instock_by = #{instockBy}</if>
|
||||
<if test="instockDate != null "> and instock_date = #{instockDate}</if>
|
||||
<if test="instockWay != null and instockWay != ''"> and instock_way = #{instockWay}</if>
|
||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWmsProductInstockDetailByProductInstockDetailId" parameterType="Long" resultMap="WmsProductInstockDetailResult">
|
||||
<include refid="selectWmsProductInstockDetailVo"/>
|
||||
where product_instock_detail_id = #{productInstockDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertWmsProductInstockDetail" parameterType="WmsProductInstockDetail" useGeneratedKeys="true" keyProperty="productInstockDetailId">
|
||||
insert into wms_product_instock_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productInstockId != null">product_instock_id,</if>
|
||||
<if test="locationCode != null and locationCode != ''">location_code,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productBarcode != null and productBarcode != ''">product_barcode,</if>
|
||||
<if test="productBatch != null">product_batch,</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">execute_status,</if>
|
||||
<if test="erpStatus != null">erp_status,</if>
|
||||
<if test="planAmount != null">plan_amount,</if>
|
||||
<if test="instockAmount != null">instock_amount,</if>
|
||||
<if test="instockBy != null">instock_by,</if>
|
||||
<if test="instockDate != null">instock_date,</if>
|
||||
<if test="instockWay != null and instockWay != ''">instock_way,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateDate != null">update_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productInstockId != null">#{productInstockId},</if>
|
||||
<if test="locationCode != null and locationCode != ''">#{locationCode},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productBarcode != null and productBarcode != ''">#{productBarcode},</if>
|
||||
<if test="productBatch != null">#{productBatch},</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">#{executeStatus},</if>
|
||||
<if test="erpStatus != null">#{erpStatus},</if>
|
||||
<if test="planAmount != null">#{planAmount},</if>
|
||||
<if test="instockAmount != null">#{instockAmount},</if>
|
||||
<if test="instockBy != null">#{instockBy},</if>
|
||||
<if test="instockDate != null">#{instockDate},</if>
|
||||
<if test="instockWay != null and instockWay != ''">#{instockWay},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateDate != null">#{updateDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWmsProductInstockDetail" parameterType="WmsProductInstockDetail">
|
||||
update wms_product_instock_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productInstockId != null">product_instock_id = #{productInstockId},</if>
|
||||
<if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productBarcode != null and productBarcode != ''">product_barcode = #{productBarcode},</if>
|
||||
<if test="productBatch != null">product_batch = #{productBatch},</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">execute_status = #{executeStatus},</if>
|
||||
<if test="erpStatus != null">erp_status = #{erpStatus},</if>
|
||||
<if test="planAmount != null">plan_amount = #{planAmount},</if>
|
||||
<if test="instockAmount != null">instock_amount = #{instockAmount},</if>
|
||||
<if test="instockBy != null">instock_by = #{instockBy},</if>
|
||||
<if test="instockDate != null">instock_date = #{instockDate},</if>
|
||||
<if test="instockWay != null and instockWay != ''">instock_way = #{instockWay},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateDate != null">update_date = #{updateDate},</if>
|
||||
</trim>
|
||||
where product_instock_detail_id = #{productInstockDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWmsProductInstockDetailByProductInstockDetailId" parameterType="Long">
|
||||
delete from wms_product_instock_detail where product_instock_detail_id = #{productInstockDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWmsProductInstockDetailByProductInstockDetailIds" parameterType="String">
|
||||
delete from wms_product_instock_detail where product_instock_detail_id in
|
||||
<foreach item="productInstockDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{productInstockDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,164 @@
|
||||
<?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.hw.wms.mapper.WmsRawInstockDetailMapper">
|
||||
|
||||
<resultMap type="WmsRawInstockDetail" id="WmsRawInstockDetailResult">
|
||||
<result property="rawInstockDetailId" column="raw_instock_detail_id" />
|
||||
<result property="rawInstockId" column="raw_instock_id" />
|
||||
<result property="locationCode" column="location_code" />
|
||||
<result property="materialBarcode" column="material_barcode" />
|
||||
<result property="instockBatch" column="instock_batch" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="poNo" column="po_no" />
|
||||
<result property="materialProductionDate" column="material_production_date" />
|
||||
<result property="planAmount" column="plan_amount" />
|
||||
<result property="instockAmount" column="instock_amount" />
|
||||
<result property="executeStatus" column="execute_status" />
|
||||
<result property="erpStatus" column="erp_status" />
|
||||
<result property="instockPerson" column="instock_person" />
|
||||
<result property="instockTime" column="instock_time" />
|
||||
<result property="instockWay" column="instock_way" />
|
||||
<result property="machineName" column="machine_name" />
|
||||
<result property="qualityStatus" column="quality_status" />
|
||||
<result property="stackAmount" column="stack_amount" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateDate" column="update_date" />
|
||||
<result property="activeFlag" column="active_flag" />
|
||||
<result property="poLine" column="po_line" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmsRawInstockDetailVo">
|
||||
select raw_instock_detail_id, raw_instock_id, location_code, material_barcode, instock_batch, material_id, po_no, material_production_date, plan_amount, instock_amount, execute_status, erp_status, instock_person, instock_time, instock_way, machine_name, quality_status, stack_amount, create_by, create_date, update_by, update_date, active_flag, po_line from wms_raw_instock_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectWmsRawInstockDetailList" parameterType="WmsRawInstockDetail" resultMap="WmsRawInstockDetailResult">
|
||||
<include refid="selectWmsRawInstockDetailVo"/>
|
||||
<where>
|
||||
<if test="rawInstockId != null "> and raw_instock_id = #{rawInstockId}</if>
|
||||
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
||||
<if test="materialBarcode != null and materialBarcode != ''"> and material_barcode = #{materialBarcode}</if>
|
||||
<if test="instockBatch != null and instockBatch != ''"> and instock_batch = #{instockBatch}</if>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||
<if test="poNo != null and poNo != ''"> and po_no = #{poNo}</if>
|
||||
<if test="materialProductionDate != null "> and material_production_date = #{materialProductionDate}</if>
|
||||
<if test="planAmount != null "> and plan_amount = #{planAmount}</if>
|
||||
<if test="instockAmount != null "> and instock_amount = #{instockAmount}</if>
|
||||
<if test="executeStatus != null and executeStatus != ''"> and execute_status = #{executeStatus}</if>
|
||||
<if test="erpStatus != null and erpStatus != ''"> and erp_status = #{erpStatus}</if>
|
||||
<if test="instockPerson != null and instockPerson != ''"> and instock_person = #{instockPerson}</if>
|
||||
<if test="instockTime != null "> and instock_time = #{instockTime}</if>
|
||||
<if test="instockWay != null and instockWay != ''"> and instock_way = #{instockWay}</if>
|
||||
<if test="machineName != null and machineName != ''"> and machine_name like concat('%', #{machineName}, '%')</if>
|
||||
<if test="qualityStatus != null and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
|
||||
<if test="stackAmount != null "> and stack_amount = #{stackAmount}</if>
|
||||
<if test="createDate != null "> and create_date = #{createDate}</if>
|
||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
|
||||
<if test="poLine != null and poLine != ''"> and po_line = #{poLine}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWmsRawInstockDetailByRawInstockDetailId" parameterType="Long" resultMap="WmsRawInstockDetailResult">
|
||||
<include refid="selectWmsRawInstockDetailVo"/>
|
||||
where raw_instock_detail_id = #{rawInstockDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertWmsRawInstockDetail" parameterType="WmsRawInstockDetail" useGeneratedKeys="true" keyProperty="rawInstockDetailId">
|
||||
insert into wms_raw_instock_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="rawInstockId != null">raw_instock_id,</if>
|
||||
<if test="locationCode != null and locationCode != ''">location_code,</if>
|
||||
<if test="materialBarcode != null and materialBarcode != ''">material_barcode,</if>
|
||||
<if test="instockBatch != null">instock_batch,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="poNo != null">po_no,</if>
|
||||
<if test="materialProductionDate != null">material_production_date,</if>
|
||||
<if test="planAmount != null">plan_amount,</if>
|
||||
<if test="instockAmount != null">instock_amount,</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">execute_status,</if>
|
||||
<if test="erpStatus != null">erp_status,</if>
|
||||
<if test="instockPerson != null">instock_person,</if>
|
||||
<if test="instockTime != null">instock_time,</if>
|
||||
<if test="instockWay != null and instockWay != ''">instock_way,</if>
|
||||
<if test="machineName != null">machine_name,</if>
|
||||
<if test="qualityStatus != null">quality_status,</if>
|
||||
<if test="stackAmount != null">stack_amount,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createDate != null">create_date,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateDate != null">update_date,</if>
|
||||
<if test="activeFlag != null">active_flag,</if>
|
||||
<if test="poLine != null">po_line,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="rawInstockId != null">#{rawInstockId},</if>
|
||||
<if test="locationCode != null and locationCode != ''">#{locationCode},</if>
|
||||
<if test="materialBarcode != null and materialBarcode != ''">#{materialBarcode},</if>
|
||||
<if test="instockBatch != null">#{instockBatch},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="poNo != null">#{poNo},</if>
|
||||
<if test="materialProductionDate != null">#{materialProductionDate},</if>
|
||||
<if test="planAmount != null">#{planAmount},</if>
|
||||
<if test="instockAmount != null">#{instockAmount},</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">#{executeStatus},</if>
|
||||
<if test="erpStatus != null">#{erpStatus},</if>
|
||||
<if test="instockPerson != null">#{instockPerson},</if>
|
||||
<if test="instockTime != null">#{instockTime},</if>
|
||||
<if test="instockWay != null and instockWay != ''">#{instockWay},</if>
|
||||
<if test="machineName != null">#{machineName},</if>
|
||||
<if test="qualityStatus != null">#{qualityStatus},</if>
|
||||
<if test="stackAmount != null">#{stackAmount},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createDate != null">#{createDate},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateDate != null">#{updateDate},</if>
|
||||
<if test="activeFlag != null">#{activeFlag},</if>
|
||||
<if test="poLine != null">#{poLine},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWmsRawInstockDetail" parameterType="WmsRawInstockDetail">
|
||||
update wms_raw_instock_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="rawInstockId != null">raw_instock_id = #{rawInstockId},</if>
|
||||
<if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if>
|
||||
<if test="materialBarcode != null and materialBarcode != ''">material_barcode = #{materialBarcode},</if>
|
||||
<if test="instockBatch != null">instock_batch = #{instockBatch},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="poNo != null">po_no = #{poNo},</if>
|
||||
<if test="materialProductionDate != null">material_production_date = #{materialProductionDate},</if>
|
||||
<if test="planAmount != null">plan_amount = #{planAmount},</if>
|
||||
<if test="instockAmount != null">instock_amount = #{instockAmount},</if>
|
||||
<if test="executeStatus != null and executeStatus != ''">execute_status = #{executeStatus},</if>
|
||||
<if test="erpStatus != null">erp_status = #{erpStatus},</if>
|
||||
<if test="instockPerson != null">instock_person = #{instockPerson},</if>
|
||||
<if test="instockTime != null">instock_time = #{instockTime},</if>
|
||||
<if test="instockWay != null and instockWay != ''">instock_way = #{instockWay},</if>
|
||||
<if test="machineName != null">machine_name = #{machineName},</if>
|
||||
<if test="qualityStatus != null">quality_status = #{qualityStatus},</if>
|
||||
<if test="stackAmount != null">stack_amount = #{stackAmount},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createDate != null">create_date = #{createDate},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateDate != null">update_date = #{updateDate},</if>
|
||||
<if test="activeFlag != null">active_flag = #{activeFlag},</if>
|
||||
<if test="poLine != null">po_line = #{poLine},</if>
|
||||
</trim>
|
||||
where raw_instock_detail_id = #{rawInstockDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWmsRawInstockDetailByRawInstockDetailId" parameterType="Long">
|
||||
delete from wms_raw_instock_detail where raw_instock_detail_id = #{rawInstockDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWmsRawInstockDetailByRawInstockDetailIds" parameterType="String">
|
||||
delete from wms_raw_instock_detail where raw_instock_detail_id in
|
||||
<foreach item="rawInstockDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{rawInstockDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue