平潭出库明细调整

dev_fifo1.0
anthonywj 1 year ago
parent 45b7fad953
commit 34a728e6cb

@ -9,6 +9,7 @@ import com.glxp.api.entity.thrsys.*;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.req.thrsys.*;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.thrsys.ThrInvOrderResponse;
import com.glxp.api.service.thrsys.ThrInvOrderDetailService;
import com.glxp.api.service.thrsys.ThrInvOrderService;
import org.springframework.validation.BindingResult;
@ -38,11 +39,11 @@ public class ThrInvOrderController {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<ThrInvOrder> thrInvOrders
List<ThrInvOrderResponse> thrInvOrders
= thrInvOrderService.filterThrInvOrder(filterThrInvOrderRequest);
PageInfo<ThrInvOrder> pageInfo;
PageInfo<ThrInvOrderResponse> pageInfo;
pageInfo = new PageInfo<>(thrInvOrders);
PageSimpleResponse<ThrInvOrder> pageSimpleResponse = new PageSimpleResponse<>();
PageSimpleResponse<ThrInvOrderResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(thrInvOrders);
return ResultVOUtils.success(pageSimpleResponse);

@ -4,23 +4,13 @@ import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.thrsys.ThrInvOrder;
import com.glxp.api.entity.thrsys.ThrInvOrderDetail;
import com.glxp.api.req.thrsys.FilterThrInvOrderRequest;
import com.glxp.api.res.thrsys.ThrInvOrderResponse;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface ThrInvOrderMapper extends BaseMapperPlus<ThrInvOrderMapper, ThrInvOrder, ThrInvOrder> {
int deleteByPrimaryKey(Integer id);
int insert(ThrInvOrder record);
int insertSelective(ThrInvOrder record);
ThrInvOrder selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(ThrInvOrder record);
int updateByPrimaryKey(ThrInvOrder record);
List<ThrInvOrder> filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest);
List<ThrInvOrderResponse> filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest);
}

@ -8,6 +8,7 @@ import com.glxp.api.req.thrsys.FilterDownloadInvOrderRequest;
import com.glxp.api.req.thrsys.FilterThrInvOrderRequest;
import com.glxp.api.req.thrsys.GenerateOrderRequest;
import com.glxp.api.req.thrsys.RefreshOrderRequest;
import com.glxp.api.res.thrsys.ThrInvOrderResponse;
import java.util.List;
@ -40,7 +41,7 @@ public interface ThrInvOrderService {
* @param filterThrInvOrderRequest
* @return
*/
List<ThrInvOrder> filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest);
List<ThrInvOrderResponse> filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest);
int delThrInvOrderByBillNo(String billNo);

