|
|
|
@ -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);
|
|
|
|
|