This commit is contained in:
15066119699 2025-03-11 12:33:15 +08:00
parent 677528e8bb
commit 7664edab4a
15 changed files with 204 additions and 68 deletions

View File

@ -5,7 +5,9 @@ import javax.servlet.http.HttpServletResponse;
import com.ruoyi.app.domain.AppGoods; import com.ruoyi.app.domain.AppGoods;
import com.ruoyi.app.domain.AppLocation; import com.ruoyi.app.domain.AppLocation;
import com.ruoyi.app.domain.AppStock;
import com.ruoyi.app.service.IAppGoodsService; import com.ruoyi.app.service.IAppGoodsService;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.web.controller.section.EnhanceDataList; import com.ruoyi.web.controller.section.EnhanceDataList;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
@ -137,4 +139,17 @@ public class AppGoodsController extends BaseController {
appGoodsService.changeGoodsIsEnableStatus(goodsIds); appGoodsService.changeGoodsIsEnableStatus(goodsIds);
return success("修改状态成功"); return success("修改状态成功");
} }
/**
* 模糊搜索物料信息列表根据物料Id
*/
@GetMapping(value = "/queryListByGoodsId")
public AjaxResult queryListByGoodsId(AppGoods appGoods)
{
if(StringUtils.isBlank(appGoods.getGoodsId())){
return error("查询物料编号不能为空");
}
List<AppGoods> appGoodsList = appGoodsService.queryListByGoodsId(appGoods.getGoodsId());
return success("查询成功",appGoodsList);
}
} }

View File