@ -32,6 +32,7 @@ import com.glxp.api.req.thrsys.RefreshOrderRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.basic.MainIdRelIdAndProductResponse;
import com.glxp.api.res.inv.ThrInvResultResponse;
import com.glxp.api.res.thrsys.ThrInvOrderResponse;
import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
import com.glxp.api.service.basic.ProductInfoService;
@ -324,7 +325,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
}
@Override
public List<ThrInvOrder> filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest) {
public List<ThrInvOrderResponse> filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest) {
if (filterThrInvOrderRequest == null) {
return Collections.emptyList();
}
@ -332,7 +333,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
int offset = (filterThrInvOrderRequest.getPage() - 1) * filterThrInvOrderRequest.getLimit();
PageHelper.offsetPage(offset, filterThrInvOrderRequest.getLimit());
}
List<ThrInvOrder> data = thrInvOrderMapper.filterThrInvOrder(filterThrInvOrderRequest);
List<ThrInvOrderResponse> data = thrInvOrderMapper.filterThrInvOrder(filterThrInvOrderRequest);
return data;
}
@ -415,7 +416,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
thrInvOrder.setStatus(ConstantStatus.SFIO_CFMD);//已确认
thrInvOrder.setUpdateTime(new Date());
thrInvOrder.setUpdateUser(userId + "");
thrInvOrderMapper.updateByPrimaryKey(thrInvOrder);
thrInvOrderMapper.updateById(thrInvOrder);
ioOrderDetailBizService.batchInsertBizs(newOrderDetailBiz);
//自动处理业务单据
@ -499,7 +500,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
thrInvOrder.setStatus(ConstantStatus.SFIO_CFMD);//已确认
thrInvOrder.setUpdateTime(new Date());
thrInvOrder.setUpdateUser(userId + "");
thrInvOrderMapper.updateByPrimaryKey(thrInvOrder);
thrInvOrderMapper.updateById(thrInvOrder);
ioCodeTempDao.insertBatch(newIoCodeTemps);
for (IoCodeTempEntity codeTempEntity : newIoCodeTemps) {
addInoutService.genOrderDetailCode(ioOrderEntity, codeTempEntity);

@ -1,266 +1,12 @@
<?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.glxp.api.dao.thrsys.ThrInvOrderMapper">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.thrsys.ThrInvOrder">
<!--@mbg.generated-->
<!--@Table thr_inv_order-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="billNo" jdbcType="VARCHAR" property="billNo"/>
<result column="billDate" jdbcType="TIMESTAMP" property="billDate"/>
<result column="startDate" jdbcType="TIMESTAMP" property="startDate"/>
<result column="endDate" jdbcType="TIMESTAMP" property="endDate"/>
<result column="mainAction" jdbcType="VARCHAR" property="mainAction"/>
<result column="billType" jdbcType="VARCHAR" property="billType"/>
<result column="thirdSysFk" jdbcType="VARCHAR" property="thirdSysFk"/>
<result column="deptCode" jdbcType="VARCHAR" property="deptCode"/>
<result column="invCode" jdbcType="VARCHAR" property="invCode"/>
<result column="spaceCode" jdbcType="VARCHAR" property="spaceCode"/>
<result column="status" jdbcType="TINYINT" property="status"/>
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="updateUser" jdbcType="VARCHAR" property="updateUser"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="sourceType" jdbcType="INTEGER" property="sourceType"/>
<result column="exMsg" jdbcType="VARCHAR" property="exMsg"/>
<result column="skProject" jdbcType="INTEGER" property="skProject"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, billNo, billDate, startDate, endDate, mainAction, billType,thirdSysFk, deptCode, invCode,
spaceCode, `status`, createTime, `createUser`, updateTime, updateUser, remark,sourceType,exMsg,skProject
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List"/>
from thr_inv_order
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete
from thr_inv_order
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.thrsys.ThrInvOrder"
useGeneratedKeys="true">
<!--@mbg.generated-->
insert into thr_inv_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="billNo != null">
billNo,
</if>
<if test="billDate != null">
billDate,
</if>
<if test="startDate != null">
startDate,
</if>
<if test="endDate != null">
endDate,
</if>
<if test="mainAction != null">
mainAction,
</if>
<if test="billType != null">
billType,
</if>
<if test="thirdSysFk != null">
thirdSysFk,
</if>
<if test="deptCode != null">
deptCode,
</if>
<if test="invCode != null">
invCode,
</if>
<if test="spaceCode != null">
spaceCode,
</if>
<if test="status != null">
`status`,
</if>
<if test="createTime != null">
createTime,
</if>
<if test="createUser != null">
`createUser`,
</if>
<if test="updateTime != null">
updateTime,
</if>
<if test="updateUser != null">
updateUser,
</if>
<if test="remark != null">
remark,
</if>
<if test="sourceType != null">
sourceType,
</if>
<if test="exMsg != null">
exMsg,
</if>
<if test="skProject != null">
skProject,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="billNo != null">
#{billNo,jdbcType=VARCHAR},
</if>
<if test="billDate != null">
#{billDate,jdbcType=TIMESTAMP},
</if>
<if test="startDate != null">
#{startDate,jdbcType=TIMESTAMP},
</if>
<if test="endDate != null">
#{endDate,jdbcType=TIMESTAMP},
</if>
<if test="mainAction != null">
#{mainAction,jdbcType=VARCHAR},
</if>
<if test="billType != null">
#{billType,jdbcType=VARCHAR},
</if>
<if test="thirdSysFk != null">
#{thirdSysFk,jdbcType=VARCHAR},
</if>
<if test="deptCode != null">
#{deptCode,jdbcType=VARCHAR},
</if>
<if test="invCode != null">
#{invCode,jdbcType=VARCHAR},
</if>
<if test="spaceCode != null">
#{spaceCode,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createUser != null">
#{createUser,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateUser != null">
#{updateUser,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="sourceType != null">
#{sourceType,jdbcType=INTEGER},
</if>
<if test="exMsg != null">
#{exMsg,jdbcType=VARCHAR},
</if>
<if test="skProject != null">
#{skProject,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.api.entity.thrsys.ThrInvOrder">
<!--@mbg.generated-->
update thr_inv_order
<set>
<if test="billNo != null">
billNo = #{billNo,jdbcType=VARCHAR},
</if>
<if test="billDate != null">
billDate = #{billDate,jdbcType=TIMESTAMP},
</if>
<if test="startDate != null">
startDate = #{startDate,jdbcType=TIMESTAMP},
</if>
<if test="endDate != null">
endDate = #{endDate,jdbcType=TIMESTAMP},
</if>
<if test="mainAction != null">
mainAction = #{mainAction,jdbcType=VARCHAR},
</if>
<if test="billType != null">
billType = #{billType,jdbcType=VARCHAR},
</if>
<if test="thirdSysFk != null">
thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR},
</if>
<if test="deptCode != null">
deptCode = #{deptCode,jdbcType=VARCHAR},
</if>
<if test="invCode != null">
invCode = #{invCode,jdbcType=VARCHAR},
</if>
<if test="spaceCode != null">
spaceCode = #{spaceCode,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=TINYINT},
</if>
<if test="createTime != null">
createTime = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createUser != null">
`createUser` = #{createUser,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
updateTime = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateUser != null">
updateUser = #{updateUser,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="sourceType != null">
sourceType = #{sourceType,jdbcType=INTEGER},
</if>
<if test="exMsg != null">
exMsg = #{exMsg,jdbcType=VARCHAR},
</if>
<if test="skProject != null">
skProject = #{skProject,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glxp.api.entity.thrsys.ThrInvOrder">
<!--@mbg.generated-->
update thr_inv_order
set billNo = #{billNo,jdbcType=VARCHAR},
billDate = #{billDate,jdbcType=TIMESTAMP},
startDate = #{startDate,jdbcType=TIMESTAMP},
endDate = #{endDate,jdbcType=TIMESTAMP},
mainAction = #{mainAction,jdbcType=VARCHAR},
billType = #{billType,jdbcType=VARCHAR},
thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR},
deptCode = #{deptCode,jdbcType=VARCHAR},
invCode = #{invCode,jdbcType=VARCHAR},
spaceCode = #{spaceCode,jdbcType=VARCHAR},
`status` = #{status,jdbcType=TINYINT},
createTime = #{createTime,jdbcType=TIMESTAMP},
`createUser` = #{createUser,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
updateUser = #{updateUser,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
sourceType = #{sourceType,jdbcType=INTEGER},
exMsg = #{exMsg,jdbcType=VARCHAR},
skProject = #{skProject,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="filterThrInvOrder" parameterType="com.glxp.api.req.thrsys.FilterThrInvOrderRequest"
resultType="com.glxp.api.res.thrsys.ThrInvOrderResponse">
SELECT tio.*, bbt.name billTypeName, aw.name invName
FROM thr_inv_order tio
left join basic_bussiness_type bbt on tio.billType = bbt.action
left join auth_warehouse aw on tio.invCode = aw.code
left join basic_bussiness_type bbt on tio.billType = bbt.action
left join auth_warehouse aw on tio.invCode = aw.code
<where>
<if test="billNo != '' and billNo != null">
AND billNo like concat('%', #{billNo}, '%')

Loading…
Cancel
Save