平谭科室收费出库明细

lh_dev_fifo
yewj 9 months ago
parent f150561704
commit 009b5fb602

@ -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 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
*

@ -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++) {

@ -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