@ -50,6 +50,45 @@ public class AppPmsController extends BaseController {
private final List<Integer> orderInTypeList = Arrays.asList(1, 2, 3, 4, 5, 6,7,8); private final List<Integer> orderInTypeList = Arrays.asList(1, 2, 3, 4, 5, 6,7,8);
/**
* Pms入库单请求
*/
@ApiOperation("手动入库单请求")
@Log(title = "手动入库单请求", skipAuth = true)
@PostMapping("/orderInList")
public AjaxResult manualOrderIn(@RequestBody List<PmsOrderInRequest> orderInRequestList) {
logger.info("手动入库单请求:{}", orderInRequestList);
// TODO
// 判断数据是否缺失
String orderId= OrderCodeFactory.getOrderCode("RK", "");
for(PmsOrderInRequest orderInRequest : orderInRequestList) {
if (StringUtils.isEmpty(orderInRequest.getGoodsId())
|| StringUtils.isEmpty(orderInRequest.getGoodsDesc())
|| orderInRequest.getGoodsNum() == null || orderInRequest.getGoodsNum() <=0) {
return error("缺少请求数据。");
}
AppPmsOrderIn appPmsOrderIn = new AppPmsOrderIn();
BeanUtils.copyProperties(orderInRequest, appPmsOrderIn);
appPmsOrderIn.setId(OrderCodeFactory.getOrderCode("",""));
appPmsOrderIn.setListId(orderId);
appPmsOrderIn.setOrderType(9);
appPmsOrderIn.setGoodsNum(BigDecimal.valueOf(orderInRequest.getGoodsNum()));
appPmsOrderIn.setUsedNum(BigDecimal.ZERO);
appPmsOrderIn.setRemainingNum(BigDecimal.valueOf(orderInRequest.getGoodsNum()));
appPmsOrderIn.setOrderStatus(0);
appPmsOrderIn.setCreateTime(new Date());
appPmsOrderIn.setUpdateTime(new Date());
appPmsOrderIn.setCreateBy(getUsername());
appPmsOrderInService.insertAppPmsOrderIn(appPmsOrderIn);
}
return AjaxResult.success("success");
}
/** /**
* Pms入库单请求 * Pms入库单请求
*/ */
@ -72,17 +111,20 @@ public class AppPmsController extends BaseController {
return error("缺少请求数据。"); return error("缺少请求数据。");
} }
// 判断入库单号是否重复 // 判断入库单号是否重复
AppPmsOrderIn existAppPmsOrderIn = appPmsOrderInService.selectAppPmsOrderInByListId(orderInRequest.getListId()); AppPmsOrderIn pmsOrderIn = new AppPmsOrderIn();
if (existAppPmsOrderIn != null) { pmsOrderIn.setListId(orderInRequest.getListId());
List<AppPmsOrderIn> appPmsOrderIns = appPmsOrderInService.selectAppPmsOrderInList(pmsOrderIn);
if (CollectionUtils.isNotEmpty(appPmsOrderIns)) {
return AjaxResult.error("入库单已存在"); return AjaxResult.error("入库单已存在");
} }
AppPmsOrderIn appPmsOrderIn = new AppPmsOrderIn(); AppPmsOrderIn appPmsOrderIn = new AppPmsOrderIn();
BeanUtils.copyProperties(orderInRequest, appPmsOrderIn); BeanUtils.copyProperties(orderInRequest, appPmsOrderIn);
appPmsOrderIn.setOrderType(Long.valueOf(orderInRequest.getOrderType())); appPmsOrderIn.setId(OrderCodeFactory.getOrderCode("",""));
appPmsOrderIn.setOrderType(orderInRequest.getOrderType());
appPmsOrderIn.setGoodsNum(BigDecimal.valueOf(orderInRequest.getGoodsNum())); appPmsOrderIn.setGoodsNum(BigDecimal.valueOf(orderInRequest.getGoodsNum()));
appPmsOrderIn.setUsedNum(BigDecimal.valueOf(0)); appPmsOrderIn.setUsedNum(BigDecimal.valueOf(0));
appPmsOrderIn.setRemainingNum(BigDecimal.valueOf(orderInRequest.getGoodsNum())); appPmsOrderIn.setRemainingNum(BigDecimal.valueOf(orderInRequest.getGoodsNum()));
appPmsOrderIn.setOrderStatus(Long.valueOf(0)); appPmsOrderIn.setOrderStatus(0);
appPmsOrderIn.setCreateTime(new Date()); appPmsOrderIn.setCreateTime(new Date());
appPmsOrderIn.setUpdateTime(new Date()); appPmsOrderIn.setUpdateTime(new Date());
@ -109,7 +151,8 @@ public class AppPmsController extends BaseController {
int insertRow = 0; int insertRow = 0;
// 判断请求数据完整性 // 判断请求数据完整性
//生成wms统一订单号 //生成wms统一订单号
String orderId= OrderCodeFactory.getOrderCode("WMS", ""); String id= OrderCodeFactory.getOrderCode("", "");
String orderId= OrderCodeFactory.getOrderCode("CK", "");
for(PmsOrderOutRequest orderOutRequest : orderOutRequests) { for(PmsOrderOutRequest orderOutRequest : orderOutRequests) {
//如果是内部inner=true不需要判断listId //如果是内部inner=true不需要判断listId
if(!orderOutRequest.isInner()){ if(!orderOutRequest.isInner()){
@ -124,9 +167,11 @@ public class AppPmsController extends BaseController {
return error("请求数据不完整。"); return error("请求数据不完整。");
} }
// 判断出库单号是否重复 // 判断出库单号是否重复
AppPmsOrderOut existAppPmsOrderOut = appPmsOrderOutService.selectAppPmsOrderOutByListId(orderOutRequest.getListId()); if(!orderOutRequest.isInner()) {
if (existAppPmsOrderOut != null) { AppPmsOrderOut existAppPmsOrderOut = appPmsOrderOutService.selectAppPmsOrderOutByListId(orderOutRequest.getListId());
return error("出库单号重复。"); if (existAppPmsOrderOut != null) {
return error("出库单号重复。");
}
} }
//查询库存是否足够 //查询库存是否足够
AppStock appStock = new AppStock(); AppStock appStock = new AppStock();
@ -147,7 +192,7 @@ public class AppPmsController extends BaseController {
AppPmsOrderOut appPmsOrderOut = new AppPmsOrderOut(); AppPmsOrderOut appPmsOrderOut = new AppPmsOrderOut();
appPmsOrderOut.setRecordId(UUID.randomUUID().toString()); appPmsOrderOut.setRecordId(UUID.randomUUID().toString());
appPmsOrderOut.setOrderId(orderId); appPmsOrderOut.setOrderId(id);
if(orderOutRequest.isInner()){ if(orderOutRequest.isInner()){
appPmsOrderOut.setListId(orderId); appPmsOrderOut.setListId(orderId);
}else { }else {

View File

@ -69,10 +69,10 @@ public class AppPmsOrderInController extends BaseController
* 获取请填写功能名称详细信息 * 获取请填写功能名称详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:in:query')") @PreAuthorize("@ss.hasPermi('system:in:query')")
@GetMapping(value = "/{listId}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("listId") String listId) public AjaxResult getInfo(@PathVariable("id") String id)
{ {
return success(appPmsOrderInService.selectAppPmsOrderInByListId(listId)); return success(appPmsOrderInService.selectAppPmsOrderInById(id));
} }
/** /**
@ -102,10 +102,10 @@ public class AppPmsOrderInController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:in:remove')") @PreAuthorize("@ss.hasPermi('system:in:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{listIds}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] listIds) public AjaxResult remove(@PathVariable String[] ids)
{ {
return toAjax(appPmsOrderInService.deleteAppPmsOrderInByListIds(listIds)); return toAjax(appPmsOrderInService.deleteAppPmsOrderInByIds(ids));
} }

View File

@ -498,13 +498,13 @@ public class AppTaskController extends BaseController
//更新pms任务表 //更新pms任务表
AppPmsOrderIn appPmsOrderIn1 = new AppPmsOrderIn(); AppPmsOrderIn appPmsOrderIn1 = new AppPmsOrderIn();
appPmsOrderIn1.setGoodsId(appTask2.getGoodsId()); appPmsOrderIn1.setGoodsId(appTask2.getGoodsId());
appPmsOrderIn1.setOrderStatus(Long.valueOf(0)); appPmsOrderIn1.setOrderStatus(0);
List<AppPmsOrderIn> appPmsOrderIns1 = appPmsOrderInService.selectAppPmsOrderInList(appPmsOrderIn1); List<AppPmsOrderIn> appPmsOrderIns1 = appPmsOrderInService.selectAppPmsOrderInList(appPmsOrderIn1);
if(ObjectUtil.isEmpty(appPmsOrderIns1)){ if(ObjectUtil.isEmpty(appPmsOrderIns1)){
return error("物料未绑定托盘"); return error("物料未绑定托盘");
} }
AppPmsOrderIn appPmsOrderIn2 = appPmsOrderIns1.get(0); AppPmsOrderIn appPmsOrderIn2 = appPmsOrderIns1.get(0);
appPmsOrderIn2.setOrderStatus(2L); appPmsOrderIn2.setOrderStatus(2);
appPmsOrderIn2.setUsedNum(BigDecimal.valueOf(orderInRequest.getGoodsNum())); appPmsOrderIn2.setUsedNum(BigDecimal.valueOf(orderInRequest.getGoodsNum()));
appPmsOrderIn2.setRemainingNum(appPmsOrderIn2.getGoodsNum().subtract(BigDecimal.valueOf(orderInRequest.getGoodsNum()))); appPmsOrderIn2.setRemainingNum(appPmsOrderIn2.getGoodsNum().subtract(BigDecimal.valueOf(orderInRequest.getGoodsNum())));
int i1 = appPmsOrderInService.updateAppPmsOrderIn(appPmsOrderIn2); int i1 = appPmsOrderInService.updateAppPmsOrderIn(appPmsOrderIn2);

View File

@ -36,6 +36,10 @@ public class PmsOrderInRequest {
* 物料描述 * 物料描述
*/ */
private String goodsDesc; private String goodsDesc;
/**
* 物料描述
*/
private String goodsName;
/** /**
* 单位 * 单位
*/ */
@ -49,6 +53,14 @@ public class PmsOrderInRequest {
*/ */
private String spare2; private String spare2;
public String getGoodsName() {
return goodsName;
}
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
public String getListId() { public String getListId() {
return listId; return listId;
} }

View File

@ -29,9 +29,13 @@ public class AppGoods extends BaseEntity {
/** /**
* 物料名称/描述 * 物料名称/描述
*/ */
@Excel(name = "物料描述") @Excel(name = "物料名称")
private String goodsName; private String goodsName;
/**
* 物料名称/描述
*/
@Excel(name = "物料描述")
private String goodsDesc;
/** /**
* 单位 * 单位
*/ */
@ -60,7 +64,8 @@ public class AppGoods extends BaseEntity {
*/ */
@Excel(name = "状态", readConverterExp = "0=启用,1=禁用") @Excel(name = "状态", readConverterExp = "0=启用,1=禁用")
private Long goodsStatus; private Long goodsStatus;
@Excel(name = "物料条码")
private String goodsCode;
/** /**
* 最近更新用户 * 最近更新用户
*/ */
@ -74,6 +79,22 @@ public class AppGoods extends BaseEntity {
// @Excel(name = "最近更新时间", width = 30, dateFormat = "yyyy-MM-dd") // @Excel(name = "最近更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date lastUpdateTime; private Date lastUpdateTime;
public String getGoodsDesc() {
return goodsDesc;
}
public String getGoodsCode() {
return goodsCode;
}
public void setGoodsCode(String goodsCode) {
this.goodsCode = goodsCode;
}
public void setGoodsDesc(String goodsDesc) {
this.goodsDesc = goodsDesc;
}
public Long getId() { public Long getId() {
return id; return id;
} }

View File

@ -15,13 +15,15 @@ import com.ruoyi.common.core.domain.BaseEntity;
public class AppPmsOrderIn extends BaseEntity public class AppPmsOrderIn extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键
private String id;
/** 入库单号 */ /** 入库单号 */
private String listId; private String listId;
/** 订单类型 */ /** 订单类型 */
@Excel(name = "订单类型") @Excel(name = "订单类型")
private Long orderType; private Integer orderType;
/** 客户ID */ /** 客户ID */
@Excel(name = "客户ID") @Excel(name = "客户ID")
@ -69,7 +71,7 @@ public class AppPmsOrderIn extends BaseEntity
/** 订单状态 */ /** 订单状态 */
@Excel(name = "订单状态") @Excel(name = "订单状态")
private Long orderStatus; private Integer orderStatus;
public void setListId(String listId) public void setListId(String listId)
{ {
@ -80,20 +82,32 @@ public class AppPmsOrderIn extends BaseEntity
{ {
return listId; return listId;
} }
public void setOrderType(Long orderType)
{
this.orderType = orderType;
}
public Long getOrderType()
{
return orderType;
}
public void setCustomerId(String customerId) public void setCustomerId(String customerId)
{ {
this.customerId = customerId; this.customerId = customerId;
} }
public Integer getOrderType() {
return orderType;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
public void setOrderStatus(Integer orderStatus) {
this.orderStatus = orderStatus;
}
public String getCustomerId() public String getCustomerId()
{ {
return customerId; return customerId;
@ -188,13 +202,8 @@ public class AppPmsOrderIn extends BaseEntity
{ {
return spare2; return spare2;
} }
public void setOrderStatus(Long orderStatus)
{
this.orderStatus = orderStatus;
}
public Long getOrderStatus() public Integer getOrderStatus() {
{
return orderStatus; return orderStatus;
} }

View File

@ -77,4 +77,5 @@ public interface AppGoodsMapper
*/ */
List<AppGoods> selectAppGoodsListByIds(String[] goodsIds); List<AppGoods> selectAppGoodsListByIds(String[] goodsIds);
List<AppGoods> queryListByGoodsId(String goodsId);
} }

View File

@ -17,11 +17,10 @@ public interface AppPmsOrderInMapper
/** /**
* 查询请填写功能名称 * 查询请填写功能名称
* *
* @param listId 请填写功能名称主键 * @param id 请填写功能名称主键
* @return 请填写功能名称 * @return 请填写功能名称
*/ */
public AppPmsOrderIn selectAppPmsOrderInByListId(String listId); public AppPmsOrderIn selectAppPmsOrderInById(String id);
/** /**
* 查询请填写功能名称列表 * 查询请填写功能名称列表
* *
@ -52,7 +51,7 @@ public interface AppPmsOrderInMapper
* @param listId 请填写功能名称主键 * @param listId 请填写功能名称主键
* @return 结果 * @return 结果
*/ */
public int deleteAppPmsOrderInByListId(String listId); public int deleteAppPmsOrderInById(String id);
public List<AppPmsOrderIn> selectAppPmsOrderInListWithParam(@Param("param") String param); public List<AppPmsOrderIn> selectAppPmsOrderInListWithParam(@Param("param") String param);
@ -60,8 +59,8 @@ public interface AppPmsOrderInMapper
/** /**
* 批量删除请填写功能名称 * 批量删除请填写功能名称
* *
* @param listIds 需要删除的数据主键集合 * @param ids 需要删除的数据主键集合
* @return 结果 * @return 结果
*/ */
public int deleteAppPmsOrderInByListIds(String[] listIds); public int deleteAppPmsOrderInByIds(String[] ids);
} }

View File

@ -81,4 +81,6 @@ public interface IAppGoodsService
* @return * @return
*/ */
String importGoods(List<AppGoods> appGoodsList, boolean updateSupport); String importGoods(List<AppGoods> appGoodsList, boolean updateSupport);
List<AppGoods> queryListByGoodsId(String goodsId);
} }

View File

@ -20,8 +20,7 @@ public interface IAppPmsOrderInService
* @param listId 请填写功能名称主键 * @param listId 请填写功能名称主键
* @return 请填写功能名称 * @return 请填写功能名称
*/ */
public AppPmsOrderIn selectAppPmsOrderInByListId(String listId); public AppPmsOrderIn selectAppPmsOrderInById(String listId);
/** /**
* 查询请填写功能名称列表 * 查询请填写功能名称列表
* *
@ -52,7 +51,7 @@ public interface IAppPmsOrderInService
* @param listIds 需要删除的请填写功能名称主键集合 * @param listIds 需要删除的请填写功能名称主键集合
* @return 结果 * @return 结果
*/ */
public int deleteAppPmsOrderInByListIds(String[] listIds); public int deleteAppPmsOrderInByIds(String[] listIds);
/** /**
* 删除请填写功能名称信息 * 删除请填写功能名称信息
@ -60,7 +59,7 @@ public interface IAppPmsOrderInService
* @param listId 请填写功能名称主键 * @param listId 请填写功能名称主键
* @return 结果 * @return 结果
*/ */
public int deleteAppPmsOrderInByListId(String listId); public int deleteAppPmsOrderInById(String listId);
public List<AppPmsOrderIn> getInfoWithString(String param); public List<AppPmsOrderIn> getInfoWithString(String param);

View File

@ -1,5 +1,6 @@
package com.ruoyi.app.service.impl; package com.ruoyi.app.service.impl;
import java.util.Collections;
import java.util.List; import java.util.List;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
@ -159,4 +160,9 @@ public class AppGoodsServiceImpl implements IAppGoodsService {
} }
return successMsg.toString(); return successMsg.toString();
} }
@Override
public List<AppGoods> queryListByGoodsId(String goodsId) {
return appGoodsMapper.queryListByGoodsId(goodsId);
}
} }

View File

@ -40,9 +40,9 @@ public class AppPmsOrderInServiceImpl implements IAppPmsOrderInService
* @return 请填写功能名称 * @return 请填写功能名称
*/ */
@Override @Override
public AppPmsOrderIn selectAppPmsOrderInByListId(String listId) public AppPmsOrderIn selectAppPmsOrderInById(String id)
{ {
return appPmsOrderInMapper.selectAppPmsOrderInByListId(listId); return appPmsOrderInMapper.selectAppPmsOrderInById(id);
} }
/** /**
@ -88,21 +88,21 @@ public class AppPmsOrderInServiceImpl implements IAppPmsOrderInService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteAppPmsOrderInByListIds(String[] listIds) public int deleteAppPmsOrderInByIds(String[] listIds)
{ {
return appPmsOrderInMapper.deleteAppPmsOrderInByListIds(listIds); return appPmsOrderInMapper.deleteAppPmsOrderInByIds(listIds);
} }
/** /**
* 删除请填写功能名称信息 * 删除请填写功能名称信息
* *
* @param listId 请填写功能名称主键 * @param id 请填写功能名称主键
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteAppPmsOrderInByListId(String listId) public int deleteAppPmsOrderInById(String id)
{ {
return appPmsOrderInMapper.deleteAppPmsOrderInByListId(listId); return appPmsOrderInMapper.deleteAppPmsOrderInById(id);
} }
@Override @Override

View File

@ -15,10 +15,12 @@
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="lastUpdateUser" column="last_update_user" /> <result property="lastUpdateUser" column="last_update_user" />
<result property="lastUpdateTime" column="last_update_time" /> <result property="lastUpdateTime" column="last_update_time" />
<result property="goodsDesc" column="goods_desc" />
<result property="goodsCode" column="goods_code" />
</resultMap> </resultMap>
<sql id="selectAppGoodsVo"> <sql id="selectAppGoodsVo">
select id, goods_id, goods_name, goods_unit, goods_type, normal_vehicle_type, goods_status, remark, last_update_user, last_update_time from app_goods select id, goods_id, goods_name, goods_unit, goods_type, normal_vehicle_type, goods_status, remark, last_update_user, last_update_time,goods_desc,goods_code from app_goods
</sql> </sql>
<select id="selectAppGoodsList" parameterType="AppGoods" resultMap="AppGoodsResult"> <select id="selectAppGoodsList" parameterType="AppGoods" resultMap="AppGoodsResult">
@ -26,6 +28,8 @@
<where> <where>
<if test="goodsId != null and goodsId != ''"> and goods_id like concat('%', #{goodsId}, '%')</if> <if test="goodsId != null and goodsId != ''"> and goods_id like concat('%', #{goodsId}, '%')</if>
<if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if> <if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
<if test="goodsDesc != null and goodsDesc != ''"> and goods_desc like concat('%', #{goodsDesc}, '%')</if>
<if test="goodsCode != null and goodsCode != ''"> and goods_code = #{goodsCode}</if>
<if test="goodsUnit != null and goodsUnit != ''"> and goods_unit = #{goodsUnit}</if> <if test="goodsUnit != null and goodsUnit != ''"> and goods_unit = #{goodsUnit}</if>
<if test="goodsType != null and goodsType != ''"> and goods_type = #{goodsType}</if> <if test="goodsType != null and goodsType != ''"> and goods_type = #{goodsType}</if>
<if test="normalVehicleType != null and normalVehicleType != ''"> and normal_vehicle_type = #{normalVehicleType}</if> <if test="normalVehicleType != null and normalVehicleType != ''"> and normal_vehicle_type = #{normalVehicleType}</if>
@ -34,7 +38,19 @@
<if test="lastUpdateTime != null "> and last_update_time = #{lastUpdateTime}</if> <if test="lastUpdateTime != null "> and last_update_time = #{lastUpdateTime}</if>
</where> </where>
</select> </select>
<select id="queryListByGoodsId" resultType="AppGoods">
select goods_id as "goodsId"
,goods_code as "goodsCode"
,goods_desc as "goodsDesc"
,goods_unit as "goodsUnit"
from app_goods
where
(goods_id like concat('%', #{goodsId}, '%') or goods_name like concat('%', #{goodsId}, '%')
or goods_desc like concat('%', #{goodsId}, '%'))
and goods_status = 0
GROUP BY goods_id,goods_code,goods_desc,goods_unit
order by goods_id
</select>
<select id="selectAppGoodsById" parameterType="String" resultMap="AppGoodsResult"> <select id="selectAppGoodsById" parameterType="String" resultMap="AppGoodsResult">
<include refid="selectAppGoodsVo"/> <include refid="selectAppGoodsVo"/>
where id = #{id} where id = #{id}
@ -58,6 +74,8 @@
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="lastUpdateUser != null">last_update_user,</if> <if test="lastUpdateUser != null">last_update_user,</if>
<if test="lastUpdateTime != null">last_update_time,</if> <if test="lastUpdateTime != null">last_update_time,</if>
<if test="goodsDesc != null">goods_desc,</if>
<if test="goodsCode != null">goods_code,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
@ -70,6 +88,8 @@
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="lastUpdateUser != null">#{lastUpdateUser},</if> <if test="lastUpdateUser != null">#{lastUpdateUser},</if>
<if test="lastUpdateTime != null">#{lastUpdateTime},</if> <if test="lastUpdateTime != null">#{lastUpdateTime},</if>
<if test="goodsDesc != null">#{goodsDesc},</if>
<if test="goodsCode != null">#{goodsCode},</if>
</trim> </trim>
</insert> </insert>
@ -85,6 +105,8 @@
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="lastUpdateUser != null">last_update_user = #{lastUpdateUser},</if> <if test="lastUpdateUser != null">last_update_user = #{lastUpdateUser},</if>
<if test="lastUpdateTime != null">last_update_time = #{lastUpdateTime},</if> <if test="lastUpdateTime != null">last_update_time = #{lastUpdateTime},</if>
<if test="goodsDesc != null">goods_desc = #{goodsDesc},</if>
<if test="goodsCode != null">goods_code = #{goodsCode},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
@ -107,4 +129,4 @@
#{id} #{id}
</foreach> </foreach>
</select> </select>
</mapper> </mapper>

View File

@ -5,6 +5,8 @@
<mapper namespace="com.ruoyi.app.mapper.AppPmsOrderInMapper"> <mapper namespace="com.ruoyi.app.mapper.AppPmsOrderInMapper">
<resultMap type="AppPmsOrderIn" id="AppPmsOrderInResult"> <resultMap type="AppPmsOrderIn" id="AppPmsOrderInResult">
<id property="id" column="id" />
<result property="listId" column="list_id" />
<result property="listId" column="list_id" /> <result property="listId" column="list_id" />
<result property="orderType" column="order_type" /> <result property="orderType" column="order_type" />
<result property="customerId" column="customer_id" /> <result property="customerId" column="customer_id" />
@ -22,6 +24,7 @@
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="createBy" column="create_by" />
</resultMap> </resultMap>
<resultMap type="AppPendingStorage" id="AppEmptyOrderInResult"> <resultMap type="AppPendingStorage" id="AppEmptyOrderInResult">
@ -46,7 +49,7 @@
</resultMap> </resultMap>
<sql id="selectAppPmsOrderInVo"> <sql id="selectAppPmsOrderInVo">
select list_id, order_type, customer_id, order_id, goods_id, goods_num, used_num, remaining_num, goods_code, goods_desc, unit, spare1, spare2, order_status, create_time, update_time, remark from app_pms_order_in select id,list_id, order_type, customer_id, order_id, goods_id, goods_num, used_num, remaining_num, goods_code, goods_desc, unit, spare1, spare2, order_status, create_time, update_time, remark,create_by from app_pms_order_in
</sql> </sql>
<select id="selectAppPmsOrderInList" parameterType="AppPmsOrderIn" resultMap="AppPmsOrderInResult"> <select id="selectAppPmsOrderInList" parameterType="AppPmsOrderIn" resultMap="AppPmsOrderInResult">
@ -70,12 +73,10 @@
</select> </select>
<select id="selectAppPmsOrderInByListId" parameterType="String" resultMap="AppPmsOrderInResult"> <select id="selectAppPmsOrderInById" parameterType="String" resultMap="AppPmsOrderInResult">
<include refid="selectAppPmsOrderInVo"/> <include refid="selectAppPmsOrderInVo"/>
where list_id = #{listId} where id = #{id}
</select> </select>
<select id="selectAppPmsOrderInListWithParam" parameterType="String" resultMap="AppPmsOrderInResult"> <select id="selectAppPmsOrderInListWithParam" parameterType="String" resultMap="AppPmsOrderInResult">
<include refid="selectAppPmsOrderInVo"/> <include refid="selectAppPmsOrderInVo"/>
where (list_id like concat('%',#{param},'%') or order_id like concat('%',#{param},'%') or goods_id like concat('%',#{param},'%') where (list_id like concat('%',#{param},'%') or order_id like concat('%',#{param},'%') or goods_id like concat('%',#{param},'%')
@ -86,6 +87,7 @@ or goods_code like concat('%',#{param},'%') or goods_desc like concat('%',#{para
<insert id="insertAppPmsOrderIn" parameterType="AppPmsOrderIn"> <insert id="insertAppPmsOrderIn" parameterType="AppPmsOrderIn">
insert into app_pms_order_in insert into app_pms_order_in
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="listId != null">list_id,</if> <if test="listId != null">list_id,</if>
<if test="orderType != null">order_type,</if> <if test="orderType != null">order_type,</if>
<if test="customerId != null and customerId != ''">customer_id,</if> <if test="customerId != null and customerId != ''">customer_id,</if>
@ -103,8 +105,10 @@ or goods_code like concat('%',#{param},'%') or goods_desc like concat('%',#{para
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="listId != null">#{listId},</if> <if test="listId != null">#{listId},</if>
<if test="orderType != null">#{orderType},</if> <if test="orderType != null">#{orderType},</if>
<if test="customerId != null and customerId != ''">#{customerId},</if> <if test="customerId != null and customerId != ''">#{customerId},</if>
@ -122,6 +126,7 @@ or goods_code like concat('%',#{param},'%') or goods_desc like concat('%',#{para
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
</trim> </trim>
</insert> </insert>
@ -145,17 +150,17 @@ or goods_code like concat('%',#{param},'%') or goods_desc like concat('%',#{para
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
</trim> </trim>
where list_id = #{listId} where id = #{id}
</update> </update>
<delete id="deleteAppPmsOrderInByListId" parameterType="String"> <delete id="deleteAppPmsOrderInById" parameterType="String">
delete from app_pms_order_in where list_id = #{listId} delete from app_pms_order_in where id = #{id}
</delete> </delete>
<delete id="deleteAppPmsOrderInByListIds" parameterType="String"> <delete id="deleteAppPmsOrderInByIds" parameterType="String">
delete from app_pms_order_in where list_id in delete from app_pms_order_in where id in
<foreach item="listId" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{listId} #{id}
</foreach> </foreach>
</delete> </delete>