发票相关以orderresult表为准

test^2
anthonywj 2 years ago
parent de7412b096
commit 1846ce85dc

@ -37,6 +37,7 @@ import com.glxp.api.res.basic.UdiRelevanceResponse;
import com.glxp.api.res.basic.UdiRlSupResponse;
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import com.glxp.api.res.inout.IoOrderDetailResultResponse;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import com.glxp.api.service.auth.InvWarehouseService;
import com.glxp.api.service.basic.*;
@ -701,9 +702,9 @@ public class IoOrderDetailBizController extends BaseController {
*/
@GetMapping("/udiwms/inout/bizDetail/filterBizOrderList")
public BaseResponse filterBizOrderList(FilterOrderDetailCodeRequest orderDetailBizRequest) {
List<IoOrderDetailCodeResponse> ioOrderDetailCodeResponses = orderDetailBizService.getfilterOrderList(orderDetailBizRequest);
List<IoOrderDetailResultResponse> ioOrderDetailCodeResponses = orderDetailBizService.getInvoicResultDetail(orderDetailBizRequest);
List<IoOrderInvoiceEntity> orderInvoiceEntities = ioOrderInvoiceService.findByBillNo(orderDetailBizRequest.getOrderIdFk());
for (IoOrderDetailCodeResponse orderDetailCodeEntity : ioOrderDetailCodeResponses) {
for (IoOrderDetailResultResponse orderDetailCodeEntity : ioOrderDetailCodeResponses) {
if (orderDetailCodeEntity.getReCount() != 0 && orderDetailCodeEntity.getPrice() != null) {
orderDetailCodeEntity.setAmount(new BigDecimal(orderDetailCodeEntity.getReCount()).multiply(orderDetailCodeEntity.getPrice()));
}
@ -722,7 +723,7 @@ public class IoOrderDetailBizController extends BaseController {
}
orderDetailCodeEntity.setInvoiceCodes(msg);
}
PageInfo<IoOrderDetailCodeResponse> pageInfo = new PageInfo<>(ioOrderDetailCodeResponses);
PageInfo<IoOrderDetailResultResponse> pageInfo = new PageInfo<>(ioOrderDetailCodeResponses);
return ResultVOUtils.page(pageInfo);
}

@ -21,10 +21,7 @@ import com.glxp.api.req.inout.FilterOrderDetailCodeRequest;
import com.glxp.api.req.inout.IoOrderInvoiceRequest;
import com.glxp.api.req.inout.RefreshInoiceRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import com.glxp.api.res.inout.IoOrderResponse;
import com.glxp.api.res.inout.RefreshInoiceResponse;
import com.glxp.api.res.inout.*;
import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderDetailCodeService;
@ -95,8 +92,6 @@ public class IoOrderInvoiceController {
}
//分组查询发票列表
@AuthRuleAnnotation("")
@GetMapping("/udiwms/inout/order/group/invoice")
@ -162,8 +157,8 @@ public class IoOrderInvoiceController {
//查询单据详情
FilterOrderDetailCodeRequest orderDetailBizRequest = new FilterOrderDetailCodeRequest();
orderDetailBizRequest.setOrderIdFk(orderFk);
List<IoOrderDetailCodeResponse> ioOrderDetailCodeResponses = orderDetailBizService.getfilterOrderList(orderDetailBizRequest);
for (IoOrderDetailCodeResponse ioOrderDetailCodeRespons : ioOrderDetailCodeResponses) {
List<IoOrderDetailResultResponse> ioOrderDetailCodeResponses = orderDetailBizService.getInvoicResultDetail(orderDetailBizRequest);
for (IoOrderDetailResultResponse ioOrderDetailCodeRespons : ioOrderDetailCodeResponses) {
IoOrderInvoiceEntity ioOrderInvoiceEntity = new IoOrderInvoiceEntity();
BeanUtils.copyProperties(ioOrderInvoiceRequest, ioOrderInvoiceEntity);
ioOrderInvoiceEntity.setId(IdUtil.getSnowflakeNextId());
@ -192,7 +187,7 @@ public class IoOrderInvoiceController {
@Log(title = "发票管理", businessType = BusinessType.UPDATE)
public BaseResponse uploadInvoice(@RequestBody IoOrderInvoiceEntity ioOrderInvoice) {
List<IoOrderInvoiceEntity> ioOrderInvoiceEntityList=ioOrderInvoiceService.list(new QueryWrapper<IoOrderInvoiceEntity>().eq("invoiceEncode",ioOrderInvoice.getInvoiceEncode()));
List<IoOrderInvoiceEntity> ioOrderInvoiceEntityList = ioOrderInvoiceService.list(new QueryWrapper<IoOrderInvoiceEntity>().eq("invoiceEncode", ioOrderInvoice.getInvoiceEncode()));
for (IoOrderInvoiceEntity ioOrderInvoiceEntity : ioOrderInvoiceEntityList) {
ioOrderInvoiceEntity.setInvoiceDate(ioOrderInvoice.getInvoiceDate());
ioOrderInvoiceEntity.setPrice(ioOrderInvoice.getPrice());
@ -215,7 +210,7 @@ public class IoOrderInvoiceController {
if (StrUtil.isEmpty(deleteRequest.getInvoiceEncode()))
return ResultVOUtils.error(500, "发票编码不能为空");
boolean b = ioOrderInvoiceService.remove(new QueryWrapper<IoOrderInvoiceEntity>().eq("invoiceEncode", deleteRequest.getInvoiceEncode()).eq("orderIdFk",deleteRequest.getBillNo()));
boolean b = ioOrderInvoiceService.remove(new QueryWrapper<IoOrderInvoiceEntity>().eq("invoiceEncode", deleteRequest.getInvoiceEncode()).eq("orderIdFk", deleteRequest.getBillNo()));
if (b)
return ResultVOUtils.success("删除成功!");
else
@ -230,8 +225,8 @@ public class IoOrderInvoiceController {
return ResultVOUtils.error(500, "发票编码不能为空");
List<IoOrderInvoiceEntity> ioOrderInvoiceEntityList = ioOrderInvoiceService.list(new QueryWrapper<IoOrderInvoiceEntity>().eq("invoiceEncode", deleteRequest.getInvoiceEncode()));
if (CollectionUtils.isNotEmpty(ioOrderInvoiceEntityList) && ioOrderInvoiceEntityList.size()>0){
return ResultVOUtils.error(999,"发票编码已存在!");
if (CollectionUtils.isNotEmpty(ioOrderInvoiceEntityList) && ioOrderInvoiceEntityList.size() > 0) {
return ResultVOUtils.error(999, "发票编码已存在!");
}
return ResultVOUtils.success();

@ -2,10 +2,12 @@ package com.glxp.api.dao.inout;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.entity.inout.IoOrderDetailResultEntity;
import com.glxp.api.req.inout.FilterOrderDetailBizRequest;
import com.glxp.api.req.inout.FilterOrderDetailCodeRequest;
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import com.glxp.api.res.inout.IoOrderDetailResultResponse;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import org.apache.ibatis.annotations.Param;
@ -24,11 +26,11 @@ public interface IoOrderDetailBizDao extends BaseMapperPlus<IoOrderDetailBizDao,
List<IoOrderDetailCodeResponse> getfilterList(FilterOrderDetailCodeRequest orderDetailBizRequest);
List<IoOrderDetailCodeResponse> getfilterOrderList(FilterOrderDetailCodeRequest orderDetailBizRequest);
List<IoOrderDetailResultResponse> getfilterOrderList(FilterOrderDetailCodeRequest orderDetailBizRequest);
List<IoOrderInvoiceResponse> filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderInvoiceResponse> selectByorderIdFk(String orderIdFk);
List<IoOrderInvoiceResponse> selectByorderIdFk(String orderIdFk);
IoOrderInvoiceResponse selectByinvoiceId(Long id);

@ -165,6 +165,20 @@ public class IoOrderDetailResultResponse {
private String fromInvName;
private String fromName;
private int orderCount;
private String invoiceCodes;
private Integer sucCount;
private boolean regStatus;
//金额
private BigDecimal amount;
public String getFromName() {
if (StrUtil.isNotEmpty(fromCorpName))
return fromCorpName;

@ -1,10 +1,12 @@
package com.glxp.api.service.inout;
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.entity.inout.IoOrderDetailResultEntity;
import com.glxp.api.req.inout.FilterOrderDetailBizRequest;
import com.glxp.api.req.inout.FilterOrderDetailCodeRequest;
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import com.glxp.api.res.inout.IoOrderDetailResultResponse;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import java.util.List;
@ -46,13 +48,13 @@ public interface IoOrderDetailBizService {
List<IoOrderInvoiceResponse> filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderInvoiceResponse> selectByorderIdFk(String orderIdFk);
List<IoOrderInvoiceResponse> selectByorderIdFk(String orderIdFk);
IoOrderInvoiceResponse selectByinvoiceId(Long id);
Boolean updateOrderDetailBiz(IoOrderDetailBizEntity ioOrderDetailBizEntity);
List<IoOrderDetailCodeResponse> getfilterOrderList(FilterOrderDetailCodeRequest orderDetailBizRequest);
List<IoOrderDetailResultResponse> getInvoicResultDetail(FilterOrderDetailCodeRequest orderDetailBizRequest);
}

@ -9,11 +9,13 @@ import com.glxp.api.dao.inout.IoOrderDetailBizDao;
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.IoOrderDetailResultEntity;
import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.req.inout.FilterOrderDetailBizRequest;
import com.glxp.api.req.inout.FilterOrderDetailCodeRequest;
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import com.glxp.api.res.inout.IoOrderDetailResultResponse;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
import com.glxp.api.service.inout.IoCheckInoutService;
@ -132,7 +134,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
}
@Override
public List<IoOrderDetailCodeResponse> getfilterOrderList(FilterOrderDetailCodeRequest OrderDetailCodeRequest) {
public List<IoOrderDetailResultResponse> getInvoicResultDetail(FilterOrderDetailCodeRequest OrderDetailCodeRequest) {
if (null == OrderDetailCodeRequest) {
return Collections.emptyList();
}

@ -119,9 +119,9 @@
</where>
</select>
<select id="getfilterOrderList" resultType="com.glxp.api.res.inout.IoOrderDetailCodeResponse">
<select id="getfilterOrderList" resultType="com.glxp.api.res.inout.IoOrderDetailResultResponse">
select *
from io_order_detail_code
from io_order_detail_result
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk}
@ -133,6 +133,6 @@
AND batchNo = #{batchNo}
</if>
</where>
group by io_order_detail_code.id
group by io_order_detail_result.id
</select>
</mapper>

Loading…
Cancel
Save