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

pro
wj 2 years ago
commit d5bee1722d

@ -615,6 +615,7 @@ public class IoOrderDetailBizController extends BaseController {
orderService.update(orderEntity);
}
ioOrderDetailBizEntity.setCheckFileName(ioOrderDetailBizEntity.getFilePath());
ioOrderDetailBizEntity.setCheckColdFileName(ioOrderDetailBizEntity.getColdFilePath());
boolean b = orderDetailBizService.updateOrderDetailBiz(ioOrderDetailBizEntity);
return ResultVOUtils.success("修改成功!");
}

@ -2,6 +2,7 @@ package com.glxp.api.controller.inout;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.enums.ResultEnum;
@ -13,19 +14,36 @@ import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.entity.inout.IoOrderDetailCodeEntity;
import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
import com.glxp.api.req.inout.FilterCodeRequest;
import com.glxp.api.req.inout.FilterOrderDetailResultRequest;
import com.glxp.api.req.inout.FilterOrderRequest;
import com.glxp.api.req.inout.InspectionPDFTemplateRequest;
import com.glxp.api.res.inout.IoCodeResponse;
import com.glxp.api.res.inout.IoOrderDetailResultResponse;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
import com.glxp.api.service.inout.*;
import com.glxp.api.service.system.SystemPDFModuleService;
import com.glxp.api.service.system.SystemPDFTemplateService;
import com.glxp.api.util.JasperUtils;
import net.sf.jasperreports.engine.JRException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
@ -40,6 +58,12 @@ public class IoOrderDetailResultController extends BaseController {
IBasicBussinessTypeService basicBussinessTypeService;
@Resource
IoCodeService codeService;
@Resource
private SystemPDFTemplateService systemPDFTemplateService;
@Resource
private SystemPDFModuleService systemPDFModuleService;
@Value("${file_path}")
private String filePath;
/**
*
@ -140,4 +164,96 @@ public class IoOrderDetailResultController extends BaseController {
return ResultVOUtils.success(orderDetailBizEntities);
}
//校验模板是否正确
@AuthRuleAnnotation("")
@PostMapping("/udiwms/pdf/template/order/result/file")
public BaseResponse inspectionStockOrderPDFFromTemplateFile(@RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) {
//查询模板文件是否存在
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getId());
if (null == sysPdfTemplateRelevanceStatemenEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误");
}
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId()));
if (null == systemPDFTemplateEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
}
return ResultVOUtils.success(sysPdfTemplateRelevanceStatemenEntity.getTemplateId());
}
/**
*
*
* @param filterOrderDetailResultRequest
* @return
*/
@AuthRuleAnnotation("")
@PostMapping("/udiwms/inout/resultDetail/filterOrderPrint")
public BaseResponse filterOrderPrint(@RequestBody FilterOrderDetailResultRequest filterOrderDetailResultRequest, HttpServletRequest request, HttpServletResponse response) throws JRException, IOException {
List<IoOrderDetailResultResponse> ioOrderDetailResultResponseList=new ArrayList<>();
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(filterOrderDetailResultRequest.getTemplateId());
//打印单号标签
Map<String, Object> data = new HashMap<>(1);
List<Object> list = new ArrayList<>();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式
//按选入打印
if(filterOrderDetailResultRequest.getList() != null && filterOrderDetailResultRequest.getList().size()>0){
ioOrderDetailResultResponseList =filterOrderDetailResultRequest.getList();
}else{
//按查询打印
FilterOrderRequest filterOrderRequest = new FilterOrderRequest();
filterOrderRequest.setVueType(filterOrderDetailResultRequest.getActionType());
List<String> actions = orderService.setActions(filterOrderRequest);
if (CollUtil.isEmpty(actions)) {
return ResultVOUtils.success("");
}
filterOrderDetailResultRequest.setActions(actions);
ioOrderDetailResultResponseList = orderDetailResultService.filterOrderList(filterOrderDetailResultRequest);
for (IoOrderDetailResultResponse orderDetailResultResponse : ioOrderDetailResultResponseList) {
if (orderDetailResultResponse.getMainAction().equals(ConstantType.TYPE_OUT)) {
orderDetailResultResponse.setOutCount(orderDetailResultResponse.getReCount());
orderDetailResultResponse.setInCount(0);
} else {
orderDetailResultResponse.setOutCount(0);
orderDetailResultResponse.setInCount(orderDetailResultResponse.getReCount());
}
}
}
int i=1;
for (IoOrderDetailResultResponse ioOrderDetailResultResponse : ioOrderDetailResultResponseList) {
//组装数据
Map<String, Object> ioOrderDetailResultData = new HashMap<>();
ioOrderDetailResultData.put("index", String.valueOf(i));
ioOrderDetailResultData.put("nameCode", ioOrderDetailResultResponse.getNameCode() == null ? ' ' : ioOrderDetailResultResponse.getNameCode());
ioOrderDetailResultData.put("batchNo", ioOrderDetailResultResponse.getBatchNo() == null ? ' ' : ioOrderDetailResultResponse.getBatchNo());
ioOrderDetailResultData.put("productDate", ioOrderDetailResultResponse.getProductDate() == null ? ' ' : ioOrderDetailResultResponse.getProductDate());
ioOrderDetailResultData.put("expireDate", ioOrderDetailResultResponse.getExpireDate() == null ? ' ' : ioOrderDetailResultResponse.getExpireDate());
ioOrderDetailResultData.put("coName", ioOrderDetailResultResponse.getCoName() == null ? ' ' : ioOrderDetailResultResponse.getCoName());
ioOrderDetailResultData.put("certCode", ioOrderDetailResultResponse.getCertCode() == null ? ' ' : ioOrderDetailResultResponse.getCertCode());
ioOrderDetailResultData.put("ylqxzcrbarmc", ioOrderDetailResultResponse.getYlqxzcrbarmc() == null ? ' ' : ioOrderDetailResultResponse.getYlqxzcrbarmc());
ioOrderDetailResultData.put("manufacturer", ioOrderDetailResultResponse.getManufacturer() == null ? ' ' : ioOrderDetailResultResponse.getManufacturer());
ioOrderDetailResultData.put("measname", ioOrderDetailResultResponse.getMeasname() == null ? ' ' : ioOrderDetailResultResponse.getMeasname());
ioOrderDetailResultData.put("spec", ioOrderDetailResultResponse.getSpec() == null ? ' ' : ioOrderDetailResultResponse.getSpec());
ioOrderDetailResultData.put("price", ioOrderDetailResultResponse.getPrice() == null ? ' ' : ioOrderDetailResultResponse.getPrice());
ioOrderDetailResultData.put("count", ioOrderDetailResultResponse.getCount());
ioOrderDetailResultData.put("reCount",ioOrderDetailResultResponse.getReCount());
ioOrderDetailResultData.put("inCount", ioOrderDetailResultResponse.getInCount());
ioOrderDetailResultData.put("acceptCount", ioOrderDetailResultResponse.getAcceptCount());
ioOrderDetailResultData.put("fromCorpName", ioOrderDetailResultResponse.getFromCorpName() == null ? ' ' : ioOrderDetailResultResponse.getFromCorpName());
ioOrderDetailResultData.put("billTypeName", ioOrderDetailResultResponse.getBillTypeName() == null ? ' ' : ioOrderDetailResultResponse.getBillTypeName());
ioOrderDetailResultData.put("mainAction", ioOrderDetailResultResponse.getMainAction() == null ? ' ' : ioOrderDetailResultResponse.getMainAction());
ioOrderDetailResultData.put("auditTime", ioOrderDetailResultResponse.getAuditTime() == null ? ' ' : formatter.format(ioOrderDetailResultResponse.getAuditTime()));
list.add(ioOrderDetailResultData);
i++;
}
String param = JSON.toJSONString(list);
JasperUtils.jasperReport(request, response, param, filePath+"pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf");
return ResultVOUtils.success();
}
}

