| | |
| | | {field: 'endOperationOrderNumber', width: '100',title: '调拨序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operator', width: '100',title: t('productStock.creator'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operateTime', width:'140', title: t('productStock.productionDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processId', width:'140', title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'type', width:'140', title: '领出类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reviewed', width: '100',title: t('productStock.reviewed'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reviewedTime', width: '140',title: t('productStock.approvedDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'remarks', width: '140',title: t('productStock.remarks'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.dto.mm.FinishedOperateLogDTO; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | |
| | | @PostMapping("/exportFinishedOperateLogReport") |
| | | public void exportFinishedOperateLogReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, FinishedOperateLog.class, finishedGoodsInventoryService.exportFinishedOperateLogReport(dates),"orderReport"); |
| | | DownExcel.download(response, FinishedOperateLogDTO.class, finishedGoodsInventoryService.exportFinishedOperateLogReport(dates),"orderReport"); |
| | | } |
| | | } |
| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.dto.mm.FinishedOperateLogDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailProductDTO; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.sd.DeliveryService; |
| | | import com.example.erp.tools.DownExcel; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | return Result.seccess(deliveryService.getSelectDeliveryPrinting(deliveryDetail)); |
| | | } |
| | | |
| | | @ApiOperation("发货明细报表") |
| | | @PostMapping("/exportDeliveryDetailReport") |
| | | public void exportDeliveryDetailReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, DeliveryDetailDTO.class, deliveryService.exportDeliveryDetailReport(dates),"orderReport"); |
| | | } |
| | | |
| | | @ApiOperation("发货明细产品分类报表") |
| | | @PostMapping("/exportDeliveryDetailProductReport") |
| | | public void exportDeliveryDetailProductReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, DeliveryDetailProductDTO.class, deliveryService.exportDeliveryDetailProductReport(dates),"orderReport"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.example.erp.dto.mm; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class FinishedOperateLogDTO{ |
| | | @ExcelProperty("编号") |
| | | private Long id; |
| | | @ExcelProperty("操作单号") |
| | | private String operationOrderNumber; |
| | | @ExcelProperty("销售单号") |
| | | private String orderId; |
| | | @ExcelProperty("订单序号") |
| | | private Integer operationNumber; |
| | | @ExcelProperty("类型") |
| | | private String operateType; |
| | | @ExcelProperty("数量") |
| | | private Integer quantity; |
| | | @ExcelProperty("产品Id") |
| | | private Integer productId; |
| | | @ExcelProperty("产品") |
| | | private String productName; |
| | | @ExcelProperty("宽") |
| | | private Double width; |
| | | @ExcelProperty("高") |
| | | private Double height; |
| | | @ExcelProperty("调拨销售单号") |
| | | private String staterOperationOrderNumber; |
| | | @ExcelProperty("调拨序号") |
| | | private String endOperationOrderNumber; |
| | | @ExcelProperty("制单人") |
| | | private String operator; |
| | | @ExcelProperty("制单日期") |
| | | private LocalDate operateTime; |
| | | @ExcelProperty("流程卡号") |
| | | private String processId; |
| | | @ExcelProperty("领出类型") |
| | | private String type; |
| | | @ExcelProperty("审核人") |
| | | private String reviewed; |
| | | @ExcelProperty("审核日期") |
| | | private LocalDate reviewedTime; |
| | | @ExcelProperty("备注") |
| | | private String remarks; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.dto.sd; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | |
| | | @Data |
| | | public class DeliveryDetailDTO{ |
| | | @ExcelProperty("编号") |
| | | private Long id; |
| | | @ExcelProperty("发货单号") |
| | | private String deliveryId; |
| | | @ExcelProperty("发货序号") |
| | | private Integer deliveryNumber; |
| | | @ExcelProperty("付款条件") |
| | | private String paymentTerms; |
| | | @ExcelProperty("项目名称") |
| | | private String project; |
| | | @ExcelProperty("数量") |
| | | private Integer quantity; |
| | | @ExcelProperty("面积") |
| | | private Double area; |
| | | @ExcelProperty("金额") |
| | | private Double money; |
| | | @ExcelProperty("客户编号") |
| | | private String customerId; |
| | | @ExcelProperty("客户名称") |
| | | private String customerName; |
| | | @ExcelProperty("送货日期") |
| | | private LocalDate deliveryDate; |
| | | @ExcelProperty("支付方式") |
| | | private String payMethod; |
| | | @ExcelProperty("支付日期") |
| | | private LocalDate payDate; |
| | | @ExcelProperty("销售员") |
| | | private String salesman; |
| | | @ExcelProperty("发货员") |
| | | private String creator; |
| | | @ExcelProperty("联系人") |
| | | private String contacts; |
| | | @ExcelProperty("联系电话") |
| | | private String contactNumber; |
| | | @ExcelProperty("送货地址") |
| | | private String deliveryAddress; |
| | | @ExcelProperty("销售单号") |
| | | private String orderId; |
| | | @ExcelProperty("订单序号") |
| | | private Integer orderNumber; |
| | | @ExcelProperty("备注") |
| | | private String deliveryDetailRemakes; |
| | | @ExcelProperty("报表日期") |
| | | private LocalDate createTime; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.dto.sd; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class DeliveryDetailProductDTO{ |
| | | @ExcelProperty("编号") |
| | | private Long id; |
| | | @ExcelProperty("发货单号") |
| | | private String deliveryId; |
| | | @ExcelProperty("发货序号") |
| | | private Integer deliveryNumber; |
| | | @ExcelProperty("产品Id") |
| | | private Integer productId; |
| | | @ExcelProperty("产品") |
| | | private String productName; |
| | | @ExcelProperty("付款条件") |
| | | private String paymentTerms; |
| | | @ExcelProperty("项目名称") |
| | | private String project; |
| | | @ExcelProperty("数量") |
| | | private Integer quantity; |
| | | @ExcelProperty("面积") |
| | | private Double area; |
| | | @ExcelProperty("金额") |
| | | private Double money; |
| | | @ExcelProperty("客户编号") |
| | | private String customerId; |
| | | @ExcelProperty("客户名称") |
| | | private String customerName; |
| | | @ExcelProperty("送货日期") |
| | | private LocalDate deliveryDate; |
| | | @ExcelProperty("支付方式") |
| | | private String payMethod; |
| | | @ExcelProperty("支付日期") |
| | | private LocalDate payDate; |
| | | @ExcelProperty("销售员") |
| | | private String salesman; |
| | | @ExcelProperty("发货员") |
| | | private String creator; |
| | | @ExcelProperty("联系人") |
| | | private String contacts; |
| | | @ExcelProperty("联系电话") |
| | | private String contactNumber; |
| | | @ExcelProperty("送货地址") |
| | | private String deliveryAddress; |
| | | @ExcelProperty("销售单号") |
| | | private String orderId; |
| | | @ExcelProperty("订单序号") |
| | | private Integer orderNumber; |
| | | @ExcelProperty("备注") |
| | | private String deliveryDetailRemakes; |
| | | @ExcelProperty("报表日期") |
| | | private LocalDate createTime; |
| | | |
| | | } |
| | |
| | | package com.example.erp.mapper.mm; |
| | | |
| | | import com.example.erp.dto.mm.FinishedOperateLogDTO; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog); |
| | | |
| | | List<FinishedOperateLog> exportFinishedOperateLogReport(List<LocalDate> dates); |
| | | List<FinishedOperateLogDTO> exportFinishedOperateLogReport(List<LocalDate> dates); |
| | | } |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.example.erp.dto.sd.DeliveryDetailDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailProductDTO; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.Order; |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.repository.CrudRepository; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | Boolean deleteDeliveryDetail(@Param("deliveryId") String deliveryId); |
| | | |
| | | List<DeliveryDetailDTO> exportDeliveryDetailReport(List<LocalDate> dates); |
| | | |
| | | List<DeliveryDetailProductDTO> exportDeliveryDetailProductReport(List<LocalDate> dates); |
| | | |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.dto.mm.FinishedOperateLogDTO; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | |
| | | |
| | | } |
| | | |
| | | public List<FinishedOperateLog> exportFinishedOperateLogReport(List<LocalDate> dates) { |
| | | System.out.println(finishedOperateLogMapper.exportFinishedOperateLogReport(dates)); |
| | | public List<FinishedOperateLogDTO> exportFinishedOperateLogReport(List<LocalDate> dates) { |
| | | return finishedOperateLogMapper.exportFinishedOperateLogReport(dates); |
| | | } |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.dto.mm.FinishedOperateLogDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailProductDTO; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | |
| | | |
| | | } |
| | | |
| | | public List<DeliveryDetailDTO> exportDeliveryDetailReport(List<LocalDate> dates) { |
| | | return deliveryDetailMapper.exportDeliveryDetailReport(dates); |
| | | } |
| | | |
| | | public List<DeliveryDetailProductDTO> exportDeliveryDetailProductReport(List<LocalDate> dates) { |
| | | return deliveryDetailMapper.exportDeliveryDetailProductReport(dates); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | private static final String[] NUMBERS = {"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"}; |
| | | |
| | | private static final String[] IUNIT = {"元", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟"}; |
| | |
| | | ) |
| | | </insert> |
| | | |
| | | <select id="exportFinishedOperateLogReport" resultMap="selectFinishedGoodsInventory"> |
| | | <select id="exportFinishedOperateLogReport"> |
| | | select fol.id, |
| | | fol.operation_order_number, |
| | | fol.order_id, |
| | |
| | | and od.order_id = #{orderId} |
| | | and od.product_id = #{productId} |
| | | </select> |
| | | |
| | | |
| | | <select id="exportDeliveryDetailReport"> |
| | | select dd.id, |
| | | dd.delivery_id, |
| | | dd.delivery_number, |
| | | d.payment_terms, |
| | | d.project, |
| | | d.customer_id, |
| | | d.customer_name, |
| | | d.delivery_date, |
| | | d.pay_method, |
| | | d.pay_date, |
| | | d.salesman, |
| | | d.creator, |
| | | d.contacts, |
| | | d.contact_number, |
| | | d.delivery_address, |
| | | dd.order_id, |
| | | dd.order_number, |
| | | dd.area, |
| | | dd.money, |
| | | dd.quantity, |
| | | dd.delivery_detail_remakes, |
| | | dd.create_time |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | where date(d.create_time)>=#{dates[0]} and date(d.create_time) <= #{dates[1]} |
| | | </select> |
| | | |
| | | <select id="exportDeliveryDetailProductReport"> |
| | | select dd.id, |
| | | dd.delivery_id, |
| | | dd.delivery_number, |
| | | od.product_id, |
| | | od.product_name, |
| | | d.payment_terms, |
| | | d.project, |
| | | d.customer_id, |
| | | d.customer_name, |
| | | d.delivery_date, |
| | | d.pay_method, |
| | | d.pay_date, |
| | | d.salesman, |
| | | d.creator, |
| | | d.contacts, |
| | | d.contact_number, |
| | | d.delivery_address, |
| | | dd.order_id, |
| | | dd.order_number, |
| | | sum(dd.area) as area, |
| | | sum(dd.money) as money, |
| | | sum(dd.quantity) as quantity, |
| | | dd.delivery_detail_remakes, |
| | | dd.create_time |
| | | from sd.delivery_detail dd left join delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | where date(d.create_time)>=#{dates[0]} and date(d.create_time) <= #{dates[1]} |
| | | </select> |
| | | </mapper> |