同步自助代码

master
郑明梁 2 years ago
parent a50c53339d
commit a1c70d91dc

@ -94,26 +94,27 @@ public class BasicOrderPrintController {
@PostMapping("/udiwms/pdf/template/order/file")
public void printSupCertProduction(@RequestBody FilterOrderPrintRequest filterOrderPrintRequest, HttpServletRequest request, HttpServletResponse response) throws Exception {
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(filterOrderPrintRequest.getTemplateId());
SystemPDFTemplateRelevanceEntity systemPDFTemplateRelevanceEntityt = systemPDFTemplateRelevanceService.selectModuleldAndAction(filterOrderPrintRequest.getModuleId(), filterOrderPrintRequest.getAction());
//打印单号标签
Map<String, Object> data = new HashMap<>(1);
List<Object> list = new ArrayList<>();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式
//查询打印格式
BasicBussinessTypeEntity basicBussinessTypeEntity=basicBussinessTypeService.findByAction(filterOrderPrintRequest.getAction());
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(filterOrderPrintRequest.getAction());
//根据批次号打印
if(basicBussinessTypeEntity.getOrderVisibleType()==0){
if (basicBussinessTypeEntity.getOrderVisibleType() == 0) {
//查询单据表
FilterOrderRequest filterOrderRequest=new FilterOrderRequest();
FilterOrderRequest filterOrderRequest = new FilterOrderRequest();
filterOrderRequest.setBillNo(filterOrderPrintRequest.getOrderIdFk());
IoOrderResponse ioOrderResponse= ioOrderService.filterList(filterOrderRequest).get(0);
IoOrderResponse ioOrderResponse = ioOrderService.filterList(filterOrderRequest).get(0);
//查询业务单详情
List<IoOrderDetailBizEntity> ioOrderDetailBizEntityList=ioOrderDetailBizService.findByOrderId(filterOrderPrintRequest.getOrderIdFk());
List<IoOrderDetailBizEntity> ioOrderDetailBizEntityList = ioOrderDetailBizService.findByOrderId(filterOrderPrintRequest.getOrderIdFk());
int i = 1;
if (ioOrderDetailBizEntityList != null && ioOrderDetailBizEntityList.size() > 0) {
for (IoOrderDetailBizEntity obj : ioOrderDetailBizEntityList) {
//查询产品表
UdiProductEntity udiProductEntity=udiProductService.findByUuid(obj.getUuidFk());
UdiProductEntity udiProductEntity = udiProductService.findByUuid(obj.getUuidFk());
//组装数据
Map<String, Object> bizData = new HashMap<>();
bizData.put("index", i);
@ -121,45 +122,48 @@ public class BasicOrderPrintController {
bizData.put("locInv", ioOrderResponse.getInvName() == null ? ' ' : ioOrderResponse.getInvName());
bizData.put("billNo", ioOrderResponse.getBillNo() == null ? ' ' : ioOrderResponse.getBillNo());
bizData.put("billdate", formatter.format(ioOrderResponse.getCreateTime()));
bizData.put("remark1", obj.getRemark1() == null ? ' ' : obj.getRemark1());
bizData.put("remark2", obj.getRemark2() == null ? ' ' : obj.getRemark2());
// bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms());
bizData.put("remark1", systemPDFTemplateRelevanceEntityt.getRemark1() == null ? ' ' : systemPDFTemplateRelevanceEntityt.getRemark1());
bizData.put("remark2", systemPDFTemplateRelevanceEntityt.getRemark2() == null ? ' ' : systemPDFTemplateRelevanceEntityt.getRemark2());
bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms());
bizData.put("spmc", obj.getCoName() == null ? ' ' : obj.getCoName());
bizData.put("spec", obj.getSpec() == null ? ' ' : obj.getSpec());
bizData.put("count", obj.getCount());
bizData.put("measname", obj.getMeasname() == null ? ' ' : obj.getMeasname());
bizData.put("price", obj.getPrice() == null ? '0' : obj.getPrice());
bizData.put("batchNo", obj.getBatchNo() == null ? ' ' : obj.getBatchNo());
// bizData.put("serialNo", udiProductEntity.getSerialNo() == null ? ' ' : udiProductEntity.getSerialNo());
bizData.put("productDate",obj.getProductDate());
bizData.put("expireDate", obj.getExpireDate());
bizData.put("manufactor", obj.getManufacturer());
// bizData.put("zczbhhzbapzbh",udiProductEntity.getZczbhhzbapzbh() == null ? ' ' : udiProductEntity.getZczbhhzbapzbh());
// bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc());
bizData.put("serialNo", udiProductEntity.getSerialNo() == null ? ' ' : udiProductEntity.getSerialNo());
bizData.put("productDate", obj.getProductDate());
bizData.put("expireDate", obj.getExpireDate());
bizData.put("manufactor", obj.getManufacturer());
bizData.put("zczbhhzbapzbh", obj.getCertCode() == null ? ' ' : obj.getCertCode());
bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc());
list.add(bizData);
i++;
}
}
}else{
} else {
//查询单据表
FilterOrderRequest filterOrderRequest=new FilterOrderRequest();
FilterOrderRequest filterOrderRequest = new FilterOrderRequest();
filterOrderRequest.setBillNo(filterOrderPrintRequest.getOrderIdFk());
IoOrderResponse ioOrderResponse= ioOrderService.filterList(filterOrderRequest).get(0);
IoOrderResponse ioOrderResponse = ioOrderService.filterList(filterOrderRequest).get(0);
//查询扫码单详情
List<IoCodeEntity> ioCodeEntityList=ioCodeService.findByOrderId(filterOrderPrintRequest.getOrderIdFk());
List<IoCodeEntity> ioCodeEntityList = ioCodeService.findByOrderId(filterOrderPrintRequest.getOrderIdFk());
//查询业务单据表
List<IoOrderDetailBizEntity> ioOrderDetailBizEntityList=ioOrderDetailBizService.findByOrderId(filterOrderPrintRequest.getOrderIdFk());
List<IoOrderDetailBizEntity> ioOrderDetailBizEntityList = ioOrderDetailBizService.findByOrderId(filterOrderPrintRequest.getOrderIdFk());
int i = 1;
if (ioCodeEntityList != null && ioCodeEntityList.size() > 0) {
IoOrderDetailBizEntity ioOrderDetailBizEntity=new IoOrderDetailBizEntity();
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
for (IoCodeEntity obj : ioCodeEntityList) {
//查询业务表
for(IoOrderDetailBizEntity ioObj:ioOrderDetailBizEntityList){
if(ioObj.getBatchNo().equals(obj.getBatchNo()) && ioObj.getBindRlFk().equals(obj.getRelId())){
ioOrderDetailBizEntity=ioObj;
for (IoOrderDetailBizEntity ioObj : ioOrderDetailBizEntityList) {
if (ioObj.getBatchNo().equals(obj.getBatchNo()) && ioObj.getBindRlFk().equals(obj.getRelId())) {
ioOrderDetailBizEntity = ioObj;
break;
}
}
}
//查询产品表
UdiProductEntity udiProductEntity = udiProductService.findByUuid(ioOrderDetailBizEntity.getUuidFk());
//组装数据
Map<String, Object> bizData = new HashMap<>();
bizData.put("index", i);
@ -167,9 +171,9 @@ public class BasicOrderPrintController {
bizData.put("locInv", ioOrderResponse.getInvName() == null ? ' ' : ioOrderResponse.getInvName());
bizData.put("billNo", ioOrderResponse.getBillNo() == null ? ' ' : ioOrderResponse.getBillNo());
bizData.put("billdate", formatter.format(ioOrderResponse.getCreateTime()));
bizData.put("remark1", ioOrderDetailBizEntity.getRemark1() == null ? ' ' : ioOrderDetailBizEntity.getRemark1());
bizData.put("remark2", ioOrderDetailBizEntity.getRemark2() == null ? ' ' : ioOrderDetailBizEntity.getRemark2());
// bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms());
bizData.put("remark1", systemPDFTemplateRelevanceEntityt.getRemark1() == null ? ' ' : systemPDFTemplateRelevanceEntityt.getRemark1());
bizData.put("remark2", systemPDFTemplateRelevanceEntityt.getRemark2() == null ? ' ' : systemPDFTemplateRelevanceEntityt.getRemark2());
bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms());
bizData.put("spmc", ioOrderDetailBizEntity.getCoName() == null ? ' ' : ioOrderDetailBizEntity.getCoName());
bizData.put("spec", ioOrderDetailBizEntity.getSpec() == null ? ' ' : ioOrderDetailBizEntity.getSpec());
bizData.put("count", ioOrderDetailBizEntity.getCount());
@ -177,11 +181,11 @@ public class BasicOrderPrintController {
bizData.put("price", ioOrderDetailBizEntity.getPrice() == null ? '0' : ioOrderDetailBizEntity.getPrice());
bizData.put("batchNo", ioOrderDetailBizEntity.getBatchNo() == null ? ' ' : ioOrderDetailBizEntity.getBatchNo());
bizData.put("serialNo", obj.getSerialNo() == null ? ' ' : obj.getSerialNo());
bizData.put("productDate",ioOrderDetailBizEntity.getProductDate());
bizData.put("expireDate", ioOrderDetailBizEntity.getExpireDate());
bizData.put("manufactor", ioOrderDetailBizEntity.getManufacturer());
// bizData.put("zczbhhzbapzbh",udiProductEntity.getZczbhhzbapzbh() == null ? ' ' : udiProductEntity.getZczbhhzbapzbh());
// bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc());
bizData.put("productDate", ioOrderDetailBizEntity.getProductDate());
bizData.put("expireDate", ioOrderDetailBizEntity.getExpireDate());
bizData.put("manufactor", ioOrderDetailBizEntity.getManufacturer());
bizData.put("zczbhhzbapzbh", ioOrderDetailBizEntity.getCertCode() == null ? ' ' : ioOrderDetailBizEntity.getCertCode());
bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc());
list.add(bizData);
i++;
}
@ -189,11 +193,9 @@ public class BasicOrderPrintController {
}
data.put("data", list);
String param = JSON.toJSONString(data);
JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf");
}
}
}

@ -104,7 +104,7 @@ public class SupCertController {
supCertEntity.setCustomerId(customerId);
supCertEntity.setType(postSelCertRequest.getCertType());
supCertEntity.setCreateTime(new Date());
supCertEntity.setStatus(supCertSetEntity.isNeed()==true ? 0:1);
supCertEntity.setStatus(0);
supCertEntity.setAuditStatus(ConstantStatus.AUDIT_DRAFT);
supCertEntity.setUpdateTime(new Date());
boolean b = supCertService.insertCompanyCert(supCertEntity);

@ -86,6 +86,8 @@ public class SupCertSetController {
FilterCertSetsRequest filterCertSetsRequest=new FilterCertSetsRequest();
filterCertSetsRequest.setType(supCertSetEntity.getType());
filterCertSetsRequest.setName(supCertSetEntity.getName());
filterCertSetsRequest.setId(supCertSetEntity.getId());
filterCertSetsRequest.setUpdateType(1);
List<SupCertSetEntity> supCertEntityList = supCertSetService.filterCertSets(filterCertSetsRequest);
if(supCertEntityList.size()!=0){
return ResultVOUtils.error(999,"证书已存在!");

@ -7,10 +7,11 @@ import lombok.Data;
@Data
public class FilterCertSetsRequest extends ListPageRequest {
private Integer id;
private String name;
private Integer type;
private Integer need;
private Integer updateType;
private String lastUpdateTime;

@ -95,7 +95,7 @@
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8,
basic_corp.name companyName,
company_product_relevance.price
basic_products.price
FROM company_product_relevance
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id

@ -16,6 +16,9 @@
<if test="need!=null">
and `need` = #{need}
</if>
<if test="updateType!=null">
and id != #{id}
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>

Loading…
Cancel
Save