|
|
|
@ -483,8 +483,8 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
@PostMapping("/udiwms/inout/order/delBizProduct")
|
|
|
|
|
@Log(title = "单据管理", businessType = BusinessType.DELETE)
|
|
|
|
|
public BaseResponse delBizProduct(@RequestBody DeleteRequest deleteRequest) {
|
|
|
|
|
IoOrderDetailBizEntity orderDetailBizEntity = orderDetailBizService.selectById(Integer.parseInt(deleteRequest.getId()));
|
|
|
|
|
int result = orderDetailBizService.deleteById(Integer.parseInt(deleteRequest.getId()));
|
|
|
|
|
IoOrderDetailBizEntity orderDetailBizEntity = orderDetailBizService.selectById(Long.parseLong(deleteRequest.getId()));
|
|
|
|
|
int result = orderDetailBizService.deleteById(Long.parseLong(deleteRequest.getId()));
|
|
|
|
|
if (result > 0) {
|
|
|
|
|
boolean r1 = orderDetailBizService.isExit(orderDetailBizEntity.getOrderIdFk());
|
|
|
|
|
boolean r2 = orderDetailCodeService.isExit(orderDetailBizEntity.getOrderIdFk());
|
|
|
|
@ -572,18 +572,16 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
|
|
|
|
|
ioOrderDetailBizEntity.setOrderIdFk(ioOrderInvoiceEntity.getOrderIdFk());
|
|
|
|
|
|
|
|
|
|
ioOrderDetailBizEntity.setId(ioOrderInvoiceResponse.getBizIdFk().intValue());
|
|
|
|
|
|
|
|
|
|
ioOrderInvoiceService.deleteByInvId(ioOrderInvoiceEntity.getId()+"");
|
|
|
|
|
ioOrderDetailBizEntity.setId(ioOrderInvoiceResponse.getBizIdFk().longValue());
|
|
|
|
|
ioOrderInvoiceService.deleteByInvId(ioOrderInvoiceEntity.getId() + "");
|
|
|
|
|
List<IoOrderInvoiceResponse> list = orderDetailBizService.filterListInv(filterOrderDetailBizRequest);
|
|
|
|
|
if(list.size()==0){
|
|
|
|
|
if (list.size() == 0) {
|
|
|
|
|
ioOrderDetailBizEntity.setRegStatus(false);
|
|
|
|
|
}
|
|
|
|
|
orderDetailCodeService.updateOrderDetailBiz(ioOrderDetailBizEntity);
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -607,16 +605,16 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
public BaseResponse insertInvoice(@RequestBody IoOrderInvoiceEntity ioOrderInvoice) {
|
|
|
|
|
|
|
|
|
|
for (IoOrderDetailBizEntity ioOrderDetailBizEntity : ioOrderInvoice.getList()) {
|
|
|
|
|
IoOrderInvoiceEntity ioOrderInvoiceEntity = new IoOrderInvoiceEntity();
|
|
|
|
|
ioOrderInvoiceEntity.setOrderIdFk(ioOrderDetailBizEntity.getOrderIdFk());
|
|
|
|
|
ioOrderInvoiceEntity.setBindRlFk(ioOrderDetailBizEntity.getBindRlFk() + "");
|
|
|
|
|
ioOrderInvoiceEntity.setBatchNo(ioOrderDetailBizEntity.getBatchNo());
|
|
|
|
|
ioOrderInvoiceEntity.setProductDate(ioOrderDetailBizEntity.getProductDate());
|
|
|
|
|
ioOrderInvoiceEntity.setExpireDate(ioOrderDetailBizEntity.getExpireDate());
|
|
|
|
|
ioOrderInvoiceEntity.setBizIdFk(ioOrderDetailBizEntity.getId());
|
|
|
|
|
ioOrderInvoiceEntity.setCreateTime(new Date());
|
|
|
|
|
ioOrderInvoiceEntity.setUpdateTime(new Date());
|
|
|
|
|
ioOrderInvoiceEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
|
IoOrderInvoiceEntity ioOrderInvoiceEntity = new IoOrderInvoiceEntity();
|
|
|
|
|
ioOrderInvoiceEntity.setOrderIdFk(ioOrderDetailBizEntity.getOrderIdFk());
|
|
|
|
|
ioOrderInvoiceEntity.setBindRlFk(ioOrderDetailBizEntity.getBindRlFk() + "");
|
|
|
|
|
ioOrderInvoiceEntity.setBatchNo(ioOrderDetailBizEntity.getBatchNo());
|
|
|
|
|
ioOrderInvoiceEntity.setProductDate(ioOrderDetailBizEntity.getProductDate());
|
|
|
|
|
ioOrderInvoiceEntity.setExpireDate(ioOrderDetailBizEntity.getExpireDate());
|
|
|
|
|
ioOrderInvoiceEntity.setBizIdFk(ioOrderDetailBizEntity.getId());
|
|
|
|
|
ioOrderInvoiceEntity.setCreateTime(new Date());
|
|
|
|
|
ioOrderInvoiceEntity.setUpdateTime(new Date());
|
|
|
|
|
ioOrderInvoiceEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
|
ioOrderInvoiceEntity.setMachineNo(ioOrderInvoice.getMachineNo());
|
|
|
|
|
ioOrderInvoiceEntity.setInvoiceCode(ioOrderInvoice.getInvoiceCode());
|
|
|
|
|
ioOrderInvoiceEntity.setInvoiceEncode(ioOrderInvoice.getInvoiceEncode());
|
|
|
|
@ -624,14 +622,14 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
ioOrderInvoiceEntity.setPrice(ioOrderInvoice.getPrice());
|
|
|
|
|
ioOrderInvoiceEntity.setRemark(ioOrderInvoice.getRemark());
|
|
|
|
|
ioOrderInvoiceEntity.setLicenseUrl(ioOrderInvoice.getLicenseUrl());
|
|
|
|
|
boolean b = ioOrderInvoiceService.insertInvoice(ioOrderInvoiceEntity);
|
|
|
|
|
boolean b = ioOrderInvoiceService.insertInvoice(ioOrderInvoiceEntity);
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.success("成功");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/udiwms/inout/biz/updateorderBiz")
|
|
|
|
|
public BaseResponse updateorderBiz(@RequestBody List<IoOrderDetailCodeEntity> list) {
|
|
|
|
|
public BaseResponse updateorderBiz(@RequestBody List<IoOrderDetailCodeEntity> list) {
|
|
|
|
|
for (IoOrderDetailCodeEntity ioOrderDetailBizEntity : list) {
|
|
|
|
|
ioOrderDetailBizEntity.setRegStatus(true);
|
|
|
|
|
orderDetailCodeService.updateOrderDetailBiz(ioOrderDetailBizEntity);
|
|
|
|
@ -641,7 +639,6 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询单据业务详情列表
|
|
|
|
|
*
|
|
|
|
@ -652,7 +649,7 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
public BaseResponse filterBizOrderList(FilterOrderDetailCodeRequest orderDetailBizRequest) {
|
|
|
|
|
List<IoOrderDetailCodeResponse> ioOrderDetailCodeResponses = orderDetailBizService.getfilterList(orderDetailBizRequest);
|
|
|
|
|
for (IoOrderDetailCodeResponse ioOrderDetailCodeRespons : ioOrderDetailCodeResponses) {
|
|
|
|
|
if(ioOrderDetailCodeRespons.getCount() != 0 && ioOrderDetailCodeRespons.getPrice()!=null ) {
|
|
|
|
|
if (ioOrderDetailCodeRespons.getCount() != 0 && ioOrderDetailCodeRespons.getPrice() != null) {
|
|
|
|
|
ioOrderDetailCodeRespons.setAmount(new BigDecimal(ioOrderDetailCodeRespons.getCount()).multiply(ioOrderDetailCodeRespons.getPrice()));
|
|
|
|
|
}
|
|
|
|
|
String msg = "";
|
|
|
|
|