发票登记

master
wangwei 2 years ago
parent 6feaa85616
commit 0b79be5350

@ -33,6 +33,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -80,6 +81,20 @@ public class IoOrderController extends BaseController {
return ResultVOUtils.page(pageInfo);
}
@GetMapping("/udiwms/inout/order/filterInvoice")
public BaseResponse filterInvoice(FilterOrderRequest filterOrderRequest) {
filterOrderRequest.setDealStatuses(Arrays.asList(2,3));
filterOrderRequest.setStatuses(Arrays.asList(7,5,8));
String customerId = getCustomerId();
if (!customerId.equals("110")) {
filterOrderRequest.setFromCorp(customerId);
}
List<IoOrderResponse> list = orderService.filterList(filterOrderRequest);
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo);
}
//新增业务-立即提交
@AuthRuleAnnotation("")

@ -25,6 +25,7 @@ import com.glxp.api.req.thrsys.FilterThrOrderDetailRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.basic.UdiRelevanceResponse;
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import com.glxp.api.service.auth.InvWarehouseService;
import com.glxp.api.service.basic.*;
import com.glxp.api.service.inout.*;
@ -35,10 +36,7 @@ import com.glxp.api.util.GennerOrderUtils;
import com.glxp.api.util.OrderNoTypeBean;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
@ -77,6 +75,11 @@ public class IoOrderDetailBizController extends BaseController {
@Resource
IBasicBusTypeChangeService basicBusTypeChangeService;
@Resource
IoOrderInvoiceService ioOrderInvoiceService;
//获取单据业务详情---临时接口查询
@AuthRuleAnnotation("")
@GetMapping("udiwms/inout/order/draft/biz")
@ -385,6 +388,13 @@ public class IoOrderDetailBizController extends BaseController {
return ResultVOUtils.page(pageInfo);
}
@GetMapping("/udiwms/inout/bizDetail/filterListInvoice")
public BaseResponse filterListInvoice(FilterOrderDetailBizRequest orderDetailBizRequest) {
List<IoOrderInvoiceResponse> list = orderDetailBizService.filterListInv(orderDetailBizRequest);
PageInfo<IoOrderInvoiceResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo);
}
@AuthRuleAnnotation("")
@PostMapping("/udiwms/inout/biz/updateBind")
@ -404,4 +414,54 @@ public class IoOrderDetailBizController extends BaseController {
}
/**
*
*
* @param id
* @return
*/
@GetMapping("/udiwms/inout/biz/deleteById")
public BaseResponse deleteById(Integer id) {
return ResultVOUtils.success(ioOrderInvoiceService.deleteByInvId(id));
}
/**
*
*
* @param ioOrderInvoiceRequest
* @return
*/
@PostMapping("/udiwms/inout/biz/updateById")
public BaseResponse deleteById(@RequestBody IoOrderInvoiceRequest ioOrderInvoiceRequest) {
return ResultVOUtils.success(ioOrderInvoiceService.updateByInvId(ioOrderInvoiceRequest));
}
@PostMapping("/udiwms/inout/biz/insertInvoice")
public BaseResponse insertInvoice(@RequestBody List<IoOrderDetailResultEntity> list) {
if (CollUtil.isEmpty(list)) {
return ResultVOUtils.error(500, "请选入产品!");
}
for (IoOrderDetailResultEntity ioOrderDetailResultEntity : list) {
IoOrderInvoiceEntity ioOrderInvoiceEntity = new IoOrderInvoiceEntity();
ioOrderInvoiceEntity.setOrderIdFk(ioOrderDetailResultEntity.getOrderIdFk());
ioOrderInvoiceEntity.setBindRlFk(ioOrderDetailResultEntity.getBindRlFk()+"");
ioOrderInvoiceEntity.setBatchNo(ioOrderDetailResultEntity.getBatchNo());
ioOrderInvoiceEntity.setProductDate(ioOrderDetailResultEntity.getProductDate());
ioOrderInvoiceEntity.setExpireDate(ioOrderDetailResultEntity.getExpireDate());
boolean b = ioOrderInvoiceService.insertInvoice(ioOrderInvoiceEntity);
}
return ResultVOUtils.success("成功");
}
}

