建阳发票问题

dev_drug_dm
qiuyt 3 weeks ago
parent c994d375b3
commit f33064a0f9

@ -167,7 +167,7 @@ public class BasicOrderPrintController {
bizData.put("manufactor", obj.getManufacturer());
bizData.put("zczbhhzbapzbh", obj.getCertCode() == null ? ' ' : obj.getCertCode());
bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc());
bizData.put("invoiceCode",ioOrderResponse.getInvoiceCode());
if (IntUtil.value(printThird) == 1) {
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(obj.getBindRlFk());
ThrProductsEntity thrProductsEntity = thrProductsService.selectByCode(udiRelevanceEntity.getThirdId());

@ -15,6 +15,7 @@ import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.*;
import com.glxp.api.controller.BaseController;
import com.glxp.api.controller.sync.SpsSyncWebSocket;
import com.glxp.api.dao.inout.IoOrderInvoiceMapper;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.auth.InvBusUserEntity;
import com.glxp.api.entity.auth.InvWarehouseEntity;
@ -126,7 +127,8 @@ public class IoOrderController extends BaseController {
return ResultVOUtils.page(pageInfo);
}
@Resource
private IoOrderInvoiceMapper ioOrderInvoiceMapper;
@AuthRuleAnnotation("")
@GetMapping("/udiwms/inout/order/filterList")
public BaseResponse filterOrderList(FilterOrderRequest filterOrderRequest) {
@ -158,6 +160,12 @@ public class IoOrderController extends BaseController {
if (ioOrderResponse.getCheckStatus() == null) {
ioOrderResponse.setCheckStatus(0 + "");
}
long count = ioOrderInvoiceMapper.selectCount(
new QueryWrapper<IoOrderInvoiceEntity>().eq("orderIdFk",ioOrderResponse.getBillNo())
);
if(count>0){
ioOrderResponse.setInvoiceStatus(2);
}
}
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>(list);

@ -58,6 +58,7 @@ import com.glxp.api.util.GennerOrderUtils;
import com.glxp.api.util.IntUtil;
import com.glxp.api.util.OrderNoTypeBean;
import com.glxp.api.util.udi.FilterUdiUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.BindingResult;
@ -561,6 +562,9 @@ public class IoOrderDetailBizController extends BaseController {
public BaseResponse insertInvoice(@RequestBody IoOrderInvoiceEntity ioOrderInvoice) {
String billNo = null;
for (IoOrderDetailBizEntity ioOrderDetailBizEntity : ioOrderInvoice.getList()) {
if(StringUtils.isEmpty(ioOrderDetailBizEntity.getOrderIdFk())){
ioOrderDetailBizEntity.setOrderIdFk(ioOrderDetailBizEntity.getBillNo());
}
IoOrderInvoiceEntity ioOrderInvoiceEntity = new IoOrderInvoiceEntity();
ioOrderInvoiceEntity.setOrderIdFk(ioOrderDetailBizEntity.getOrderIdFk());
ioOrderInvoiceEntity.setBindRlFk(ioOrderDetailBizEntity.getBindRlFk() + "");
@ -578,10 +582,13 @@ public class IoOrderDetailBizController extends BaseController {
ioOrderInvoiceEntity.setPrice(ioOrderInvoice.getPrice());
ioOrderInvoiceEntity.setRemark(ioOrderInvoice.getRemark());
ioOrderInvoiceEntity.setLicenseUrl(ioOrderInvoice.getLicenseUrl());
boolean b = ioOrderInvoiceService.insertInvoice(ioOrderInvoiceEntity);
billNo = ioOrderDetailBizEntity.getOrderIdFk();
}
IoOrderEntity orderEntity = orderService.findByBillNo(billNo);
orderEntity.setUpdateTime(new Date());
orderService.update(orderEntity);
return ResultVOUtils.success("成功");
@ -605,6 +612,9 @@ public class IoOrderDetailBizController extends BaseController {
public BaseResponse updateorderBiz(@RequestBody InvoiceRequest invoiceRequest) {
String billNo = null;
for (IoOrderDetailCodeEntity ioOrderDetailBizEntity : invoiceRequest.getList()) {
if(StringUtils.isEmpty(ioOrderDetailBizEntity.getOrderIdFk())){
ioOrderDetailBizEntity.setOrderIdFk(ioOrderDetailBizEntity.getBillNo());
}
ioOrderInvoiceService.updateRegStatus(ioOrderDetailBizEntity);
billNo = ioOrderDetailBizEntity.getOrderIdFk();
}

@ -113,4 +113,5 @@ public class TestCodeController {
return ResultVOUtils.success();
}
}

@ -238,6 +238,7 @@ public class IoOrderDetailBizEntity {
*/
@TableField(value = "ycBizNo")
private String ycBizNo;
@TableField(exist = false)
private String billNo;
}

@ -225,5 +225,7 @@ public class IoOrderDetailCodeEntity implements Serializable {
@TableField(value = "updateTime")
private Date updateTime;
@TableField(exist = false)
private String billNo;
}

@ -258,7 +258,7 @@ public class IoOrderResponse {
private String bzgg;
private String invoiceCode;
public String getFromName() {
if (StrUtil.isNotEmpty(fromCorpName))

@ -13,7 +13,8 @@
(select name from auth_dept ad2 where ad2.code = io.fromDeptCode) fromDeptName,
(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
(select name from basic_corp bc where bc.erpId = io.customerId) customerName,
(select invoiceCode from io_order_invoice inv where io.billNo = inv.orderIdFk limit 1) invoiceCode
from io_order as io
<where>
<if test="key != null and key != ''">

Loading…
Cancel
Save