diff --git a/src/main/java/com/zg/common/utils/poi/ExcelUtil.java b/src/main/java/com/zg/common/utils/poi/ExcelUtil.java index 60f3cc9..4020f2d 100644 --- a/src/main/java/com/zg/common/utils/poi/ExcelUtil.java +++ b/src/main/java/com/zg/common/utils/poi/ExcelUtil.java @@ -1244,6 +1244,25 @@ public class ExcelUtil } else { + if (value instanceof String) + { + String str = (String) value; + + if ("sapNo".equals(field.getName() ) + && str.matches("^\\d{1,15}$")) + { + cell.setCellValue(Double.parseDouble(str)); + + // 设置为数字格式 + CellStyle numStyle = wb.createCellStyle(); + numStyle.cloneStyleFrom(cell.getCellStyle()); + numStyle.setDataFormat(wb.createDataFormat().getFormat("0")); + cell.setCellStyle(numStyle); + + addStatisticsData(column, str, attr); + return cell; + } + } // 设置列类型 setCellVo(value, attr, cell); } diff --git a/src/main/resources/mybatis/wisdom/RkRecordMapper.xml b/src/main/resources/mybatis/wisdom/RkRecordMapper.xml index 7de4808..dbc914f 100644 --- a/src/main/resources/mybatis/wisdom/RkRecordMapper.xml +++ b/src/main/resources/mybatis/wisdom/RkRecordMapper.xml @@ -598,36 +598,140 @@ IFNULL(SUM(rr.real_qty), 0) AS totalQuantity FROM rk_record rr - rr.is_delete = 0 - AND rr.exec_status = 1 - + AND rr.exec_status = '1' + AND rr.operation_type = #{operationType} - - AND rr.xm_no LIKE CONCAT('%', #{xmNo}, '%') + + + AND rr.biz_type IN + + #{bt} + - - AND rr.wl_no LIKE CONCAT('%', #{wlNo}, '%') + + AND rr.biz_type = #{bizType} - AND rr.pcode LIKE CONCAT('%', #{pcode}, '%') + AND rr.pcode = #{pcode} + + + + AND rr.wl_type = #{wlType} - AND rr.cangku LIKE CONCAT('%', #{cangku}, '%') + AND rr.cangku = #{cangku} - - AND rr.operation_time >= #{startDate} + + AND rr.operator = #{operator} - - AND rr.operation_time <= #{endDate} + + AND rr.is_chuku = #{isChuku} + + + + AND rr.status = #{status} + + + + AND rr.exec_status = #{execStatus} + + + + AND rr.bill_no = #{billNo} + + + + AND rr.is_delivery = #{isDelivery} + + + + + AND rr.xm_no LIKE concat('%', #{xmNo}, '%') + + + AND rr.xm_ms LIKE concat('%', #{xmMs}, '%') + + + + + AND rr.sap_no LIKE concat('%', #{sapNo}, '%') + + + + + AND rr.gys_mc LIKE concat('%', #{gysMc}, '%') + + + + AND rr.wl_no LIKE concat('%', #{wlNo}, '%') + + + + AND rr.wl_ms LIKE concat('%', #{wlMs}, '%') + + + + + AND rr.is_borrowed = #{isBorrowed} + + + + + AND (rr.is_delete = '0' OR rr.is_delete = 0 OR rr.is_delete IS NULL) + + + AND rr.is_delete = #{isDelete} + + + + + AND ( + + ( + rr.biz_type IN ('0','1') + + AND rr.operation_time >= #{startDate} + + + AND rr.operation_time <= #{endDate} + + ) + OR + + ( + rr.biz_type = '2' + + AND rr.borrow_time >= DATE(#{startDate}) + + + AND rr.borrow_time < DATE_ADD(DATE(#{endDate}), INTERVAL 1 DAY) + + ) + OR + + ( + rr.biz_type = '3' + + AND rr.return_time >= DATE(#{startDate}) + + + AND rr.return_time < DATE_ADD(DATE(#{endDate}), INTERVAL 1 DAY) + + ) + )