@ -4,6 +4,7 @@ import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.req.inout.FilterOrderDetailBizRequest;
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import java.util.List;
@ -17,4 +18,6 @@ public interface IoOrderDetailBizDao extends BaseMapperPlus<IoOrderDetailBizDao,
*/
List<IoOrderDetailBizResponse> filterList(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderInvoiceResponse> filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest);
}

@ -1,9 +1,13 @@
package com.glxp.api.dao.inout;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.inout.IoOrderInvoiceEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface IoOrderInvoiceMapper extends BaseMapper<IoOrderInvoiceEntity> {
public interface IoOrderInvoiceMapper extends BaseMapperPlus<IoOrderInvoiceMapper, IoOrderInvoiceEntity, IoOrderInvoiceEntity> {
boolean insertInvoice(IoOrderInvoiceEntity ioOrderInvoiceEntity);
}

@ -73,6 +73,32 @@ public class IoOrderInvoiceEntity {
@TableField(value = "updateUser")
private String updateUser;
@TableField(value = "bindRlFk")
private String bindRlFk;
/**
*
*/
@TableField(value = "batchNo")
private String batchNo;
/**
*
*/
@TableField(value = "productDate")
private String productDate;
/**
*
*/
@TableField(value = "expireDate")
private String expireDate;
@TableField(value = "licenseUrl")
private String licenseUrl;
@TableField(value = "remark")
private String remark;

@ -0,0 +1,93 @@
package com.glxp.api.req.inout;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.glxp.api.entity.inout.IoOrderDetailResultEntity;
import com.glxp.api.entity.inout.IoOrderInvoiceEntity;
import com.glxp.api.entity.purchase.SupCertSetEntity;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @author : zhangsan
* @date : 2023/3/15 10:02
* @modyified By :
*/
@Data
public class IoOrderInvoiceRequest {
private Integer id;
private String orderIdFk;
private String machineNo;
private String invoiceCode;
private String invoiceEncode;
private String invoiceDate;
private String price;
private Date updateTime;
private String createUser;
private Date createTime;
private String updateUser;
private String bindRlFk;
private String batchNo;
private String productDate;
private String expireDate;
private String licenseUrl;
private String remark;
public static final String COL_ID = "id";
public static final String COL_ORDERIDFK = "orderIdFk";
public static final String COL_MACHINENO = "machineNo";
public static final String COL_INVOICECODE = "invoiceCode";
public static final String COL_INVOICEENCODE = "invoiceEncode";
public static final String COL_INVOICEDATE = "invoiceDate";
public static final String COL_PRICE = "price";
public static final String COL_UPDATETIME = "updateTime";
public static final String COL_CREATEUSER = "createUser";
public static final String COL_CREATETIME = "createTime";
public static final String COL_UPDATEUSER = "updateUser";
public static final String COL_REMARK = "remark";
}

@ -0,0 +1,114 @@
package com.glxp.api.res.inout;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName(value = "io_order_invoice")
public class IoOrderInvoiceResponse {
private Integer id;
/**
*
*/
private String orderIdFk;
/**
*
*/
private String machineNo;
/**
*
*/
private String invoiceCode;
/**
*
*/
private String invoiceEncode;
/**
*
*/
private String invoiceDate;
/**
*
*/
private String price;
/**
*
*/
private Date updateTime;
/**
*
*/
private String createUser;
/**
*
*/
private Date createTime;
/**
*
*/
private String updateUser;
private String bindRlFk;
/**
*
*/
private String batchNo;
/**
*
*/
private String productDate;
/**
*
*/
private String expireDate;
private String remark;
private String cpmctymc;
private String ggxh;
private String licenseUrl;
public static final String COL_ID = "id";
public static final String COL_ORDERIDFK = "orderIdFk";
public static final String COL_MACHINENO = "machineNo";
public static final String COL_INVOICECODE = "invoiceCode";
public static final String COL_INVOICEENCODE = "invoiceEncode";
public static final String COL_INVOICEDATE = "invoiceDate";
public static final String COL_PRICE = "price";
public static final String COL_UPDATETIME = "updateTime";
public static final String COL_CREATEUSER = "createUser";
public static final String COL_CREATETIME = "createTime";
public static final String COL_UPDATEUSER = "updateUser";
public static final String COL_REMARK = "remark";
}

@ -3,6 +3,7 @@ package com.glxp.api.service.inout;
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.req.inout.FilterOrderDetailBizRequest;
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import java.util.List;
@ -34,4 +35,7 @@ public interface IoOrderDetailBizService {
IoOrderDetailBizEntity selectByBatchNoAndBindRlFk(String batchNo,String bindRlFk);
List<IoOrderDetailBizEntity> checkOrderList(String orderId);
List<IoOrderInvoiceResponse> filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest);
}

@ -1,4 +1,14 @@
package com.glxp.api.service.inout;
import com.glxp.api.entity.inout.IoOrderInvoiceEntity;
import com.glxp.api.req.inout.IoOrderInvoiceRequest;
public interface IoOrderInvoiceService {
boolean deleteByInvId(Integer id);
boolean updateByInvId(IoOrderInvoiceRequest ioOrderInvoiceRequest);
boolean insertInvoice(IoOrderInvoiceEntity ioOrderInvoiceEntity);
}

@ -8,6 +8,7 @@ import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.entity.inout.IoOrderDetailCodeEntity;
import com.glxp.api.req.inout.FilterOrderDetailBizRequest;
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import com.glxp.api.service.inout.IoCheckInoutService;
import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderDetailCodeService;
@ -125,4 +126,9 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
return orderDetailBizEntities;
}
@Override
public List<IoOrderInvoiceResponse> filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest) {
return ioOrderDetailBizDao.filterListInv(orderDetailBizRequest);
}
}

