发票打印

dev
wangwei 2 years ago
parent 6834adf0d5
commit d53659b272

@ -20,6 +20,7 @@ import com.glxp.api.req.inout.InspectionPDFTemplateRequest;
import com.glxp.api.req.purchase.FilterSupManufacturerRequest;
import com.glxp.api.req.purchase.purPlanPrintRequest;
import com.glxp.api.req.system.FilterPdfTemplateRequest;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import com.glxp.api.res.inout.IoOrderResponse;
import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
@ -122,6 +123,7 @@ public class BasicOrderPrintController {
for (IoOrderDetailBizEntity obj : ioOrderDetailBizEntityList) {
//查询产品表
UdiProductEntity udiProductEntity = udiProductService.findByUuid(obj.getUuidFk());
List<IoOrderInvoiceResponse> ioOrderInvoiceResponses = ioOrderDetailBizService.selectByorderIdFk(obj.getOrderIdFk());
//组装数据
Map<String, Object> bizData = new HashMap<>();
bizData.put("index", i);
@ -144,6 +146,19 @@ 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("cplb", udiProductEntity.getCplb() == null ? ' ' : udiProductEntity.getCplb());
if(ioOrderInvoiceResponses != null && ioOrderInvoiceResponses.size()>0){
String encode="";
for (IoOrderInvoiceResponse respons : ioOrderInvoiceResponses) {
encode+=respons.getInvoiceEncode()+",";
}
encode = encode.substring(0,encode.length()-1);
bizData.put("invoiceEncode", encode == null ? ' ' : encode);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateStr = sdf.format(ioOrderInvoiceResponses.get(0).getCreateTime());
bizData.put("createTime", dateStr == null ? ' ' : dateStr);
}
list.add(bizData);
i++;
}
@ -170,7 +185,7 @@ public class BasicOrderPrintController {
}
//查询产品表
UdiProductEntity udiProductEntity = udiProductService.findByUuid(ioOrderDetailBizEntity.getUuidFk());
List<IoOrderInvoiceResponse> ioOrderInvoiceResponses = ioOrderDetailBizService.selectByorderIdFk(ioOrderDetailBizEntity.getOrderIdFk());
//组装数据
Map<String, Object> bizData = new HashMap<>();
bizData.put("index", i);
@ -193,6 +208,18 @@ public class BasicOrderPrintController {
bizData.put("manufactor", ioOrderDetailBizEntity.getManufacturer());
bizData.put("zczbhhzbapzbh", ioOrderDetailBizEntity.getCertCode() == null ? ' ' : ioOrderDetailBizEntity.getCertCode());
bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc());
bizData.put("cplb", udiProductEntity.getCplb() == null ? ' ' : udiProductEntity.getCplb());
if(ioOrderInvoiceResponses != null && ioOrderInvoiceResponses.size()>0){
String encode="";
for (IoOrderInvoiceResponse respons : ioOrderInvoiceResponses) {
encode+=respons.getInvoiceEncode()+",";
}
encode = encode.substring(0,encode.length()-1);
bizData.put("invoiceEncode", encode == null ? ' ' : encode);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateStr = sdf.format(ioOrderInvoiceResponses.get(0).getCreateTime());
bizData.put("createTime", dateStr == null ? ' ' : dateStr);
}
list.add(bizData);
i++;
}

@ -27,6 +27,8 @@ public interface IoOrderDetailBizDao extends BaseMapperPlus<IoOrderDetailBizDao,
List<IoOrderInvoiceResponse> filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderInvoiceResponse> selectByorderIdFk(String orderIdFk);
IoOrderInvoiceResponse selectByinvoiceId(Long id);
/**

@ -46,6 +46,8 @@ public interface IoOrderDetailBizService {
List<IoOrderInvoiceResponse> filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderInvoiceResponse> selectByorderIdFk(String orderIdFk);
IoOrderInvoiceResponse selectByinvoiceId(Long id);
Boolean updateOrderDetailBiz(IoOrderDetailBizEntity ioOrderDetailBizEntity);

@ -191,6 +191,11 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
return ioOrderDetailBizDao.filterListInv(orderDetailBizRequest);
}
@Override
public List<IoOrderInvoiceResponse> selectByorderIdFk(String orderIdFk) {
return ioOrderDetailBizDao.selectByorderIdFk(orderIdFk);
}
@Override
public IoOrderInvoiceResponse selectByinvoiceId(Long id) {
return ioOrderDetailBizDao.selectByinvoiceId(id);

@ -81,6 +81,13 @@
where id = #{id}
</select>
<select id="selectByorderIdFk" parameterType="java.lang.String"
resultType="com.glxp.api.res.inout.IoOrderInvoiceResponse">
select *
from io_order_invoice
where orderIdFk = #{orderIdFk}
</select>
<select id="selectOrderDetailBiz" resultType="com.glxp.api.entity.inout.IoOrderDetailBizEntity">
select *
from io_order_detail_biz

Loading…
Cancel
Save