领用单据审核bug修改,自动生成业务单,扫码单等修改迁移

master
anthonywj 2 years ago
parent e3c6399aa5
commit 76994ae9f5

@ -275,7 +275,7 @@ public class IoPurChangeService {
billNo += ioOrderEntity.getBillNo() + ",";
//插入业务单表
for (PurReceiveDetailEntity obj : m.getValue()) {
BasicProductsEntity basicProductsEntity = purPlanDetailService.selectIoOrderDetailBiz(obj.getId());
BasicProductsEntity basicProductsEntity = receivedetailService.selectIoOrderDetailBiz(obj.getId());
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo());
ioOrderDetailBizEntity.setBindRlFk(obj.getRelIdFk());
@ -436,10 +436,10 @@ public class IoPurChangeService {
ioOrderEntity.setAction(basicBusTypeChangeEntity.getTargetAction());
ioOrderEntity.setFromCorp(m.getKey());
ioOrderEntity.setFromType(ConstantStatus.FROM_Order);
if(basicBusTypeChangeEntity.getAuditStatus()==1){
if (basicBusTypeChangeEntity.getAuditStatus() == 1) {
ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);
ioOrderEntity.setDealStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);
}else if(basicBusTypeChangeEntity.getAuditStatus()==2){
} else if (basicBusTypeChangeEntity.getAuditStatus() == 2) {
ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
ioOrderEntity.setDealStatus(ConstantStatus.ORDER_STATUS_PROCESS);
}

@ -21,4 +21,5 @@ public interface BasicBusTypeChangeDao extends BaseMapper<BasicBusTypeChangeEnti
* @return
*/
List<BasicBusTypeChangeResponse> filterList(FilterBusTypeChangeRequest filterBusTypeChangeRequest);
}
}

@ -1,12 +1,14 @@
package com.glxp.api.dao.inout;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.basic.BasicProductsEntity;
import com.glxp.api.entity.inout.PurReceiveDetailEntity;
import com.glxp.api.req.inout.FilterReceiveDetailRequest;
import com.glxp.api.req.inout.UpdateReceiveDetailRequest;
import com.glxp.api.res.inout.ReceiveDetailResponse;
import com.glxp.api.res.inout.ReceiveResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -17,5 +19,5 @@ public interface ReceiveDetailDao extends BaseMapperPlus<ReceiveDetailDao, PurRe
boolean updateReceiveDetail(UpdateReceiveDetailRequest updateReceiveDetailRequest);
BasicProductsEntity selectIoOrderDetailBiz(@Param("id") long id);
}

@ -14,4 +14,7 @@ public class BasicBusTypeChangeResponse extends BasicBusTypeChangeEntity {
*/
private String targetBusName;
private String targetName;
}

@ -1,7 +1,6 @@
package com.glxp.api.service.basic;
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
import com.glxp.api.res.basic.BasicBusTypeChangeResponse;

@ -5,6 +5,7 @@ import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
import com.glxp.api.req.basic.FilterBusTypePreRequest;
import com.glxp.api.res.basic.BasicBusTypePreResponse;
import java.util.Date;
import java.util.List;
/**
@ -79,4 +80,6 @@ public interface IBasicBusTypePreService {
* @return
*/
boolean verifyExists(BasicBusTypePreEntity basicBusTypePreEntity);
List<BasicBusTypePreEntity> findByLastTime(Date lastUpdateTime);
}

@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.basic.BasicBusTypeChangeDao;
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.req.basic.FilterBusTypeChangeRequest;
import com.glxp.api.res.basic.BasicBusTypeChangeResponse;
import com.glxp.api.service.auth.CustomerService;