@ -1,10 +1,34 @@
package com.glxp.api.service.inout.impl;
import com.glxp.api.dao.inout.IoOrderInvoiceMapper;
import com.glxp.api.entity.inout.IoOrderInvoiceEntity;
import com.glxp.api.req.inout.IoOrderInvoiceRequest;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.glxp.api.service.inout.IoOrderInvoiceService;
import javax.annotation.Resource;
@Service
public class IoOrderInvoiceServiceImpl implements IoOrderInvoiceService {
@Resource
IoOrderInvoiceMapper ioOrderInvoiceMapper;
@Override
public boolean deleteByInvId(Integer id) {
return this.ioOrderInvoiceMapper.deleteById(id)>0;
}
@Override
public boolean updateByInvId(IoOrderInvoiceRequest ioOrderInvoiceRequest) {
IoOrderInvoiceEntity ioOrderInvoiceEntity = new IoOrderInvoiceEntity();
BeanUtils.copyProperties(ioOrderInvoiceRequest,ioOrderInvoiceEntity);
return this.ioOrderInvoiceMapper.updateById(ioOrderInvoiceEntity)>0;
}
@Override
public boolean insertInvoice(IoOrderInvoiceEntity ioOrderInvoiceEntity) {
return ioOrderInvoiceMapper.insertInvoice(ioOrderInvoiceEntity);
}
}

@ -116,7 +116,7 @@ public class uploadController {
return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件只能是 jpg,png,doc,pdf 格式");
}
String newName = UUID.randomUUID() + fileType;//生成新文件名
String savePath = filePath + "/register/" + type;
String savePath = filePath + "/register/file/" + type;
File file1 = new File(savePath);
if (!file1.exists()) {// 判断目录是否存在

@ -22,4 +22,22 @@
</where>
group by io_order_detail_biz.id
</select>
</mapper>
<select id="filterListInv" resultType="com.glxp.api.res.inout.IoOrderInvoiceResponse">
SELECT
ic.*,
(select cpmctymc from basic_products where basic_products.uuid=bu.uuid) cpmctymc,
(select ggxh from basic_products where basic_products.uuid=bu.uuid) ggxh
FROM
io_order_invoice ic
LEFT JOIN basic_udirel bu ON bu.id = ic.bindRlFk
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
LEFT JOIN io_order_detail_biz io ON bu.id = io.bindRlFk
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND ic.orderIdFk = #{orderIdFk}
</if>
</where>
GROUP BY ic.orderIdFk
</select>
</mapper>

@ -1,4 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.inout.IoOrderInvoiceMapper">
<insert id="insertInvoice" parameterType="com.glxp.api.entity.inout.IoOrderInvoiceEntity">
INSERT INTO io_order_invoice( orderIdFk, bindRlFk,batchNo, productDate, expireDate
)
values (#{orderIdFk},
#{bindRlFk},
#{batchNo},
#{productDate},
#{expireDate}
)
</insert>
</mapper>

Loading…
Cancel
Save