发票修改

(cherry picked from commit ff1f825b39)
pro
wangwei 2 years ago
parent 306ec50bea
commit 298f3f3507

@ -559,7 +559,7 @@ public class IoOrderDetailBizController extends BaseController {
@Log(title = "发票管理", businessType = BusinessType.DELETE)
public BaseResponse deleteById(@RequestBody IoOrderInvoiceEntity ioOrderInvoiceEntity) {
ioOrderInvoiceService.deleteByInvId(ioOrderInvoiceEntity.getId().intValue());
ioOrderInvoiceService.deleteByInvId(ioOrderInvoiceEntity.getId()+"");
//更改 登记状态
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();
@ -600,8 +600,9 @@ public class IoOrderDetailBizController extends BaseController {
@PostMapping("/udiwms/inout/biz/insertInvoice")
@Log(title = "发票管理", businessType = BusinessType.INSERT)
public BaseResponse insertInvoice(@RequestBody IoOrderDetailBizEntity ioOrderDetailBizEntity) {
public BaseResponse insertInvoice(@RequestBody IoOrderInvoiceEntity ioOrderInvoice) {
for (IoOrderDetailBizEntity ioOrderDetailBizEntity : ioOrderInvoice.getList()) {
IoOrderInvoiceEntity ioOrderInvoiceEntity = new IoOrderInvoiceEntity();
ioOrderInvoiceEntity.setOrderIdFk(ioOrderDetailBizEntity.getOrderIdFk());
ioOrderInvoiceEntity.setBindRlFk(ioOrderDetailBizEntity.getBindRlFk() + "");
@ -612,17 +613,25 @@ public class IoOrderDetailBizController extends BaseController {
ioOrderInvoiceEntity.setCreateTime(new Date());
ioOrderInvoiceEntity.setUpdateTime(new Date());
ioOrderInvoiceEntity.setId(IdUtil.getSnowflakeNextId());
ioOrderInvoiceEntity.setMachineNo(ioOrderInvoice.getMachineNo());
ioOrderInvoiceEntity.setInvoiceCode(ioOrderInvoice.getInvoiceCode());
ioOrderInvoiceEntity.setInvoiceEncode(ioOrderInvoice.getInvoiceEncode());
ioOrderInvoiceEntity.setInvoiceDate(ioOrderInvoice.getInvoiceDate());
ioOrderInvoiceEntity.setPrice(ioOrderInvoice.getPrice());
ioOrderInvoiceEntity.setRemark(ioOrderInvoice.getRemark());
ioOrderInvoiceEntity.setLicenseUrl(ioOrderInvoice.getLicenseUrl());
boolean b = ioOrderInvoiceService.insertInvoice(ioOrderInvoiceEntity);
}
return ResultVOUtils.success("成功");
}
@PostMapping("/udiwms/inout/biz/updateorderBiz")
public BaseResponse updateorderBiz(@RequestBody IoOrderDetailBizEntity ioOrderDetailBizEntity) {
ioOrderDetailBizEntity.setRegStatus(true);
orderDetailBizService.updateOrderDetailBiz(ioOrderDetailBizEntity);
public BaseResponse updateorderBiz(@RequestBody List<IoOrderDetailBizEntity> list) {
for (IoOrderDetailBizEntity ioOrderDetailBizEntity : list) {
ioOrderDetailBizEntity.setRegStatus(true);
orderDetailBizService.updateOrderDetailBiz(ioOrderDetailBizEntity);
}
return ResultVOUtils.success("成功");
}
@ -637,21 +646,22 @@ public class IoOrderDetailBizController extends BaseController {
*/
@GetMapping("/udiwms/inout/bizDetail/filterBizOrderList")
public BaseResponse filterBizOrderList(FilterOrderDetailBizRequest orderDetailBizRequest) {
List<IoOrderDetailBizResponse> list = orderDetailBizService.filterList(orderDetailBizRequest);
List<IoOrderDetailBizResponse> list = orderDetailBizService.getfilterList(orderDetailBizRequest);
for (IoOrderDetailBizResponse ioOrderDetailBizResponse : list) {
String msg = "";
IoOrderInvoiceRequest ioOrderInvoiceEntity = new IoOrderInvoiceRequest();
ioOrderInvoiceEntity.setOrderIdFk(ioOrderDetailBizResponse.getOrderIdFk());
ioOrderInvoiceEntity.setBizIdFk(ioOrderDetailBizResponse.getId());
List<IoOrderInvoiceEntity> ioOrderInvoiceEntityList = ioOrderInvoiceService.selectOrderInvoice(ioOrderInvoiceEntity);
for (IoOrderInvoiceEntity obj : ioOrderInvoiceEntityList) {
if (StrUtil.isNotEmpty(obj.getInvoiceCode())) {
msg += "," + obj.getInvoiceCode();
if (StrUtil.isNotEmpty(obj.getInvoiceEncode())) {
msg += "," + obj.getInvoiceEncode();
}
}
if (msg.length() > 1) {
msg = msg.substring(1);
}
ioOrderDetailBizResponse.setInvoiceCodes(msg);
ioOrderDetailBizResponse.setInvoiceCodes(msg);
}
PageInfo<IoOrderDetailBizResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo);

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
@TableName(value = "io_order_detail_biz")
@ -201,4 +202,5 @@ public class IoOrderDetailBizEntity {
private boolean regStatus;
}

@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import java.util.List;
import kotlin.jvm.internal.Lambda;
import lombok.Data;
@Data
@ -110,6 +112,10 @@ public class IoOrderInvoiceEntity {
private Integer regId;
@TableField(exist = false)
private List<IoOrderDetailBizEntity> list;
public static final String COL_ID = "id";
public static final String COL_ORDERIDFK = "orderIdFk";

@ -3,12 +3,13 @@ package com.glxp.api.req.inout;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.List;
/**
*
*/
@Data
public class FilterOrderDetailBizRequest extends ListPageRequest {
/**
* ID
*/

@ -67,7 +67,7 @@ public class IoOrderInvoiceRequest {
private String remark;
private Long bizIdFk;
private Integer bizIdFk;
public static final String COL_ID = "id";

@ -167,6 +167,8 @@ public class IoOrderDetailBizResponse {
private boolean regStatus;
private String invoiceCode;
}

@ -12,7 +12,7 @@ public interface IoOrderInvoiceService extends IService<IoOrderInvoiceEntity> {
List<IoOrderInvoiceEntity> findByBillNo(String billNo);
boolean deleteByInvId(Integer id);
boolean deleteByInvId(String id);
boolean updateByInvId(IoOrderInvoiceRequest ioOrderInvoiceRequest);

@ -30,7 +30,7 @@ public class IoOrderInvoiceServiceImpl extends ServiceImpl<IoOrderInvoiceMapper,
@Override
public boolean deleteByInvId(Integer id) {
public boolean deleteByInvId(String id) {
return this.ioOrderInvoiceMapper.deleteById(id) > 0;
}

Loading…
Cancel
Save