@ -105,6 +105,11 @@ public class BasicBusTypePreServiceImpl implements IBasicBusTypePreService {
return false;
}
@Override
public List<BasicBusTypePreEntity> findByLastTime(Date lastUpdateTime) {
return basicBusTypePreDao.selectList(new QueryWrapper<BasicBusTypePreEntity>().gt("updateTime", lastUpdateTime));
}
/**
* /
*

@ -1,5 +1,6 @@
package com.glxp.api.service.inout;
import com.glxp.api.entity.basic.BasicProductsEntity;
import com.glxp.api.entity.inout.PurReceiveEntity;
import com.glxp.api.req.inout.FilterReceiveRequest;
import com.glxp.api.res.inout.ReceiveResponse;
@ -21,4 +22,7 @@ public interface ReceiveService {
boolean delReceive(String orderIdFk);
}

@ -1,5 +1,6 @@
package com.glxp.api.service.inout;
import com.glxp.api.entity.basic.BasicProductsEntity;
import com.glxp.api.entity.inout.PurReceiveDetailEntity;
import com.glxp.api.req.inout.FilterReceiveDetailRequest;
import com.glxp.api.req.inout.FilterReceiveRequest;
@ -22,5 +23,5 @@ public interface ReceivedetailService {
boolean delDetail(String id);
BasicProductsEntity selectIoOrderDetailBiz(long id);
}

@ -3,6 +3,7 @@ package com.glxp.api.service.inout.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.inout.ReceiveDetailDao;
import com.glxp.api.entity.basic.BasicProductsEntity;
import com.glxp.api.entity.inout.PurReceiveDetailEntity;
import com.glxp.api.req.inout.FilterReceiveDetailRequest;
import com.glxp.api.req.inout.UpdateReceiveDetailRequest;
@ -55,5 +56,8 @@ public class ReceiveDetailServiceImpl implements ReceivedetailService {
return true;
}
@Override
public BasicProductsEntity selectIoOrderDetailBiz(long id) {
return receiveDetailDao.selectIoOrderDetailBiz(id);
}
}

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.inout.ReceiveDao;
import com.glxp.api.dao.inout.ReceiveDetailDao;
import com.glxp.api.entity.basic.BasicProductsEntity;
import com.glxp.api.entity.inout.PurReceiveDetailEntity;
import com.glxp.api.entity.inout.PurReceiveEntity;
import com.glxp.api.req.inout.FilterReceiveRequest;
@ -38,9 +39,9 @@ public class ReceiveServiceImpl implements ReceiveService {
@Override
public int updateOrder(PurReceiveEntity purReceiveEntity) {
QueryWrapper<PurReceiveEntity> ew=new QueryWrapper<>();
ew.eq("billNo",purReceiveEntity.getBillNo());
return receiveDao.update(purReceiveEntity,ew);
QueryWrapper<PurReceiveEntity> ew = new QueryWrapper<>();
ew.eq("billNo", purReceiveEntity.getBillNo());
return receiveDao.update(purReceiveEntity, ew);
}
@Override
@ -67,4 +68,6 @@ public class ReceiveServiceImpl implements ReceiveService {
}
}

@ -2,10 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.basic.BasicBusTypeChangeDao">
<select id="filterList" resultType="com.glxp.api.res.basic.BasicBusTypeChangeResponse">
select bc.*, bu.name targetName, bbc.originName targetBusName
from basic_bustype_change bc
left join basic_bussiness_type bu on bc.targetAction = bu.action
left join basic_bustype_change bbc on bc.originAction = bbc.targetAction
SELECT bc.*,
bu.name targetName,
(select originName from basic_bustype_change where originAction = bc.targetBusAction) as targetBusName
FROM basic_bustype_change bc
LEFT JOIN basic_bussiness_type bu ON bc.targetAction = bu.action
<where>
<if test="originAction != null and originAction != ''">
AND bc.originAction = #{originAction}

@ -11,30 +11,60 @@
bp.measname,
basic_corp.`name` supName
from pur_receive_detail
inner join basic_udirel on basic_udirel.id = pur_receive_detail.relIdFk
inner join basic_products bp on basic_udirel.uuid = bp.uuid
INNER JOIN basic_corp ON pur_receive_detail.supId = basic_corp.erpId
inner join basic_udirel on basic_udirel.id = pur_receive_detail.relIdFk
inner join basic_products bp on basic_udirel.uuid = bp.uuid
INNER JOIN basic_corp ON pur_receive_detail.supId = basic_corp.erpId
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk}
</if>
</where>
GROUP BY basic_udirel.uuid
GROUP BY basic_udirel.uuid
</select>
<update id="updateReceiveDetail" parameterType="com.glxp.api.req.inout.UpdateReceiveDetailRequest">
UPDATE pur_receive_detail
<trim prefix="set" suffixOverrides=",">
<if test="orderIdFk != null">orderIdFk=#{orderIdFk},</if>
<if test="relIdFk != null">relIdFk=#{relIdFk},</if>
<if test="nameCode != null">nameCode=#{nameCode},</if>
<if test="count != null">count=#{count},</if>
<if test="supId != null">supId=#{supId},</if>
<if test="productDate != null">productDate=#{productDate},</if>
<if test="batchNo != null">batchNo=#{batchNo},</if>
<if test="expireDate != null">expireDate=#{expireDate},</if>
<if test="orderIdFk != null">
orderIdFk=#{orderIdFk},
</if>
<if test="relIdFk != null">
relIdFk=#{relIdFk},
</if>
<if test="nameCode != null">
nameCode=#{nameCode},
</if>
<if test="count != null">
count=#{count},
</if>
<if test="supId != null">
supId=#{supId},
</if>
<if test="productDate != null">
productDate=#{productDate},
</if>
<if test="batchNo != null">
batchNo=#{batchNo},
</if>
<if test="expireDate != null">
expireDate=#{expireDate},
</if>
</trim>
WHERE id = #{id}
</update>
<select id="selectIoOrderDetailBiz" parameterType="long"
resultType="com.glxp.api.entity.basic.BasicProductsEntity">
SELECT b2.*
FROM pur_receive_detail p1
LEFT JOIN basic_udirel b1 on b1.id = p1.productId
LEFT JOIN basic_products b2 on b1.uuid = b2.uuid
<where>
<if test="id != null and id != ''">
AND p1.id = #{id}
</if>
</where>
GROUP BY uuid
</select>
</mapper>

Loading…
Cancel
Save