平谭科室收费出库明细

lh_dev_fifo
yewj 9 months ago
parent f150561704
commit 009b5fb602

@ -91,14 +91,14 @@ public class WebSocketServer {
this.session.getBasicRemote().sendText(message);
}
public static void sendInfo(String message, String type) {
public static void sendInfo(String message, String type) {
log.info("推送消息到窗口" + type + ",推送内容:" + message);
for (WebSocketServer item : webSocketSet) {
try {
if (type == null) {
item.sendMessage(new WebSocketEntity("sid", message));
} else {
} else {
item.sendMessage(new WebSocketEntity(type, message));
}
} catch (IOException e) {

@ -771,12 +771,18 @@ public class IoOrderController extends BaseController {
@PostMapping("udiwms/inout/order/finish/pt/delete")
@Log(title = "单据管理", businessType = BusinessType.DELETE)
public BaseResponse deleteAll(@RequestBody DeleteRequest deleteRequest) {
List<IoOrderEntity> orderEntities = orderService.findAllByAction("SC71021292871198");
List<IoOrderEntity> orderEntities = new ArrayList<>();
List<IoOrderEntity> orderEntities1 = orderService.findAllByAction("SC71021292871198");
List<IoOrderEntity> orderEntities2 = orderService.findAllByAction("SC72854426720051");
if (CollUtil.isNotEmpty(orderEntities2))
orderEntities.addAll(orderEntities2);
if (CollUtil.isNotEmpty(orderEntities1))
orderEntities.addAll(orderEntities1);
Boolean b = redisUtil.getBool("deleteAllOrder");
if (b)
return ResultVOUtils.error("当前删除任务正在执行,请勿重复点击!");
redisUtil.set("deleteAllOrder", true);
orderEntities.forEach(item ->
{
List<String> delBillNos = new ArrayList<>();

@ -94,10 +94,15 @@ public interface InvProductDao extends BaseMapperPlus<InvProductDao, InvProductE
/**
* 0
* @param relId
*
* @param relId
* @param batchNo
* @param unitFks
* @return
*/
List<String> filterReCount(Long relId, String batchNo, List<String> unitFks);
InvProductEntity selectExitInv(@Param("invCode") String invCode, @Param("supId") Long supId, @Param("relIdFk") Long relIdFk);
}

@ -191,6 +191,10 @@ public class InvProductService extends ServiceImpl<InvProductDao, InvProductEnti
return invProductDao.selectExitCount(invCode, supId, relIdFk);
}
public InvProductEntity selectExitInv(String invCode, Long supId, Long relIdFk) {
return invProductDao.selectExitInv(invCode, supId, relIdFk);
}
/**
* 0
*

@ -58,10 +58,10 @@ public class SpsWebSocketClient extends WebSocketClient {
//收到更新下载数据则赋值由外部处理,多个任务只处理一次避免重复处理
if (socketMsgEntity.getType().equals(SocketMsgType.DL_ALL_DATA)) {
this.excptMessage = s;
}else if (socketMsgEntity.getType().equals(SocketMsgType.STAT_DATA)){
} else if (socketMsgEntity.getType().equals(SocketMsgType.STAT_DATA)) {
BaseResponse statData = socketMsgService.getStatData(s);
this.sendMessage(statData.toString());
} else {
} else {
//通知类消息则需转发
socketMsgService.dealNoticeMsg(socketMsgEntity);
}

@ -901,6 +901,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
thrInvOrderDetail.setRelId(sk.getRelId());
thrInvOrderDetail.setSupId(sk.getSupId() + "");
thrInvOrderDetail.setHandleStatus(1);
thrInvOrderDetail.setToBillNo(null);
List<InvProductEntity> invProductEntities = invProductService.selectByRelId(relId, null, null, thrInvOrder.getInvCode());
@ -918,6 +919,10 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
if (StrUtil.isEmpty(item.getSupId()) && invProductEntity1 != null) {
item.setSupId(invProductEntity1.getSupId());
}
if (bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
thrInvOrderDetail.setBatchNo(invProductEntities.get(0).getBatchNo());
}
}
if (StrUtil.isEmpty(item.getSupId())) {
CompanyProductRelevanceEntity udiRlSupEntity = udiRlSupService.selOneByRlId(relId);
@ -1662,7 +1667,10 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
thrInvOrderDetail.setPrice(BigDecimal.ZERO);
else
thrInvOrderDetail.setPrice(udiRlSupEntity.getPrice());
if (item.getMainAction().equals(ConstantType.TYPE_PUT)) {
InvProductEntity invProductEntity = (InvProductEntity) invProductService.selectExitInv(thrInvOrderDetail.getInvCode(), Long.parseLong(udiRlSupEntity.getCustomerId()), Long.parseLong(udiRlSupEntity.getUdiRlIdFk()));
thrInvOrderDetail.setBatchNo(invProductEntity.getBatchNo());
}
if (count1 <= IntUtil.value(thrInvOrderDetail.getReCount())) {
int relCount = IntUtil.value(thrInvOrderDetail.getReCount()) - count1;
for (int j = i + 1; j < udiRlSupEntitys.size(); j++) {

@ -38,12 +38,12 @@
bp.basicPrductRemak8,
ip.price
from inv_product ip
inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode
left join auth_space `as` on ip.invSpaceCode = `as`.code
inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode
left join auth_space `as` on ip.invSpaceCode = `as`.code
<where>
<if test="cpmctymc != null and cpmctymc != ''">
AND bp.cpmctymc like concat('%', #{cpmctymc}, '%')
@ -135,10 +135,10 @@
sum(ip.outCount) outCount,
sum(ip.reCount) reCount
from inv_product ip
inner join basic_udirel bu on ip.relIdFk = bu.id
inner join basic_products bp on bu.uuid = bp.uuid
left join basic_corp bc on ip.supId = bc.erpId
left join auth_warehouse aw on aw.code = ip.invCode
inner join basic_udirel bu on ip.relIdFk = bu.id
inner join basic_products bp on bu.uuid = bp.uuid
left join basic_corp bc on ip.supId = bc.erpId
left join auth_warehouse aw on aw.code = ip.invCode
<where>
bp.diType = 1
<if test="cpmctymc != null and cpmctymc != ''">
@ -189,9 +189,9 @@
bp.manufactory,
bp.zczbhhzbapzbh
FROM inv_product_detail ip
LEFT JOIN basic_udirel bu ON bu.id = ip.relId
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
LEFT JOIN basic_corp ON ip.supId = basic_corp.erpId
LEFT JOIN basic_udirel bu ON bu.id = ip.relId
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
LEFT JOIN basic_corp ON ip.supId = basic_corp.erpId
<where>
<if test="nameCode != null and nameCode != ''">
AND bp.nameCode like concat('%', #{nameCode}, '%')
@ -228,10 +228,10 @@
<select id="selectProductInfo" resultType="com.glxp.api.entity.inv.InvProductEntity">
select ip.*
from inv_product ip
left join inv_product_detail ipd on ip.relIdFk = ipd.relId
and ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
and ip.deptCode = ipd.deptCode
and ip.invCode = ipd.invCode
left join inv_product_detail ipd on ip.relIdFk = ipd.relId
and ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
and ip.deptCode = ipd.deptCode
and ip.invCode = ipd.invCode
<where>
<if test="relId != null and relId != ''">
AND ip.relIdFk = #{relId}
@ -269,11 +269,11 @@
-- sum(inv_product.inCount - inv_product.outCount) reCount,
basic_products.cpmctymc
from inv_product_detail
left join inv_product on inv_product_detail.relId = inv_product.relIdFk
and inv_product.invCode = inv_product_detail.invCode
AND IFNULL(inv_product.batchNo, 'empty') = IFNULL(inv_product_detail.batchNo, 'empty')
left join basic_udirel on inv_product_detail.relId = basic_udirel.id
left join basic_products on basic_products.uuid = basic_udirel.uuid
left join inv_product on inv_product_detail.relId = inv_product.relIdFk
and inv_product.invCode = inv_product_detail.invCode
AND IFNULL(inv_product.batchNo, 'empty') = IFNULL(inv_product_detail.batchNo, 'empty')
left join basic_udirel on inv_product_detail.relId = basic_udirel.id
left join basic_products on basic_products.uuid = basic_udirel.uuid
<where>
<if test="invCode != null and invCode != ''">
AND inv_product_detail.invCode = #{invCode}
@ -307,8 +307,8 @@
ip.outCount,
ip.reCount
from inv_product ip
left join inv_product_detail ipd
on ip.relIdFk = ipd.relId and ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
left join inv_product_detail ipd
on ip.relIdFk = ipd.relId and ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
<where>
<if test="invCode != null and invCode != ''">
AND ip.invCode = #{invCode}
@ -326,10 +326,10 @@
<select id="filterProductNames" resultType="com.glxp.api.res.inv.InvProductResponse">
select ip.relIdFk, bp.cpmctymc, bp.ggxh, bp.ylqxzcrbarmc, bp.zczbhhzbapzbh
from inv_product ip
left join inv_product_detail ipd on ip.relIdFk = ipd.relId and ip.invCode = ipd.invCode and
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
left join basic_udirel bu on bu.id = ip.relIdFk
left join basic_products bp on bp.uuid = bu.uuid
left join inv_product_detail ipd on ip.relIdFk = ipd.relId and ip.invCode = ipd.invCode and
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
left join basic_udirel bu on bu.id = ip.relIdFk
left join basic_products bp on bp.uuid = bu.uuid
<where>
<if test="cpmctymc != null and cpmctymc != ''">
AND bp.cpmctymc like concat('%', #{cpmctymc}, '%')
@ -368,13 +368,13 @@
ip.deptCode,
ip.invCode
from inv_product ip
inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode
left join inv_product_detail ipd on ip.invCode = ipd.invCode and ip.relIdFk = ipd.relId and
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode
left join inv_product_detail ipd on ip.invCode = ipd.invCode and ip.relIdFk = ipd.relId and
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
<where>
bp.diType = 1
<if test="cpmctymc != null and cpmctymc != ''">
@ -458,13 +458,13 @@
ip.price,
ip.invCode
from inv_product ip
inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode
left join basic_product_category_rel on basic_product_category_rel.relId = basic_udirel.id
left join basic_product_category on basic_product_category_rel.code = basic_product_category.code
inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode
left join basic_product_category_rel on basic_product_category_rel.relId = basic_udirel.id
left join basic_product_category on basic_product_category_rel.code = basic_product_category.code
<where>
bp.diType = 1
@ -553,6 +553,24 @@
</where>
</select>
<select id="selectExitInv" resultType="com.glxp.api.entity.inv.InvProductEntity">
select *
from inv_product
<where>
<if test="relIdFk != null">
AND relIdFk = #{relIdFk}
</if>
<if test="supId != null">
AND supId = #{supId}
</if>
<if test="invCode != null and invCode != ''">
AND invCode = #{invCode}
</if>
</where>
limit 1
</select>
<select id="filterReCount" resultType="string">
select ip.supId
from inv_product ip

Loading…
Cancel
Save