1
This commit is contained in:
parent
677528e8bb
commit
7664edab4a
|
|
@ -5,7 +5,9 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import com.ruoyi.app.domain.AppGoods;
|
||||
import com.ruoyi.app.domain.AppLocation;
|
||||
import com.ruoyi.app.domain.AppStock;
|
||||
import com.ruoyi.app.service.IAppGoodsService;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.web.controller.section.EnhanceDataList;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
|
@ -137,4 +139,17 @@ public class AppGoodsController extends BaseController {
|
|||
appGoodsService.changeGoodsIsEnableStatus(goodsIds);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,45 @@ public class AppPmsController extends BaseController {
|
|||
|
||||
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入库单请求
|
||||
*/
|
||||
|
|
@ -72,17 +111,20 @@ public class AppPmsController extends BaseController {
|
|||
return error("缺少请求数据。");
|
||||
}
|
||||
// 判断入库单号是否重复
|
||||
AppPmsOrderIn existAppPmsOrderIn = appPmsOrderInService.selectAppPmsOrderInByListId(orderInRequest.getListId());
|
||||
if (existAppPmsOrderIn != null) {
|
||||
AppPmsOrderIn pmsOrderIn = new AppPmsOrderIn();
|
||||
pmsOrderIn.setListId(orderInRequest.getListId());
|
||||
List<AppPmsOrderIn> appPmsOrderIns = appPmsOrderInService.selectAppPmsOrderInList(pmsOrderIn);
|
||||
if (CollectionUtils.isNotEmpty(appPmsOrderIns)) {
|
||||
return AjaxResult.error("入库单已存在");
|
||||
}
|
||||
AppPmsOrderIn appPmsOrderIn = new 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.setUsedNum(BigDecimal.valueOf(0));
|
||||
appPmsOrderIn.setRemainingNum(BigDecimal.valueOf(orderInRequest.getGoodsNum()));
|
||||
appPmsOrderIn.setOrderStatus(Long.valueOf(0));
|
||||
appPmsOrderIn.setOrderStatus(0);
|
||||
appPmsOrderIn.setCreateTime(new Date());
|
||||
appPmsOrderIn.setUpdateTime(new Date());
|
||||
|
||||
|
|
@ -109,7 +151,8 @@ public class AppPmsController extends BaseController {
|
|||
int insertRow = 0;
|
||||
// 判断请求数据完整性
|
||||
//生成wms统一订单号
|
||||
String orderId= OrderCodeFactory.getOrderCode("WMS", "");
|
||||
String id= OrderCodeFactory.getOrderCode("", "");
|
||||
String orderId= OrderCodeFactory.getOrderCode("CK", "");
|
||||
for(PmsOrderOutRequest orderOutRequest : orderOutRequests) {
|
||||
//如果是内部inner=true,不需要判断listId
|
||||
if(!orderOutRequest.isInner()){
|
||||
|
|
@ -124,9 +167,11 @@ public class AppPmsController extends BaseController {
|
|||
return error("请求数据不完整。");
|
||||
}
|
||||
// 判断出库单号是否重复
|
||||
AppPmsOrderOut existAppPmsOrderOut = appPmsOrderOutService.selectAppPmsOrderOutByListId(orderOutRequest.getListId());
|
||||
if (existAppPmsOrderOut != null) {
|
||||
return error("出库单号重复。");
|
||||
if(!orderOutRequest.isInner()) {
|
||||
AppPmsOrderOut existAppPmsOrderOut = appPmsOrderOutService.selectAppPmsOrderOutByListId(orderOutRequest.getListId());
|
||||
if (existAppPmsOrderOut != null) {
|
||||
return error("出库单号重复。");
|
||||
}
|
||||
}
|
||||
//查询库存是否足够
|
||||
AppStock appStock = new AppStock();
|
||||
|
|
@ -147,7 +192,7 @@ public class AppPmsController extends BaseController {
|
|||
|
||||
AppPmsOrderOut appPmsOrderOut = new AppPmsOrderOut();
|
||||
appPmsOrderOut.setRecordId(UUID.randomUUID().toString());
|
||||
appPmsOrderOut.setOrderId(orderId);
|
||||
appPmsOrderOut.setOrderId(id);
|
||||
if(orderOutRequest.isInner()){
|
||||
appPmsOrderOut.setListId(orderId);
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -69,10 +69,10 @@ public class AppPmsOrderInController extends BaseController
|
|||
* 获取【请填写功能名称】详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:in:query')")
|
||||
@GetMapping(value = "/{listId}")
|
||||
public AjaxResult getInfo(@PathVariable("listId") String listId)
|
||||
@GetMapping(value = "/{id}")
|
||||
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')")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{listIds}")
|
||||
public AjaxResult remove(@PathVariable String[] listIds)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(appPmsOrderInService.deleteAppPmsOrderInByListIds(listIds));
|
||||
return toAjax(appPmsOrderInService.deleteAppPmsOrderInByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -498,13 +498,13 @@ public class AppTaskController extends BaseController
|
|||
//更新pms任务表
|
||||
AppPmsOrderIn appPmsOrderIn1 = new AppPmsOrderIn();
|
||||
appPmsOrderIn1.setGoodsId(appTask2.getGoodsId());
|
||||
appPmsOrderIn1.setOrderStatus(Long.valueOf(0));
|
||||
appPmsOrderIn1.setOrderStatus(0);
|
||||
List<AppPmsOrderIn> appPmsOrderIns1 = appPmsOrderInService.selectAppPmsOrderInList(appPmsOrderIn1);
|
||||
if(ObjectUtil.isEmpty(appPmsOrderIns1)){
|
||||
return error("物料未绑定托盘");
|
||||
}
|
||||
AppPmsOrderIn appPmsOrderIn2 = appPmsOrderIns1.get(0);
|
||||
appPmsOrderIn2.setOrderStatus(2L);
|
||||
appPmsOrderIn2.setOrderStatus(2);
|
||||
appPmsOrderIn2.setUsedNum(BigDecimal.valueOf(orderInRequest.getGoodsNum()));
|
||||
appPmsOrderIn2.setRemainingNum(appPmsOrderIn2.getGoodsNum().subtract(BigDecimal.valueOf(orderInRequest.getGoodsNum())));
|
||||
int i1 = appPmsOrderInService.updateAppPmsOrderIn(appPmsOrderIn2);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ public class PmsOrderInRequest {
|
|||
* 物料描述
|
||||
*/
|
||||
private String goodsDesc;
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
private String goodsName;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
|
|
@ -49,6 +53,14 @@ public class PmsOrderInRequest {
|
|||
*/
|
||||
private String spare2;
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getListId() {
|
||||
return listId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,13 @@ public class AppGoods extends BaseEntity {
|
|||
/**
|
||||
* 物料名称/描述
|
||||
*/
|
||||
@Excel(name = "物料描述")
|
||||
@Excel(name = "物料名称")
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 物料名称/描述
|
||||
*/
|
||||
@Excel(name = "物料描述")
|
||||
private String goodsDesc;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
|
|
@ -60,7 +64,8 @@ public class AppGoods extends BaseEntity {
|
|||
*/
|
||||
@Excel(name = "状态", readConverterExp = "0=启用,1=禁用")
|
||||
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")
|
||||
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() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,13 +15,15 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
public class AppPmsOrderIn extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
// 主键
|
||||
|
||||
private String id;
|
||||
/** 入库单号 */
|
||||
private String listId;
|
||||
|
||||
/** 订单类型 */
|
||||
@Excel(name = "订单类型")
|
||||
private Long orderType;
|
||||
private Integer orderType;
|
||||
|
||||
/** 客户ID */
|
||||
@Excel(name = "客户ID")
|
||||
|
|
@ -69,7 +71,7 @@ public class AppPmsOrderIn extends BaseEntity
|
|||
|
||||
/** 订单状态 */
|
||||
@Excel(name = "订单状态")
|
||||
private Long orderStatus;
|
||||
private Integer orderStatus;
|
||||
|
||||
public void setListId(String listId)
|
||||
{
|
||||
|
|
@ -80,20 +82,32 @@ public class AppPmsOrderIn extends BaseEntity
|
|||
{
|
||||
return listId;
|
||||
}
|
||||
public void setOrderType(Long orderType)
|
||||
{
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public Long getOrderType()
|
||||
{
|
||||
return orderType;
|
||||
}
|
||||
public void setCustomerId(String 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()
|
||||
{
|
||||
return customerId;
|
||||
|
|
@ -188,13 +202,8 @@ public class AppPmsOrderIn extends BaseEntity
|
|||
{
|
||||
return spare2;
|
||||
}
|
||||
public void setOrderStatus(Long orderStatus)
|
||||
{
|
||||
this.orderStatus = orderStatus;
|
||||
}
|
||||
|
||||
public Long getOrderStatus()
|
||||
{
|
||||
public Integer getOrderStatus() {
|
||||
return orderStatus;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,4 +77,5 @@ public interface AppGoodsMapper
|
|||
*/
|
||||
List<AppGoods> selectAppGoodsListByIds(String[] goodsIds);
|
||||
|
||||
List<AppGoods> queryListByGoodsId(String goodsId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,10 @@ public interface AppPmsOrderInMapper
|
|||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param listId 【请填写功能名称】主键
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public AppPmsOrderIn selectAppPmsOrderInByListId(String listId);
|
||||
|
||||
public AppPmsOrderIn selectAppPmsOrderInById(String id);
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
|
|
@ -52,7 +51,7 @@ public interface AppPmsOrderInMapper
|
|||
* @param listId 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderInByListId(String listId);
|
||||
public int deleteAppPmsOrderInById(String id);
|
||||
|
||||
|
||||
public List<AppPmsOrderIn> selectAppPmsOrderInListWithParam(@Param("param") String param);
|
||||
|
|
@ -60,8 +59,8 @@ public interface AppPmsOrderInMapper
|
|||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param listIds 需要删除的数据主键集合
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderInByListIds(String[] listIds);
|
||||
public int deleteAppPmsOrderInByIds(String[] ids);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,4 +81,6 @@ public interface IAppGoodsService
|
|||
* @return
|
||||
*/
|
||||
String importGoods(List<AppGoods> appGoodsList, boolean updateSupport);
|
||||
|
||||
List<AppGoods> queryListByGoodsId(String goodsId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ public interface IAppPmsOrderInService
|
|||
* @param listId 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public AppPmsOrderIn selectAppPmsOrderInByListId(String listId);
|
||||
|
||||
public AppPmsOrderIn selectAppPmsOrderInById(String listId);
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
|
|
@ -52,7 +51,7 @@ public interface IAppPmsOrderInService
|
|||
* @param listIds 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderInByListIds(String[] listIds);
|
||||
public int deleteAppPmsOrderInByIds(String[] listIds);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
|
|
@ -60,7 +59,7 @@ public interface IAppPmsOrderInService
|
|||
* @param listId 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppPmsOrderInByListId(String listId);
|
||||
public int deleteAppPmsOrderInById(String listId);
|
||||
|
||||
public List<AppPmsOrderIn> getInfoWithString(String param);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.app.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
|
|
@ -159,4 +160,9 @@ public class AppGoodsServiceImpl implements IAppGoodsService {
|
|||
}
|
||||
return successMsg.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppGoods> queryListByGoodsId(String goodsId) {
|
||||
return appGoodsMapper.queryListByGoodsId(goodsId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ public class AppPmsOrderInServiceImpl implements IAppPmsOrderInService
|
|||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@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 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppPmsOrderInByListIds(String[] listIds)
|
||||
public int deleteAppPmsOrderInByIds(String[] listIds)
|
||||
{
|
||||
return appPmsOrderInMapper.deleteAppPmsOrderInByListIds(listIds);
|
||||
return appPmsOrderInMapper.deleteAppPmsOrderInByIds(listIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param listId 【请填写功能名称】主键
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppPmsOrderInByListId(String listId)
|
||||
public int deleteAppPmsOrderInById(String id)
|
||||
{
|
||||
return appPmsOrderInMapper.deleteAppPmsOrderInByListId(listId);
|
||||
return appPmsOrderInMapper.deleteAppPmsOrderInById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -15,10 +15,12 @@
|
|||
<result property="remark" column="remark" />
|
||||
<result property="lastUpdateUser" column="last_update_user" />
|
||||
<result property="lastUpdateTime" column="last_update_time" />
|
||||
<result property="goodsDesc" column="goods_desc" />
|
||||
<result property="goodsCode" column="goods_code" />
|
||||
</resultMap>
|
||||
|
||||
<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>
|
||||
|
||||
<select id="selectAppGoodsList" parameterType="AppGoods" resultMap="AppGoodsResult">
|
||||
|
|
@ -26,6 +28,8 @@
|
|||
<where>
|
||||
<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="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="goodsType != null and goodsType != ''"> and goods_type = #{goodsType}</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>
|
||||
</where>
|
||||
</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">
|
||||
<include refid="selectAppGoodsVo"/>
|
||||
where id = #{id}
|
||||
|
|
@ -58,6 +74,8 @@
|
|||
<if test="remark != null">remark,</if>
|
||||
<if test="lastUpdateUser != null">last_update_user,</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 prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
|
|
@ -70,6 +88,8 @@
|
|||
<if test="remark != null">#{remark},</if>
|
||||
<if test="lastUpdateUser != null">#{lastUpdateUser},</if>
|
||||
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
||||
<if test="goodsDesc != null">#{goodsDesc},</if>
|
||||
<if test="goodsCode != null">#{goodsCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -85,6 +105,8 @@
|
|||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="lastUpdateUser != null">last_update_user = #{lastUpdateUser},</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>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
<mapper namespace="com.ruoyi.app.mapper.AppPmsOrderInMapper">
|
||||
|
||||
<resultMap type="AppPmsOrderIn" id="AppPmsOrderInResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="listId" column="list_id" />
|
||||
<result property="listId" column="list_id" />
|
||||
<result property="orderType" column="order_type" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
|
|
@ -22,6 +24,7 @@
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="AppPendingStorage" id="AppEmptyOrderInResult">
|
||||
|
|
@ -46,7 +49,7 @@
|
|||
</resultMap>
|
||||
|
||||
<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>
|
||||
|
||||
<select id="selectAppPmsOrderInList" parameterType="AppPmsOrderIn" resultMap="AppPmsOrderInResult">
|
||||
|
|
@ -70,12 +73,10 @@
|
|||
|
||||
</select>
|
||||
|
||||
<select id="selectAppPmsOrderInByListId" parameterType="String" resultMap="AppPmsOrderInResult">
|
||||
<select id="selectAppPmsOrderInById" parameterType="String" resultMap="AppPmsOrderInResult">
|
||||
<include refid="selectAppPmsOrderInVo"/>
|
||||
where list_id = #{listId}
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectAppPmsOrderInListWithParam" parameterType="String" resultMap="AppPmsOrderInResult">
|
||||
<include refid="selectAppPmsOrderInVo"/>
|
||||
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 into app_pms_order_in
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="listId != null">list_id,</if>
|
||||
<if test="orderType != null">order_type,</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="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="listId != null">#{listId},</if>
|
||||
<if test="orderType != null">#{orderType},</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="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
</trim>
|
||||
</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="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where list_id = #{listId}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAppPmsOrderInByListId" parameterType="String">
|
||||
delete from app_pms_order_in where list_id = #{listId}
|
||||
<delete id="deleteAppPmsOrderInById" parameterType="String">
|
||||
delete from app_pms_order_in where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAppPmsOrderInByListIds" parameterType="String">
|
||||
delete from app_pms_order_in where list_id in
|
||||
<foreach item="listId" collection="array" open="(" separator="," close=")">
|
||||
#{listId}
|
||||
<delete id="deleteAppPmsOrderInByIds" parameterType="String">
|
||||
delete from app_pms_order_in where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user