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

pro
郑明梁 2 years ago
commit fc70a92213

@ -273,7 +273,7 @@ public class BasicOrderPrintController {
bizData.put("index", i);
bizData.put("nameCode", obj.getNameCode() == null ? ' ' : obj.getNameCode());
String udiCode = "#" + obj.getNameCode() + "#" + obj.getProduceDate() + "#" + obj.getExpireDate() +
"#" + obj.getBatchNo() + "#" + obj.getSerialNo() + "#" + obj.getWarehouseCode() + "#" + obj.getDeptCode();
"#" + obj.getBatchNo() + "#" + obj.getSerialNo() + "#" + "#";
udiCode = udiCode.replaceAll("#null", "#");
bizData.put("udiCode", udiCode);
bizData.put("cpmctymc", udiProductEntity.getCpmctymc() == null ? ' ' : udiProductEntity.getCpmctymc());

@ -395,6 +395,10 @@ public class IoOrderController extends BaseController {
@PostMapping("udiwms/inout/order/delete")
@Log(title = "单据管理", businessType = BusinessType.DELETE)
public BaseResponse deletById(@RequestBody DeleteRequest deleteRequest) {
IoOrderEntity orderEntity = orderService.findByBillNo(deleteRequest.getBillNo());
if (orderEntity.getStatus() != 1 && orderEntity.getStatus() != 3 && orderEntity.getStatus() != 4 && orderEntity.getStatus() != 6) {
return ResultVOUtils.error(500, "单据已提交无法删除!");
}
orderService.deleteByBillNo(deleteRequest.getBillNo());
orderDetailBizService.deleteByOrderId(deleteRequest.getBillNo());
orderDetailCodeService.deleteByOrderId(deleteRequest.getBillNo());

@ -2,6 +2,7 @@ package com.glxp.api.controller.inout;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
@ -27,6 +28,7 @@ import com.glxp.api.entity.thrsys.ThrOrderDetailEntity;
import com.glxp.api.entity.thrsys.ThrOrderEntity;
import com.glxp.api.entity.thrsys.ThrSystemBusApiEntity;
import com.glxp.api.req.inout.*;
import com.glxp.api.req.inv.FilterInvoiceRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.req.thrsys.FilterThrOrderDetailRequest;
import com.glxp.api.res.PageSimpleResponse;
@ -54,6 +56,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@ -653,6 +656,23 @@ public class IoOrderDetailBizController extends BaseController {
}
@GetMapping("/udiwms/inout/biz/parseInvoice")
public BaseResponse parseInvoice(String code) {
List<String> list = Arrays.asList(code.split(","));
FilterInvoiceRequest filterInvoiceRequest = new FilterInvoiceRequest();
filterInvoiceRequest.setType(list.get(1));
filterInvoiceRequest.setInvoiceCode(list.get(2));
filterInvoiceRequest.setInvoiceEncode(list.get(3));
filterInvoiceRequest.setPrice(new BigDecimal(list.get(4)));
filterInvoiceRequest.setInvoiceDate(DateUtil.formatDateTime(DateUtil.parse(list.get(5), "yyyyMMdd")));
return ResultVOUtils.success(filterInvoiceRequest);
}
@PostMapping("/udiwms/inout/biz/updateorderBiz")
public BaseResponse updateorderBiz(@RequestBody List<IoOrderDetailCodeEntity> list) {
String billNo = null;

@ -327,14 +327,16 @@ public class IoOrderReviewController extends BaseController {
if (StrUtil.isNotEmpty(code)) {
code = code.replace("\r\n", "");
}
if (code.endsWith("\u001D")) {
code = code.replace("\u001D", "");
}
for (IoCodeEntity checkOrderCodesBean : codesList) {
if (checkOrderCodesBean.getCode().toUpperCase(Locale.ROOT).equals(code.toUpperCase(Locale.ROOT))) {
if (checkOrderCodesBean.getStatus() == Constant.DB_CHECK_ED
String checkCode = checkOrderCodesBean.getCode();
if (checkCode.endsWith("\u001D")) {
checkCode = checkCode.replace("\u001D", "");
}
if (checkCode.toUpperCase(Locale.ROOT).equals(code.toUpperCase(Locale.ROOT))) {
if (IntUtil.value(checkOrderCodesBean.getStatus()) == Constant.DB_CHECK_ED
&& IntUtil.value(checkOrderCodesBean.getReCount()) == checkOrderCodesBean.getScanCount()) {
return Constant.CHECK_REPEAT;
}
@ -351,8 +353,18 @@ public class IoOrderReviewController extends BaseController {
public IoCodeEntity isExit(List<IoCodeEntity> codeList, String code) {
if (CollUtil.isNotEmpty(codeList)) {
if (StrUtil.isNotEmpty(code)) {
code = code.replace("\r\n", "");
}
if (code.endsWith("\u001D")) {
code = code.replace("\u001D", "");
}
for (IoCodeEntity codeEntity : codeList) {
if (codeEntity.getCode().equals(code)) {
String checkCode = codeEntity.getCode();
if (checkCode.endsWith("\u001D")) {
checkCode = checkCode.replace("\u001D", "");
}
if (checkCode.equals(code)) {
return codeEntity;
}
}

@ -0,0 +1,41 @@
package com.glxp.api.req.inv;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.math.BigDecimal;
/**
*
*/
@Data
public class FilterInvoiceRequest extends ListPageRequest {
/**
* 10010432()31()
*/
private String type;
/**
*
*/
private String invoiceCode;
/**
*
*/
private String invoiceEncode;
/**
*
*/
private String invoiceDate;
/**
*
*/
private BigDecimal price;
}

@ -276,6 +276,7 @@ public class IoOrderServiceImpl implements IoOrderService {
}
}
return 0;
}

@ -116,7 +116,7 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(filterUdiRelevance.getNameCode());
String udiCode = "#" + udiProductEntity.getNameCode() + "#" + obj.getProductDate() + "#" + obj.getExpireDate() +
"#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + udiProductEntity.getWarehouseCode() + "#" + udiProductEntity.getDeptCode();
"#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + "#" ;
udiCode = udiCode.replaceAll("#null", "#");
innerOrderPrintEntity.setUdiCode(udiCode);
invInnerOrderPrintDao.insert(innerOrderPrintEntity);
@ -165,12 +165,10 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
if (innerOrderQRCodeTextPDFTemplateRequest.getOrderId() != null) {
filterStockprintRequest.setSOrderId(innerOrderQRCodeTextPDFTemplateRequest.getOrderId());
deleteStPrintTempRequest.setStockOrderFk(innerOrderQRCodeTextPDFTemplateRequest.getOrderId() + "");
} else {
deleteStPrintTempRequest.setPrintCodeIdFk(innerOrderQRCodeTextPDFTemplateRequest.getQueryId());
filterStockprintRequest.setId(innerOrderQRCodeTextPDFTemplateRequest.getQueryId());
}
innerOrderPdfTempService.delete(deleteStPrintTempRequest);
List<InnerOrderPrintResponse> stockPrintEntities = invInnerOrderPrintService.filterJoinInnerPrint(filterStockprintRequest);
if (stockPrintEntities != null && stockPrintEntities.size() > 0) {
@ -285,7 +283,7 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
UdiProductEntity udiProductEntity = udiProductService.findByNameCode(filterUdiRelevance.getNameCode());
String udiCode = "#" + obj.getNameCode() + "#" + obj.getProductDate() + "#" + obj.getExpireDate() +
"#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + udiProductEntity.getWarehouseCode() + "#" + udiProductEntity.getDeptCode();
"#" + obj.getBatchNo() + "#" + udiProductEntity.getSerialNo() + "#" + "#" ;
udiCode = udiCode.replaceAll("#null", "#");
innerOrderPrintEntity.setUdiCode(udiCode);
invInnerOrderPrintDao.insert(innerOrderPrintEntity);

@ -20,24 +20,37 @@ public class UdiCalCountUtil {
// }
public int getActCount(UdiRelevanceResponse udiRelevanceResponse) {
int actCount;
if (!udiRelevanceResponse.getUseDy() && (udiRelevanceResponse.getDiType() == null || udiRelevanceResponse.getDiType() != 2)) {
if (udiRelevanceResponse.getBhzxxsbzsl() == 0) {
actCount = udiRelevanceResponse.getZxxsbzbhsydysl();
} else {
//启用使用单元
if (udiRelevanceResponse.getUseDy()) {
if (udiRelevanceResponse.getDiType() == 1) {
if (udiRelevanceResponse.getZxxsbzbhsydysl() == null || udiRelevanceResponse.getZxxsbzbhsydysl() == 0) {
udiRelevanceResponse.setZxxsbzbhsydysl(1);
}
return udiRelevanceResponse.getZxxsbzbhsydysl();
} else if (udiRelevanceResponse.getDiType() == 4) {
if (udiRelevanceResponse.getBhzxxsbzsl() == 0) {
udiRelevanceResponse.setBhzxxsbzsl(1);
}
if (udiRelevanceResponse.getZxxsbzbhsydysl() == null || udiRelevanceResponse.getZxxsbzbhsydysl() == 0) {
udiRelevanceResponse.setZxxsbzbhsydysl(1);
}
actCount = udiRelevanceResponse.getBhzxxsbzsl() * udiRelevanceResponse.getZxxsbzbhsydysl();
return udiRelevanceResponse.getBhzxxsbzsl() * udiRelevanceResponse.getZxxsbzbhsydysl();
} else {
return udiRelevanceResponse.getBhzxxsbzsl();
}
} else {//不启用使用单元
if (udiRelevanceResponse.getDiType() == 1) {
return 1;
} else if (udiRelevanceResponse.getDiType() == 4) {
if (udiRelevanceResponse.getBhzxxsbzsl() == 0) {
udiRelevanceResponse.setBhzxxsbzsl(1);
}
return udiRelevanceResponse.getBhzxxsbzsl();
} else {
return udiRelevanceResponse.getBhzxxsbzsl();
}
} else {
actCount = udiRelevanceResponse.getBhzxxsbzsl();
}
return actCount;
}
public int getActCount(IoCodeTempEntity codeTempEntity) {

Loading…
Cancel
Save