平潭收费出库明细

lh_dev_fifo
anthonywj 11 months ago
parent 521310d144
commit 0ec915d253

@ -109,7 +109,7 @@ public class ThrInvOrder implements Serializable {
private Integer sourceType; private Integer sourceType;
/** /**
* 1.2.3. * 1.2.3.,4:
*/ */
private Integer genStatus; private Integer genStatus;

@ -55,7 +55,9 @@ import com.glxp.api.util.IntUtil;
import com.glxp.api.util.OrderNoTypeBean; import com.glxp.api.util.OrderNoTypeBean;
import com.glxp.api.util.udi.FilterUdiUtils; import com.glxp.api.util.udi.FilterUdiUtils;
import com.glxp.api.util.udi.UdiCalCountUtil; import com.glxp.api.util.udi.UdiCalCountUtil;
import io.netty.util.internal.ThrowableUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.regexp.RE; import org.apache.regexp.RE;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -849,8 +851,6 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
@Override @Override
public void scanInvSfOrderGenerateSfOrder() { public void scanInvSfOrderGenerateSfOrder() {
log.info("扫描处理第三方收费明细生成单据定时任务开始"); log.info("扫描处理第三方收费明细生成单据定时任务开始");
// List<ThrInvOrderDetail> list = thrInvOrderDetailMapper.selectSourceTypeList(Constant.THR_INV_SF_ORDER_TYPE);
List<ThrInvOrder> thrInvOrders = thrInvOrderMapper.selectList(new LambdaQueryWrapper<ThrInvOrder>() List<ThrInvOrder> thrInvOrders = thrInvOrderMapper.selectList(new LambdaQueryWrapper<ThrInvOrder>()
.eq(ThrInvOrder::getSourceType, Constant.THR_INV_SF_ORDER_TYPE) .eq(ThrInvOrder::getSourceType, Constant.THR_INV_SF_ORDER_TYPE)
.lt(ThrInvOrder::getGenStatus, 3)); .lt(ThrInvOrder::getGenStatus, 3));
@ -858,6 +858,15 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
if (CollUtil.isNotEmpty(thrInvOrders)) { if (CollUtil.isNotEmpty(thrInvOrders)) {
for (ThrInvOrder thrInvOrder : thrInvOrders) { for (ThrInvOrder thrInvOrder : thrInvOrders) {
try {
ThrInvOrder temp = thrInvOrderMapper.selectById(thrInvOrder.getId());
if (temp.getGenStatus() < 3) {
thrInvOrder.setGenStatus(4);
thrInvOrderMapper.updateById(thrInvOrder);
} else {
//如果该单据还在生成中则跳过
continue;
}
List<ThrInvOrderDetail> thrInvOrderDetails = thrInvOrderDetailMapper.selectList( List<ThrInvOrderDetail> thrInvOrderDetails = thrInvOrderDetailMapper.selectList(
new LambdaQueryWrapper<ThrInvOrderDetail>() new LambdaQueryWrapper<ThrInvOrderDetail>()
.and(o -> o.isNull(ThrInvOrderDetail::getHandleStatus).or().ne(ThrInvOrderDetail::getHandleStatus, 1)). .and(o -> o.isNull(ThrInvOrderDetail::getHandleStatus).or().ne(ThrInvOrderDetail::getHandleStatus, 1)).
@ -960,9 +969,14 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
thrInvOrderDetailMapper.updateBatchById(updateThrInvOrderDetails); thrInvOrderDetailMapper.updateBatchById(updateThrInvOrderDetails);
genOrder(thrInvOrder, bussinessTypeEntity, updateThrInvOrderDetails); genOrder(thrInvOrder, bussinessTypeEntity, updateThrInvOrderDetails);
} }
} catch (Exception e) {
e.printStackTrace();
log.error("生成单据异常", ExceptionUtils.getStackTrace(e));
thrInvOrder.setGenStatus(2);
thrInvOrder.setRemark(new Date() + "出现异常");
thrInvOrderMapper.updateById(thrInvOrder);
}
} }
} }
} }
@ -1032,6 +1046,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
} }
thrInvOrderDetailMapper.updateBatchById(thrInvOrderDetails); thrInvOrderDetailMapper.updateBatchById(thrInvOrderDetails);
thrInvOrder.setToBillNo(toBillNo); thrInvOrder.setToBillNo(toBillNo);
thrInvOrder.setGenStatus(3);
thrInvOrderMapper.updateById(thrInvOrder); thrInvOrderMapper.updateById(thrInvOrder);
ioOrderService.insertOrder(ioOrderEntity); ioOrderService.insertOrder(ioOrderEntity);
ioOrderDetailBizService.batchInsertBizs(newOrderDetailBiz); ioOrderDetailBizService.batchInsertBizs(newOrderDetailBiz);

@ -4,7 +4,7 @@ server:
spring: spring:
datasource: datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt2?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root username: root
password: 123456 password: 123456
hikari: hikari:

Loading…
Cancel
Save