Merge remote-tracking branch 'origin/dev' into dev

dev
薛宇 2 years ago
commit 01293fe8ba

@ -133,10 +133,10 @@ public class IoOrderController extends BaseController {
}
if (StrUtil.isNotBlank(filterOrderRequest.getVueType())) {
//要是不存在要查询的单据类型就直接放回空
if(orderService.setActions(filterOrderRequest) == null){
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>(new ArrayList<>());
return ResultVOUtils.page(pageInfo);
}
if (orderService.setActions(filterOrderRequest) == null) {
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>(new ArrayList<>());
return ResultVOUtils.page(pageInfo);
}
}
@ -162,7 +162,6 @@ public class IoOrderController extends BaseController {
if (ioOrderResponse.getCheckStatus() == null) {
ioOrderResponse.setCheckStatus(0 + "");
}
ioOrderResponse = orderInvoiceService.findRegStausByBillNo(ioOrderResponse);
}
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>(list);
@ -1051,6 +1050,7 @@ public class IoOrderController extends BaseController {
AuthAdmin userBean = customerService.getUserBean();
return ResultVOUtils.success(userBean);
}
@AuthRuleAnnotation("")
@GetMapping("/udiwms/inout/order/filterInvoiceList")
public BaseResponse filterInvoiceList(FilterOrderRequest filterOrderRequest) {
@ -1058,12 +1058,12 @@ public class IoOrderController extends BaseController {
//这个不等于空表示要查询发票对应的单据
if (filterOrderRequest.getInvoiceEncode() != null) {
//查询发票详情
QueryWrapper<IoOrderInvoiceEntity> ew=new QueryWrapper<IoOrderInvoiceEntity>();
ew.eq("invoiceEncode",filterOrderRequest.getInvoiceEncode());
QueryWrapper<IoOrderInvoiceEntity> ew = new QueryWrapper<IoOrderInvoiceEntity>();
ew.eq("invoiceEncode", filterOrderRequest.getInvoiceEncode());
List<IoOrderInvoiceEntity> ioOrderInvoiceEntity = orderInvoiceService.list(ew);
List<String> orderIds = ioOrderInvoiceEntity.stream().map(IoOrderInvoiceEntity::getOrderIdFk).collect(Collectors.toList());
filterOrderRequest.setOrderIds(orderIds);
if(CollectionUtils.isEmpty(orderIds)){
if (CollectionUtils.isEmpty(orderIds)) {
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>();
return ResultVOUtils.page(pageInfo);
}

@ -13,6 +13,7 @@ import java.util.List;
public interface UdiRelevanceDao extends BaseMapperPlus<UdiRelevanceDao, UdiRelevanceEntity, UdiRelevanceEntity> {
List<UdiRelevanceResponse> filterUdiRelevance(FilterUdiRelRequest filterUdiRelRequest);
String selectPackLevel(@Param("nameCode") String nameCode);
List<UdiRelevanceResponse> filterUdiJoinSup(FilterUdiRelRequest filterUdiRelRequest);

@ -12,4 +12,5 @@ public interface InvInnerOrderPrintDao extends BaseMapper<InvInnerOrderPrintEnti
List<InvInnerOrderPrintEntity> filterOrderPrintList(FilterinnerOrderprintRequest filterinnerOrderprintRequest);
List<InnerOrderPrintResponse> filterJoinInnerPrint(FilterinnerOrderprintRequest filterinnerOrderprintRequest);
}

@ -1,5 +1,7 @@
package com.glxp.api.entity.basic;
import cn.hutool.core.util.StrUtil;
/**
* @author
* @date 2020/9/22.

@ -171,6 +171,5 @@ public class UdiRelevanceEntity {
@TableField(value = "certIdFk")
private String certIdFk;
@TableField(value = "zdcfsycs")
private Integer zdcfsycs ;
}
}

@ -265,5 +265,11 @@ public class IoOrderEntity {
@TableField(value = "preCurSpaceCode")
private String preCurSpaceCode;
/**
*
*/
@TableField(value = "outSickInfo")
private String outSickInfo;
}

@ -9,6 +9,7 @@ public class InnerOrderDetailEntity {
private String orderIdFk;
private String productId;
private String productName;
private String nameCode;
private Integer count;
private String productDate;
private String expireDate;

@ -30,6 +30,7 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String lastUpdateTime;
private String zczbhhzbapzbh;
private String packLevel;
private Integer diType;

@ -136,7 +136,7 @@ public class FilterOrderRequest extends ListPageRequest {
* checkedError
* checkSuccess
* audited
* * preInOrder
* * preInOrder
*/
private String statusType;
@ -192,4 +192,9 @@ public class FilterOrderRequest extends ListPageRequest {
private String uploadKey;
private String invoiceEncode;
//联合备注字段查询
private String unionRemark;
private String remark;
}

@ -45,6 +45,7 @@ public class innerOrderDetailResponse {
private int acceptCount;
private String measname;
private String supId;
private String nameCode;
private String supName;
}

@ -1,14 +1,17 @@
package com.glxp.api.service.inout;
import cn.hutool.core.util.StrUtil;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.constant.ConstantType;
import com.glxp.api.entity.basic.BasicBusTypePreEntity;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.entity.inout.IoCodeEntity;
import com.glxp.api.entity.inout.IoOrderDetailResultEntity;
import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.entity.inv.*;
import com.glxp.api.service.basic.IBasicBusTypePreService;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
import com.glxp.api.service.inv.*;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@ -42,7 +45,8 @@ public class IoGenInvService {
InvUserProductService invUserProductService;
@Resource
InvUserProductDetailService invUserProductDetailService;
@Resource
IBasicBussinessTypeService basicBussinessTypeService;
@Resource
IoChangeInoutService ioChangeInoutService;
@ -54,6 +58,13 @@ public class IoGenInvService {
List<IoOrderDetailResultEntity> orderDetailResultEntities = orderDetailResultService.findByOrderId(orderId);
List<IoCodeEntity> codeEnttities = codeService.findByOrderId(orderId);
//补齐单据信息
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
if (bussinessTypeEntity.getCorpType() == ConstantStatus.CORP_TYPE_INPUT && bussinessTypeEntity.isGenUnit()) {
orderEntity.setOutSickInfo(orderEntity.getFromCorp());
orderService.update(orderEntity);
}
//生成库存产品表
for (IoOrderDetailResultEntity orderDetailResultEntity : orderDetailResultEntities) {
InvProductEntity invProductEntity = invProductService.selectByUnique(orderDetailResultEntity.getBindRlFk(), orderDetailResultEntity.getBatchNo(), orderDetailResultEntity.getSupId(), orderEntity.getDeptCode(), orderEntity.getInvCode());

@ -113,8 +113,11 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
innerOrderPrintEntity.setUpdateUser(customerService.getUserId() + "");
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setId(Long.valueOf(obj.getProductId()));
filterUdiRelRequest.setPackLevel(udiRelevanceDao.selectPackLevel(obj.getNameCode()));
System.out.println(filterUdiRelRequest.getPackLevel());
//查询耗材字典信息
UdiRelevanceResponse filterUdiRelevance = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest).get(0);
// UdiRelevanceResponse filterUdiRelevance = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest).get(0);
UdiRelevanceResponse filterUdiRelevance = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest).get(Integer.parseInt(filterUdiRelRequest.getPackLevel())-1);
//查询产品信息
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(filterUdiRelevance.getNameCode());

@ -109,7 +109,7 @@ public class FilterUdiUtils {
String expireDate = "";
String serialNo = null;
String udi = "";
String[] spilts = data.split("#",data.length());
String[] spilts = data.split("#", data.length());
if (spilts != null && spilts.length >= 5) {
udi = spilts[1];
produceDate = spilts[2];
@ -117,9 +117,13 @@ public class FilterUdiUtils {
batchNo = spilts[4];
if (spilts.length > 6) {
serialNo = spilts[5];
if (serialNo != null && serialNo.equals("")) {
serialNo = null;
}
}
if (StrUtil.isEmpty(batchNo)) {
batchNo = null;
}
if (StrUtil.isEmpty(serialNo)) {
serialNo = null;
}
}

@ -121,7 +121,20 @@
</where>
ORDER BY modifyTime DESC
</select>
<select id="selectPackLevel" parameterType="java.lang.String"
resultType="java.lang.String">
select
basic_products.packLevel
FROM basic_udirel
inner JOIN basic_products
ON basic_products.uuid = basic_udirel.uuid
<where>
<if test="nameCode != '' and nameCode != null">
AND basic_products.nameCode = #{nameCode}
</if>
</where>
</select>
<select id="filterUdiJoinSup" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
@ -1239,9 +1252,6 @@
<if test="relCode != '' and relCode != null">
relCode=#{relCode},
</if>
<if test="zdcfsycs != '' and zdcfsycs != null">
zdcfsycs=#{zdcfsycs},
</if>
<if test="needCert != null">
needCert=#{needCert},
</if>

@ -14,7 +14,7 @@
(select name from auth_warehouse aw2 where aw2.code = io.fromInvCode) fromInvName,
(select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName,
(select name from basic_corp bc where bc.erpId = io.customerId) customerName
from io_order as io
from io_order as io
<if test="uploadKey != null and uploadKey != ''">
INNER JOIN io_unit_maintain_platform a2 on io.action = a2.sourceAction AND io.fromCorp = a2.unitId
</if>
@ -29,6 +29,9 @@
<if test="action != null and action != ''">
AND action = #{action}
</if>
<if test="remark != null and remark != ''">
AND remark like concat('%', #{remark}, '%')
</if>
<if test="mainAction != null and mainAction != ''">
AND mainAction = #{mainAction}
</if>
@ -77,7 +80,10 @@
#{item}
</foreach>
</if>
<if test="unionRemark != null and unionRemark != ''">
AND (io.remark like concat('%', #{unionRemark}, '%')
or io.outSickInfo like concat('%', #{unionRemark}, '%'))
</if>
<if test="statuses != null and statuses.size() != 0">
AND status in
<foreach collection="statuses" index="index" item="item" open="(" close=")" separator=",">
@ -139,8 +145,8 @@
</if>
</where>
<choose>
<when test="(orderBy!=null ) and (sort=='desc' or sort=='asc')">
order by ${orderBy} ${sort}
<when test="(orderBy != null) and (sort == 'desc' or sort == 'asc')">
order by ${orderBy} ${sort}
</when>
<otherwise>
order by updateTime desc
@ -294,8 +300,8 @@
</if>
</where>
<choose>
<when test="(orderBy!=null ) and (sort=='desc' or sort=='asc')">
order by ${orderBy} ${sort}
<when test="(orderBy != null) and (sort == 'desc' or sort == 'asc')">
order by ${orderBy} ${sort}
</when>
<otherwise>
order by updateTime desc
@ -340,6 +346,10 @@
<if test="syncStatus != null">
AND syncStatus = #{syncStatus}
</if>
<if test="unionRemark != null and unionRemark != ''">
AND (io.remark like concat('%', #{unionRemark}, '%')
or io.outSickInfo like concat('%', #{unionRemark}, '%'))
</if>
<if test="busType != null">
AND busType = #{busType}
</if>
@ -441,7 +451,7 @@
<if test="thirdSys != null and thirdSys != ''">
AND t1.thirdSys = #{thirdSys}
</if>
<if test="orderStartTime != null ">
<if test="orderStartTime != null">
<![CDATA[
and updateTime >= DATE_FORMAT(#{orderStartTime}, '%Y-%m-%d %H:%i:%S')
]]>
@ -462,43 +472,43 @@
<select id="selectOrderIdList" resultType="java.lang.String">
SELECT billNo
FROM io_order
LEFT JOIN basic_bussiness_type ON io_order.action = basic_bussiness_type.action
FROM io_order
LEFT JOIN basic_bussiness_type ON io_order.action = basic_bussiness_type.action
WHERE basic_bussiness_type.inStock = 1
and io_order.`status` = 7
AND date_format(io_order.updateTime, '%Y-%m-%d') = date_format(#{data},'%Y-%m-%d')
AND date_format(io_order.updateTime, '%Y-%m-%d') = date_format(#{data}, '%Y-%m-%d')
</select>
<select id="selectOrderfirstAndLastIdList" resultType="java.lang.String">
SELECT billNo
FROM io_order
LEFT JOIN basic_bussiness_type ON io_order.action = basic_bussiness_type.action
LEFT JOIN basic_bussiness_type ON io_order.action = basic_bussiness_type.action
WHERE basic_bussiness_type.inStock = 1
and io_order.`status` = 7
AND date_format(io_order.updateTime, '%Y-%m-%d') between date_format(#{lastData}, '%Y-%m-%d') and
date_format(#{firstData}, '%Y-%m-%d')
and io_order.`status` = 7
AND date_format(io_order.updateTime, '%Y-%m-%d') between date_format(#{lastData}, '%Y-%m-%d') and
date_format(#{firstData}, '%Y-%m-%d')
</select>
<select id="getfilterOrderList" resultType="com.glxp.api.res.inout.IoOrderResponse">
SELECT io.*,
bus.NAME AS billTypeName,
ad.NAME AS deptName,
aw.NAME AS invName,
bc.NAME AS fromCorpName
bus.NAME AS billTypeName,
ad.NAME AS deptName,
aw.NAME AS invName,
bc.NAME AS fromCorpName
FROM io_order io
LEFT JOIN basic_bussiness_type bus ON io.action = bus.action
LEFT JOIN auth_dept ad ON io.deptCode = ad.CODE
LEFT JOIN auth_warehouse aw ON io.invCode = aw.CODE
LEFT JOIN basic_corp bc ON io.fromCorp = bc.erpId
LEFT JOIN io_order_detail_code dc ON io.billNo = dc.orderIdFk
LEFT JOIN basic_bussiness_type bus ON io.action = bus.action
LEFT JOIN auth_dept ad ON io.deptCode = ad.CODE
LEFT JOIN auth_warehouse aw ON io.invCode = aw.CODE
LEFT JOIN basic_corp bc ON io.fromCorp = bc.erpId
LEFT JOIN io_order_detail_code dc ON io.billNo = dc.orderIdFk
<where>
<if test="id != null and id != ''">
AND io.id = #{id}
</if>
<if test="corpName != null and corpName != ''">
AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like
concat('%', #{corpName}, '%')
concat('%', #{corpName}, '%')
</if>
<if test="action != null and action != ''">
AND io.action = #{action}
@ -506,6 +516,10 @@
<if test="mainAction != null and mainAction != ''">
AND io.mainAction = #{mainAction}
</if>
<if test="unionRemark != null and unionRemark != ''">
AND (io.remark like concat('%', #{unionRemark}, '%')
or io.outSickInfo like concat('%', #{unionRemark}, '%'))
</if>
<if test="billNo != null and billNo != ''">
AND io.billNo like concat('%', #{billNo}, '%')
</if>
@ -586,12 +600,12 @@
<if test="invoiceActions1 == null and invoiceActions2 != null">
and (
io.`action` in
io.`action` in
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and io.status = 7
)
)
</if>
<if test="invoiceActions1 != null and invoiceActions2 != null">
@ -600,13 +614,13 @@
#{item}
</foreach>
and io.status = 10)
or (
io.`action` in
or (
io.`action` in
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and io.status = 7)
)
)
</if>
</if>
</where>

@ -30,7 +30,7 @@
replace
INTO inv_inner_order_detail
(
orderIdFk,productId,productName,`count`,productDate,expireDate,batchNo
orderIdFk,productId,productName,`count`,productDate,expireDate,batchNo,nameCode
)
values (
#{orderIdFk},
@ -39,7 +39,8 @@
#{count},
#{productDate},
#{expireDate},
#{batchNo}
#{batchNo},
#{nameCode}
)
</insert>
@ -75,6 +76,7 @@
<if test="expireDate != null">expireDate=#{expireDate},</if>
<if test="productDate != null">productDate=#{productDate},</if>
<if test="batchNo != null">batchNo=#{batchNo},</if>
<if test="nameCode != null">nameCode=#{nameCode},</if>
</trim>
WHERE id = #{id}
</update>

@ -513,6 +513,8 @@ CALL Pro_Temp_ColumnWork('basic_products', 'syqsfxyjxmj', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'mjfs', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'categoryName', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('thr_system_detail', 'dlLastTime', 'int', 1);
@ -595,4 +597,7 @@ CREATE TABLE if not exists `io_destiny_process_detail`
ROW_FORMAT = Dynamic;
CALL Pro_Temp_ColumnWork('io_order', 'outSickInfo', 'varchar(255)', 1);

Loading…
Cancel
Save