@ -25,7 +25,6 @@ import java.util.List;
public class IoOrderInvoiceController {
@Resource
IoOrderInvoiceService ioOrderInvoiceService;
RefreshInoiceRequest refreshInoiceRequest;
@Resource
IoOrderDetailCodeService orderDetailCodeService;
@ -37,7 +36,7 @@ public class IoOrderInvoiceController {
IoOrderInvoiceRequest orderInvoiceRequest = new IoOrderInvoiceRequest();
BeanUtils.copyProperties(refreshInoiceRequest, orderInvoiceRequest);
List<IoOrderInvoiceEntity> orderInvoiceEntities = ioOrderInvoiceService.selectOrderInvoice(orderInvoiceRequest);
List<IoOrderInvoiceEntity> orderInvoiceEntities = ioOrderInvoiceService.findByBillNo(orderInvoiceRequest.getOrderIdFk());
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderInvoiceRequest.getOrderIdFk());
RefreshInoiceResponse response = new RefreshInoiceResponse();

@ -1,5 +1,6 @@
package com.glxp.api.controller.inv;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
@ -12,6 +13,7 @@ import com.glxp.api.entity.inv.InnerOrderEntity;
import com.glxp.api.entity.inv.InvInnerOrderPrintEntity;
import com.glxp.api.entity.inv.InvInnerOrderPdfTempEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
import com.glxp.api.entity.system.SystemPDFModuleEntity;
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
import com.glxp.api.req.inout.InspectionPDFTemplateRequest;
@ -173,7 +175,7 @@ public class InvInnerOrderPrintController {
innerOrderPdfTempService.insertStockPrintTempEntity(stockPrintTempEntity);
stockPrintTempEntities.add(stockPrintTempEntity);
}
jaspaperService.printPdfLocal(splits, stockPrintTempEntities, systemPDFTemplateEntity.getPath());
jaspaperService.printPdfLocal(splits, stockPrintTempEntities, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath());
PageInfo<InvInnerOrderPdfTempEntity> pageInfo;
pageInfo = new PageInfo<>(stockPrintTempEntities);
PageSimpleResponse<InvInnerOrderPdfTempEntity> pageSimpleResponse = new PageSimpleResponse<>();
@ -184,7 +186,7 @@ public class InvInnerOrderPrintController {
} else {
Map<String, Object> data = new HashMap<String, Object>();
data.put("data", printEntities);
JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf");
JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
}
@ -219,6 +221,94 @@ public class InvInnerOrderPrintController {
}
//-----------打印码
@AuthRuleAnnotation("")
@PostMapping("/udiwms/pdf/template/inspection/stock/qrcode/text/statement/file")
public BaseResponse inspectionStockQRCodeTextPDFFromTemplateStatementFile(
@RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) throws Exception {
//查询模板文件是否存在
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getLabelId()+"");
if (null == sysPdfTemplateRelevanceStatemenEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误");
}
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId()));
if (null == systemPDFTemplateEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
}
return ResultVOUtils.success(sysPdfTemplateRelevanceStatemenEntity.getTemplateId());
}
@AuthRuleAnnotation("")
@PostMapping("/udiwms/pdf/template/stock/qrcode/text/statement/file")
public BaseResponse stockQRCodeTextPDFFromTemplateStatementFile(
@RequestBody InnerOrderQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest,
HttpServletRequest request, HttpServletResponse response) throws Exception {
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(stockQRCodeTextPDFTemplateRequest.getLabelId()+"");
if (sysPdfTemplateRelevanceStatemenEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查");
SystemPDFTemplateEntity systemPDFTemplateEntity =
systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId()));
if (systemPDFTemplateEntity == null) return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
List<InnerOrderPrintResponse> printEntities = new ArrayList<>();
List<InnerOrderPrintResponse> mStockPrintEntities = new ArrayList<>();
FilterinnerOrderprintRequest filterinnerOrderprintRequest = new FilterinnerOrderprintRequest();
if (stockQRCodeTextPDFTemplateRequest.getOrderId() != null) {
filterinnerOrderprintRequest.setSOrderId(stockQRCodeTextPDFTemplateRequest.getOrderId());
} else {
filterinnerOrderprintRequest.setId(stockQRCodeTextPDFTemplateRequest.getQueryId());
}
List<InnerOrderPrintResponse> stockPrintEntities = invInnerOrderPrintService.filterJoinInnerPrint(filterinnerOrderprintRequest);
if (stockPrintEntities != null && stockPrintEntities.size() > 0) {
mStockPrintEntities.addAll(stockPrintEntities);
}
for (InnerOrderPrintResponse InnerOrderPrintResponse : mStockPrintEntities) {
PdfPrintCountEntity pdfPrintCount = getCount(stockQRCodeTextPDFTemplateRequest.getCountList(), InnerOrderPrintResponse);
if (pdfPrintCount != null && pdfPrintCount.getRowCount() > 0) {
for (int i = 0; i < pdfPrintCount.getRowCount(); i++) {
InnerOrderPrintResponse clone = new InnerOrderPrintResponse();
BeanUtils.copyProperties(InnerOrderPrintResponse, clone);
printEntities.add(clone);
}
} else {
printEntities.add(InnerOrderPrintResponse);
}
}
String param = JSON.toJSONString(printEntities);
JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
String orderId = "";
for (InnerOrderPrintResponse InnerOrderPrintResponse : mStockPrintEntities) {
InvInnerOrderPrintEntity innerOrderPrintEntity = new InvInnerOrderPrintEntity();
innerOrderPrintEntity.setStatus(1);
innerOrderPrintEntity.setId(InnerOrderPrintResponse.getId());
invInnerOrderPrintService.updateOrder(innerOrderPrintEntity);
orderId = InnerOrderPrintResponse.getId() + "";
}
//查询订单id
InvInnerOrderPrintEntity innerOrderPrintEntity = invInnerOrderPrintService.selectById(orderId);
//更新内部码状态
InnerOrderEntity innerOrderEntity = innerOrderService.findByRecordKey(innerOrderPrintEntity.getOrderIdFk());
if (innerOrderEntity != null) {
innerOrderEntity.setGenStatus(2);
innerOrderEntity.setId(innerOrderEntity.getId());
innerOrderService.update(innerOrderEntity);
}
IoOrderEntity ioOrderEntity = new IoOrderEntity();
ioOrderEntity.setInCodeStatus(1);
ioOrderEntity.setBillNo(innerOrderPrintEntity.getOrderIdFk());
ioOrderService.updateByBillNo(ioOrderEntity);
return null;
}
public PdfPrintCountEntity getCount(List<PdfPrintCountEntity> countList, InnerOrderPrintResponse InnerOrderPrintResponse) {
for (PdfPrintCountEntity pdfPrintCount : countList) {
if (pdfPrintCount.getQueryId().equals(InnerOrderPrintResponse.getId() + "")) {

@ -116,7 +116,10 @@ public class PurOrderController {
if (purOrderRequest.getStatus() == null) {
purOrderRequest.setStatus(11); //查询未审核和草稿状态
}
String customerId = customerService.getCustomerId();
if (!customerId.equals("110")) {
purOrderRequest.setSupId(customerId);
}
List<PurOrderResponse> purApplyEntities = purOrderService.queryPageList(purOrderRequest);
PageInfo<PurOrderResponse> pageInfo;
pageInfo = new PageInfo<>(purApplyEntities);
@ -156,7 +159,7 @@ public class PurOrderController {
purOrderEntity.setUpdateTime(new Date());
purOrderService.update(purOrderEntity);
if(postPurOrderRequest.isAutoPurchase() && StrUtil.isNotEmpty(postPurOrderRequest.getTargetBillAction())){
if (postPurOrderRequest.isAutoPurchase() && StrUtil.isNotEmpty(postPurOrderRequest.getTargetBillAction())) {
String billNo = "";
List<PurOrderDetailEntity> purOrderDetailEntities = purOrderDetailService.findByOrderId(purOrderEntity.getId() + "");
@ -164,61 +167,59 @@ public class PurOrderController {
Map<String, List<PurOrderDetailEntity>> map = purOrderDetailEntities.stream().collect(Collectors.groupingBy(PurOrderDetailEntity::getSupId));
if (CollUtil.isNotEmpty(purOrderDetailEntities) && postPurOrderRequest.isAutoPurchase() == true
&& StrUtil.isNotEmpty(postPurOrderRequest.getTargetBillAction())) {
if (CollUtil.isNotEmpty(purOrderDetailEntities) && postPurOrderRequest.isAutoPurchase() == true
&& StrUtil.isNotEmpty(postPurOrderRequest.getTargetBillAction())) {
for (Map.Entry<String, List<PurOrderDetailEntity>> m : map.entrySet()) {
//生产单据表信息
IoOrderEntity ioOrderEntity = new IoOrderEntity();
ioOrderEntity.setBillNo(gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER, "yyyyMMdd")));
ioOrderEntity.setCorpOrderId(CustomUtil.getDate());
ioOrderEntity.setMainAction(ConstantType.TYPE_PUT);
ioOrderEntity.setAction(postPurOrderRequest.getTargetBillAction());
ioOrderEntity.setFromCorp(m.getKey());
ioOrderEntity.setFromType(ConstantStatus.FROM_Order);
ioOrderEntity.setStatus(1);
ioOrderEntity.setDealStatus(1);
ioOrderEntity.setOrderType(1);
ioOrderEntity.setCreateTime(new Date());
ioOrderEntity.setCreateUser(postPurOrderRequest.getPurOrderEntity().getAuditUser());
ioOrderEntity.setUpdateTime(new Date());
ioOrderEntity.setUpdateUser(postPurOrderRequest.getPurOrderEntity().getAuditUser());
ioOrderEntity.setCustomerId("110");
ioOrderEntity.setDeptCode(purOrderEntity.getDeptCode());
ioOrderEntity.setInvCode(purOrderEntity.getInvCode());
ioOrderService.insertOrder(ioOrderEntity);
billNo += ioOrderEntity.getBillNo() + ",";
//插入业务单表
for (PurOrderDetailEntity obj : m.getValue()) {
BasicProductsEntity basicProductsEntity = purOrderDetailService.selectIoOrderDetailBiz(obj.getId());
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo());
ioOrderDetailBizEntity.setBindRlFk(Long.valueOf(obj.getProductId()));
ioOrderDetailBizEntity.setCount(obj.getCount());
ioOrderDetailBizEntity.setUuidFk(basicProductsEntity.getUuid());
ioOrderDetailBizEntity.setNameCode(basicProductsEntity.getNameCode());
ioOrderDetailBizEntity.setCoName(basicProductsEntity.getCpmctymc());
ioOrderDetailBizEntity.setCertCode(basicProductsEntity.getZczbhhzbapzbh());
ioOrderDetailBizEntity.setYlqxzcrbarmc(basicProductsEntity.getYlqxzcrbarmc());
ioOrderDetailBizEntity.setManufacturer(basicProductsEntity.getManufactory());
ioOrderDetailBizEntity.setMeasname(basicProductsEntity.getMeasname());
ioOrderDetailBizEntity.setSpec(basicProductsEntity.getGgxh());
if (basicProductsEntity.getPrice() != null) {
ioOrderDetailBizEntity.setPrice(BigDecimal.valueOf(basicProductsEntity.getPrice()));
}
ioOrderDetailBizEntity.setSupId(obj.getSupId());
ioOrderDetailBizService.insert(ioOrderDetailBizEntity);
for (Map.Entry<String, List<PurOrderDetailEntity>> m : map.entrySet()) {
//生产单据表信息
IoOrderEntity ioOrderEntity = new IoOrderEntity();
ioOrderEntity.setBillNo(gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER, "yyyyMMdd")));
ioOrderEntity.setCorpOrderId(CustomUtil.getDate());
ioOrderEntity.setMainAction(ConstantType.TYPE_PUT);
ioOrderEntity.setAction(postPurOrderRequest.getTargetBillAction());
ioOrderEntity.setFromCorp(m.getKey());
ioOrderEntity.setFromType(ConstantStatus.FROM_Order);
ioOrderEntity.setStatus(1);
ioOrderEntity.setDealStatus(1);
ioOrderEntity.setOrderType(1);
ioOrderEntity.setCreateTime(new Date());
ioOrderEntity.setCreateUser(postPurOrderRequest.getPurOrderEntity().getAuditUser());
ioOrderEntity.setUpdateTime(new Date());
ioOrderEntity.setUpdateUser(postPurOrderRequest.getPurOrderEntity().getAuditUser());
ioOrderEntity.setCustomerId("110");
ioOrderEntity.setDeptCode(purOrderEntity.getDeptCode());
ioOrderEntity.setInvCode(purOrderEntity.getInvCode());
ioOrderService.insertOrder(ioOrderEntity);
billNo += ioOrderEntity.getBillNo() + ",";
//插入业务单表
for (PurOrderDetailEntity obj : m.getValue()) {
BasicProductsEntity basicProductsEntity = purOrderDetailService.selectIoOrderDetailBiz(obj.getId());
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
ioOrderDetailBizEntity.setOrderIdFk(ioOrderEntity.getBillNo());
ioOrderDetailBizEntity.setBindRlFk(Long.valueOf(obj.getProductId()));
ioOrderDetailBizEntity.setCount(obj.getCount());
ioOrderDetailBizEntity.setUuidFk(basicProductsEntity.getUuid());
ioOrderDetailBizEntity.setNameCode(basicProductsEntity.getNameCode());
ioOrderDetailBizEntity.setCoName(basicProductsEntity.getCpmctymc());
ioOrderDetailBizEntity.setCertCode(basicProductsEntity.getZczbhhzbapzbh());
ioOrderDetailBizEntity.setYlqxzcrbarmc(basicProductsEntity.getYlqxzcrbarmc());
ioOrderDetailBizEntity.setManufacturer(basicProductsEntity.getManufactory());
ioOrderDetailBizEntity.setMeasname(basicProductsEntity.getMeasname());
ioOrderDetailBizEntity.setSpec(basicProductsEntity.getGgxh());
if (basicProductsEntity.getPrice() != null) {
ioOrderDetailBizEntity.setPrice(BigDecimal.valueOf(basicProductsEntity.getPrice()));
}
ioOrderDetailBizEntity.setSupId(obj.getSupId());
ioOrderDetailBizService.insert(ioOrderDetailBizEntity);
}
purOrderEntity.setStockOrderNo(billNo.substring(0, billNo.length() - 1));
purOrderService.update(purOrderEntity);
}
purOrderEntity.setStockOrderNo(billNo.substring(0, billNo.length() - 1));
purOrderService.update(purOrderEntity);
}
}
return ResultVOUtils.success("更新成功!");
}

@ -241,6 +241,11 @@ public class SupCertController {
supCertEntity.setUpdateTime(new Date());
supCertEntity.setStatus(0);
supCertEntity.setId(IdUtil.getSnowflakeNextId());
if (supCertEntity.getVailDate() != null && supCertEntity.getExpireDate() != null) {
if (supCertEntity.getVailDate().getTime() > supCertEntity.getExpireDate().getTime()) {
return ResultVOUtils.error(999, "失效期不能小于生效期!");
}
}
boolean b = supCertService.insertCompanyCert(supCertEntity);
return ResultVOUtils.success("成功");
}
@ -305,7 +310,7 @@ public class SupCertController {
if (postSupCertRequest.getVailDate() != null && postSupCertRequest.getExpireDate() != null) {
if (postSupCertRequest.getVailDate().getTime() > postSupCertRequest.getExpireDate().getTime()) {
return ResultVOUtils.error(999, "生效期不能小于失效期!");
return ResultVOUtils.error(999, "失效期不能小于生效期!");
}
}

@ -180,12 +180,23 @@ public class IoOrderDetailBizEntity {
@TableField(value = "filePath")
private String filePath;
@TableField(value = "coldFilePath")
private String coldFilePath;
/**
*
*/
@TableField(value = "checkFileName")
private String checkFileName;
/**
*
*/
@TableField(value = "checkColdFileName")
private String checkColdFileName;
@TableField(exist = false)
private boolean checkSuccess;

@ -1,5 +1,6 @@
package com.glxp.api.req.inout;
import com.glxp.api.res.inout.IoOrderDetailResultResponse;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
@ -43,7 +44,9 @@ public class FilterOrderDetailResultRequest extends ListPageRequest {
private String endAduditTime; //结束日期
private String fromCorp;
private String actionType;
private String templateId;
private String manufacturer;
private String zczbhhzbapzbh;
private List<String> actions;
private List<IoOrderDetailResultResponse> list;
}

@ -81,6 +81,7 @@ public class PurOrderRequest extends ListPageRequest {
private Date auditTime;
private String createUser;
private String supId;
/**
*

@ -169,6 +169,10 @@ public class IoOrderDetailBizResponse {
private String invoiceCode;
private String coldFilePath;
private String checkColdFileName;
}

@ -3,6 +3,7 @@ package com.glxp.api.res.inout;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* VO
@ -159,6 +160,7 @@ public class IoOrderDetailResultResponse {
private String fromCorpName;
private String billTypeName;
private String mainAction;
private Date auditTime;
}

@ -54,7 +54,7 @@ public class SupplementVailUtil {
basicProductSetEntity = basicProductSetEntityMap.get("manufactory");
if (isMustFill(type, basicProductSetEntity)) {
if (StrUtil.isEmptyIfStr(supplementRequest.getManufactory())) {
return "生产厂家不能为空";
return "生产企业不能为空";
}
}

@ -13,18 +13,18 @@
<select id="selectOrderInvoice" parameterType="com.glxp.api.req.inout.IoOrderInvoiceRequest"
resultType="com.glxp.api.entity.inout.IoOrderInvoiceEntity">
SELECT ic.*,
(select cpmctymc from basic_products where basic_products.uuid = bu.uuid GROUP BY basic_products.uuid) cpmctymc,
(select ggxh from basic_products where basic_products.uuid = bu.uuid GROUP BY basic_products.uuid) ggxh
(select cpmctymc
from basic_products
where basic_products.uuid = bu.uuid
GROUP BY basic_products.uuid) cpmctymc,
(select ggxh from basic_products where basic_products.uuid = bu.uuid GROUP BY basic_products.uuid) ggxh
FROM io_order_invoice ic
LEFT JOIN basic_udirel bu ON bu.id = ic.bindRlFk
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
LEFT JOIN basic_udirel bu ON bu.id = ic.bindRlFk
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND ic.orderIdFk = #{orderIdFk}
</if>
<if test="orderIdFk == null || orderIdFk == ''">
AND (ic.orderIdFk is null or ic.orderIdFk = '')
</if>
<if test="bindRlFk != null">
AND ic.bindRlFk = #{bindRlFk}
</if>
@ -34,7 +34,6 @@
<if test="batchNo == null || batchNo == ''">
AND (ic.batchNo is null or ic.batchNo = '')
</if>
</where>
GROUP BY ic.id
</select>

@ -40,12 +40,15 @@
cb.employeeName createUserName,
ab.employeeName auditUserName,
auth_warehouse.NAME invName,
auth_dept.`name` deptName
auth_dept.`name` deptName,
basic_corp.name supName
FROM pur_order
LEFT JOIN auth_user cb ON pur_order.createUser = cb.id
LEFT JOIN auth_user ab ON pur_order.auditUser = ab.id
LEFT JOIN auth_warehouse ON pur_order.invCode = auth_warehouse.`code`
LEFT JOIN auth_dept ON auth_dept.CODE = pur_order.deptCode
left join basic_corp on pur_order.supId = basic_corp.erpId
<where>
<if test="billNo != '' and billNo != null">
AND billNo = #{billNo}
@ -92,6 +95,9 @@
<if test="auditUser != '' and auditUser != null">
AND auditUser = #{auditUser}
</if>
<if test="supId != null and supId != ''">
AND pur_order.supId = #{supId}
</if>
<if test="createUser != '' and createUser != null">
AND createUser = #{createUser}
</if>

@ -184,6 +184,11 @@ CALL Pro_Temp_ColumnWork('sys_pdf_template', 'bussinessStatus', 'varchar(255)',
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'filePath', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'coldFilePath', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'checkColdFileName', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order', 'checkStatus', 'tinyint', 1);
INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`)

Loading…
Cancel
Save