Compare commits
2 Commits
c362acece6
...
6ffafc81f4
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ffafc81f4 | |||
| d141676788 |
@@ -50,6 +50,7 @@ public class RkBillController extends BaseController
|
||||
List<RkBill> list = rkBillService.selectRkBillList(rkBill);
|
||||
|
||||
return getDataTable(list);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zg.project.wisdom.domain.RkInfo;
|
||||
import com.zg.project.wisdom.domain.dto.RkDeliveryUpdateDTO;
|
||||
import com.zg.project.wisdom.domain.vo.StockStatisticVO;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -173,4 +174,22 @@ public class RkRecordController extends BaseController
|
||||
StockStatisticVO stockStatistic = rkRecordService.selectRecordStatisticByCondition(query);
|
||||
return AjaxResult.success(stockStatistic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配送状态
|
||||
*/
|
||||
@PostMapping("/updateDeliveryStatus")
|
||||
@Log(title = "更新配送状态", businessType = BusinessType.UPDATE)
|
||||
public AjaxResult updateDeliveryStatus(@RequestBody RkDeliveryUpdateDTO dto) {
|
||||
|
||||
if (dto.getIds() == null || dto.getIds().isEmpty()) {
|
||||
return AjaxResult.error("rk_record 主键ID集合不能为空");
|
||||
}
|
||||
if (dto.getIsDelivery() == null) {
|
||||
return AjaxResult.error("配送状态不能为空");
|
||||
}
|
||||
|
||||
int rows = rkRecordService.updateDeliveryStatus(dto.getIds(), dto.getIsDelivery());
|
||||
return AjaxResult.success(rows);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,26 @@ public class RkStatisticsController {
|
||||
public AjaxResult home(@RequestBody(required = false) HomeStatQueryDTO query) {
|
||||
return AjaxResult.success(rkStatisticsService.getHomeStatistics(query));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 按时间查询【入库类型】统计
|
||||
*/
|
||||
@ApiOperation("按时间查询入库类型统计")
|
||||
@PostMapping("/inTypeByTime")
|
||||
public AjaxResult inTypeByTime(@RequestBody HomeStatQueryDTO query) {
|
||||
return AjaxResult.success(rkStatisticsService.getInTypeByTime(query));
|
||||
}
|
||||
|
||||
/**
|
||||
* 按时间查询【出库类型】统计
|
||||
*/
|
||||
@ApiOperation("按时间查询出库类型统计")
|
||||
@PostMapping("/outTypeByTime")
|
||||
public AjaxResult outTypeByTime(@RequestBody HomeStatQueryDTO query) {
|
||||
return AjaxResult.success(rkStatisticsService.getOutTypeByTime(query));
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页统计,库龄统计
|
||||
* */
|
||||
|
||||
@@ -97,8 +97,8 @@ public class RkBill extends BaseEntity {
|
||||
@Excel(name = "施工队名称")
|
||||
private String teamName;
|
||||
|
||||
/** 是否需要配送(0否,1是,2配送中,3配送完成) */
|
||||
@Excel(name = "是否需要配送", readConverterExp = "0=否,1=是,2=配送中,3=配送完成")
|
||||
/** 配送状态:0否 1是 2待接单 3配送中 4配送完成 */
|
||||
@Excel(name = "是否需要配送", readConverterExp = "0=否,1=是,2=已接单,3=配送中,4=配送完成")
|
||||
private String isDelivery;
|
||||
|
||||
/** 借用时间 */
|
||||
|
||||
@@ -225,7 +225,7 @@ public class RkInfo extends BaseEntity
|
||||
/** sid */
|
||||
private Long sid;
|
||||
|
||||
/** 是否需要配送(0否,1是,2配送中,3配送完成) */
|
||||
/** 配送状态:0否 1是 2待接单 3配送中 4配送完成 */
|
||||
@Excel(name = "是否需要配送", readConverterExp = "0否,1是,2配送中,3配送完成")
|
||||
private String isDelivery;
|
||||
|
||||
|
||||
@@ -238,8 +238,8 @@ public class RkRecord extends BaseEntity
|
||||
// @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long sid;
|
||||
|
||||
/** 是否需要配送(0否,1是,2配送中,3配送完成) */
|
||||
@Excel(name = "是否需要配送", readConverterExp = "0=否,1=是,2=配送中,3=配送完成")
|
||||
/** 配送状态:0否 1是 2待接单 3配送中 4配送完成 */
|
||||
@Excel(name = "是否需要配送", readConverterExp = "0=否,1=是,2=已接单,3=配送中,4=配送完成")
|
||||
private String isDelivery;
|
||||
/** 封样编号1 */
|
||||
// @Excel(name = "封样编号1")
|
||||
|
||||
@@ -10,6 +10,6 @@ public class RkDeliveryUpdateDTO {
|
||||
/** rk_info 主键ID集合 */
|
||||
private List<Long> ids;
|
||||
|
||||
/** 配送状态:0否 1是 2配送中 3已完成 */
|
||||
/** 配送状态:0否 1是 2待接单 3配送中 4配送完成 */
|
||||
private Integer isDelivery;
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public class DeliveryBillVO implements Serializable {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date operationTime;
|
||||
|
||||
/** 是否需要配送(0否,1是,2配送中,3配送完成) */
|
||||
/** 配送状态:0否 1是 2待接单 3配送中 4配送完成 */
|
||||
private String isDelivery;
|
||||
/** 出入库类型名称(联表) */
|
||||
private String operationTypeName;
|
||||
|
||||
@@ -15,6 +15,9 @@ public class StockStatisticGroupVO {
|
||||
/** 分组值(类型编码,如 operation_type / wl_type) */
|
||||
private String groupValue;
|
||||
|
||||
/** 分组名称(类型编码,如 operation_type / wl_type) */
|
||||
private String groupName;
|
||||
|
||||
/** 总金额 */
|
||||
@JsonSerialize(using = BigDecimalSerializer.class)
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
@@ -86,4 +86,13 @@ public interface RkBillMapper
|
||||
*/
|
||||
int updateExecStatus(@Param("billNo") String billNo,
|
||||
@Param("execStatus") String execStatus);
|
||||
|
||||
/**
|
||||
* 修改配送状态
|
||||
* @param billNo
|
||||
* @param isDelivery
|
||||
* @return
|
||||
*/
|
||||
int updateDeliveryStatusByBillNo(@Param("billNo") String billNo,
|
||||
@Param("isDelivery") Integer isDelivery);
|
||||
}
|
||||
|
||||
@@ -149,4 +149,22 @@ public interface RkRecordMapper
|
||||
* 根据单据号查询出入库记录
|
||||
* */
|
||||
List<RkRecord> selectByBillNo(String billNo);
|
||||
|
||||
/**
|
||||
* 修改发货状态
|
||||
* */
|
||||
int updateDeliveryStatus(@Param("ids") List<Long> ids,
|
||||
@Param("isDelivery") Integer isDelivery);
|
||||
|
||||
/**
|
||||
* 根据ID列表查询单据号列表
|
||||
* */
|
||||
List<String> selectBillNosByRecordIds(@Param("ids") List<Long> ids);
|
||||
|
||||
/**
|
||||
* 查询该 bill 下 与目标状态不同的记录数
|
||||
*/
|
||||
int countDifferentDeliveryStatus(@Param("billNo") String billNo,
|
||||
@Param("isDelivery") Integer isDelivery);
|
||||
|
||||
}
|
||||
|
||||
@@ -97,4 +97,9 @@ public interface IRkRecordService
|
||||
* 出入库总数统计
|
||||
*/
|
||||
StockStatisticVO selectRecordStatisticByCondition(RkRecord query);
|
||||
|
||||
/**
|
||||
* 修改指定入库记录的配送状态
|
||||
*/
|
||||
int updateDeliveryStatus(List<Long> ids, Integer isDelivery);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,16 @@ public interface RkStatisticsService {
|
||||
*/
|
||||
HomeStatVO getHomeStatistics(HomeStatQueryDTO query);
|
||||
|
||||
/**
|
||||
* 按时间查询入库类型统计
|
||||
*/
|
||||
List<StockStatisticGroupVO> getInTypeByTime(HomeStatQueryDTO query);
|
||||
|
||||
/**
|
||||
* 按时间查询出库类型统计
|
||||
*/
|
||||
List<StockStatisticGroupVO> getOutTypeByTime(HomeStatQueryDTO query);
|
||||
|
||||
/**
|
||||
* 首页库龄统计接口
|
||||
* */
|
||||
|
||||
@@ -801,4 +801,38 @@ public class RkRecordServiceImpl implements IRkRecordService
|
||||
public StockStatisticVO selectRecordStatisticByCondition(RkRecord query) {
|
||||
return rkRecordMapper.selectRecordStatisticByCondition(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateDeliveryStatus(List<Long> ids, Integer isDelivery) {
|
||||
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 1. 先更新 record
|
||||
int rows = rkRecordMapper.updateDeliveryStatus(ids, isDelivery);
|
||||
|
||||
// 2. 找到受影响的 billNo
|
||||
List<String> billNos = rkRecordMapper.selectBillNosByRecordIds(ids);
|
||||
if (billNos == null || billNos.isEmpty()) {
|
||||
return rows;
|
||||
}
|
||||
|
||||
// 3. 对每个 bill 判断是否可以更新
|
||||
for (String billNo : billNos) {
|
||||
|
||||
// 3.1 查询该 bill 下是否还存在“不同状态”的 record
|
||||
int diffCount = rkRecordMapper.countDifferentDeliveryStatus(billNo, isDelivery);
|
||||
|
||||
// 只有“全部一致”时才改 bill
|
||||
if (diffCount == 0) {
|
||||
rkBillMapper.updateDeliveryStatusByBillNo(billNo, isDelivery);
|
||||
}
|
||||
// 否则:保持原状态(不动)
|
||||
}
|
||||
|
||||
return rows;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,14 +28,26 @@ public class RkStatisticsServiceImpl implements RkStatisticsService {
|
||||
vo.setCurrentInType(rkStatisticsMapper.statCurrentInByOperationType());
|
||||
vo.setMaterialType(rkStatisticsMapper.statCurrentByMaterialType());
|
||||
|
||||
// ========== 3. 时间维度统计 ==========
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<StockStatisticGroupVO> getInTypeByTime(HomeStatQueryDTO query) {
|
||||
|
||||
Date start = query == null ? null : query.getStartDate();
|
||||
Date end = query == null ? null : query.getEndDate();
|
||||
|
||||
vo.setInTypeByTime(rkStatisticsMapper.statInByOperationType(start, end));
|
||||
vo.setOutTypeByTime(rkStatisticsMapper.statOutByOperationType(start, end));
|
||||
return rkStatisticsMapper.statInByOperationType(start, end);
|
||||
}
|
||||
|
||||
return vo;
|
||||
@Override
|
||||
public List<StockStatisticGroupVO> getOutTypeByTime(HomeStatQueryDTO query) {
|
||||
|
||||
Date start = query == null ? null : query.getStartDate();
|
||||
Date end = query == null ? null : query.getEndDate();
|
||||
|
||||
return rkStatisticsMapper.statOutByOperationType(start, end);
|
||||
}
|
||||
/**
|
||||
* 首页库龄统计接口
|
||||
|
||||
@@ -303,4 +303,11 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDeliveryStatusByBillNo">
|
||||
UPDATE rk_bill
|
||||
SET is_delivery = #{isDelivery},
|
||||
update_time = NOW()
|
||||
WHERE bill_no = #{billNo}
|
||||
AND is_delete = '0'
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
@@ -662,6 +662,7 @@
|
||||
WHERE id = #{id}
|
||||
AND is_delete = '0'
|
||||
</update>
|
||||
|
||||
<select id="selectInOutStatisticByCondition"
|
||||
parameterType="com.zg.project.wisdom.domain.RkRecord"
|
||||
resultType="com.zg.project.wisdom.domain.vo.StockStatisticVO">
|
||||
@@ -753,4 +754,37 @@
|
||||
AND rr.is_delete = '0'
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 修改 record 状态 -->
|
||||
<update id="updateDeliveryStatus">
|
||||
UPDATE rk_record
|
||||
SET is_delivery = #{isDelivery},
|
||||
update_time = NOW()
|
||||
WHERE is_delete = '0'
|
||||
AND id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 找到受影响的 bill -->
|
||||
<select id="selectBillNosByRecordIds" resultType="string">
|
||||
SELECT DISTINCT bill_no
|
||||
FROM rk_record
|
||||
WHERE id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
AND is_delete = '0'
|
||||
</select>
|
||||
|
||||
<!-- 统计不同状态数量 -->
|
||||
<select id="countDifferentDeliveryStatus" resultType="int">
|
||||
SELECT COUNT(1)
|
||||
FROM rk_record
|
||||
WHERE bill_no = #{billNo}
|
||||
AND is_delete = '0'
|
||||
AND is_delivery != #{isDelivery}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -5,112 +5,165 @@
|
||||
<!-- 当前入库类型统计 -->
|
||||
<select id="statCurrentInByOperationType"
|
||||
resultType="com.zg.project.wisdom.domain.vo.StockStatisticGroupVO">
|
||||
|
||||
SELECT
|
||||
ri.operation_type AS groupValue,
|
||||
sit.type_name AS groupName,
|
||||
|
||||
IFNULL(SUM(ri.real_qty * ri.ht_dj), 0) AS totalAmount,
|
||||
COUNT(DISTINCT ri.pcode) AS locationCount,
|
||||
IFNULL(SUM(ri.real_qty), 0) AS totalQuantity,
|
||||
COUNT(DISTINCT ri.xm_no) AS projectCount
|
||||
|
||||
FROM rk_info ri
|
||||
LEFT JOIN stock_in_type sit
|
||||
ON sit.type_code = ri.operation_type
|
||||
AND sit.status = 1
|
||||
|
||||
WHERE ri.exec_status = 1
|
||||
AND ri.is_chuku = 0
|
||||
AND ri.is_delete = 0
|
||||
GROUP BY ri.operation_type
|
||||
|
||||
GROUP BY ri.operation_type, sit.type_name
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 当前物资类型统计 -->
|
||||
<select id="statCurrentByMaterialType"
|
||||
resultType="com.zg.project.wisdom.domain.vo.StockStatisticGroupVO">
|
||||
|
||||
SELECT
|
||||
ri.wl_type AS groupValue,
|
||||
mt.type_name AS groupName,
|
||||
|
||||
IFNULL(SUM(ri.real_qty * ri.ht_dj), 0) AS totalAmount,
|
||||
COUNT(DISTINCT ri.pcode) AS locationCount,
|
||||
IFNULL(SUM(ri.real_qty), 0) AS totalQuantity,
|
||||
COUNT(DISTINCT ri.xm_no) AS projectCount
|
||||
|
||||
FROM rk_info ri
|
||||
LEFT JOIN material_type mt
|
||||
ON mt.type_code = ri.wl_type
|
||||
AND mt.status = 1
|
||||
|
||||
WHERE ri.exec_status = 1
|
||||
AND ri.is_chuku = 0
|
||||
AND ri.is_delete = 0
|
||||
GROUP BY ri.wl_type
|
||||
|
||||
GROUP BY ri.wl_type, mt.type_name
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 入库类型统计(时间) -->
|
||||
<select id="statInByOperationType"
|
||||
resultType="com.zg.project.wisdom.domain.vo.StockStatisticGroupVO">
|
||||
|
||||
SELECT
|
||||
ri.operation_type AS groupValue,
|
||||
sit.type_name AS groupName,
|
||||
|
||||
IFNULL(SUM(ri.real_qty * ri.ht_dj), 0) AS totalAmount,
|
||||
COUNT(DISTINCT ri.pcode) AS locationCount,
|
||||
IFNULL(SUM(ri.real_qty), 0) AS totalQuantity,
|
||||
COUNT(DISTINCT ri.xm_no) AS projectCount
|
||||
|
||||
FROM rk_info ri
|
||||
LEFT JOIN stock_in_type sit
|
||||
ON sit.type_code = ri.operation_type
|
||||
AND sit.status = 1
|
||||
|
||||
WHERE ri.exec_status = 1
|
||||
AND ri.is_chuku = 0
|
||||
AND ri.is_delete = 0
|
||||
|
||||
<if test="startDate != null">
|
||||
AND ri.operation_time <![CDATA[>=]]> #{startDate}
|
||||
</if>
|
||||
|
||||
<if test="endDate != null">
|
||||
AND ri.operation_time <![CDATA[<=]]> #{endDate}
|
||||
</if>
|
||||
GROUP BY ri.operation_type
|
||||
|
||||
GROUP BY ri.operation_type, sit.type_name
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 出库类型统计(时间) -->
|
||||
<select id="statOutByOperationType"
|
||||
resultType="com.zg.project.wisdom.domain.vo.StockStatisticGroupVO">
|
||||
|
||||
SELECT
|
||||
ri.operation_type AS groupValue,
|
||||
IFNULL(SUM(ri.real_qty * ri.ht_dj), 0) AS totalAmount,
|
||||
COUNT(DISTINCT ri.pcode) AS locationCount,
|
||||
IFNULL(SUM(ri.real_qty), 0) AS totalQuantity,
|
||||
COUNT(DISTINCT ri.xm_no) AS projectCount
|
||||
FROM rk_info ri
|
||||
WHERE ri.exec_status = 1
|
||||
AND ri.is_chuku = 1
|
||||
AND ri.is_delete = 0
|
||||
rr.operation_type AS groupValue,
|
||||
|
||||
sot.type_name AS groupName,
|
||||
|
||||
IFNULL(SUM(rr.real_qty * rr.ht_dj), 0) AS totalAmount,
|
||||
|
||||
COUNT(DISTINCT rr.pcode) AS locationCount,
|
||||
|
||||
IFNULL(SUM(rr.real_qty), 0) AS totalQuantity,
|
||||
|
||||
COUNT(DISTINCT rr.xm_no) AS projectCount
|
||||
|
||||
FROM rk_record rr
|
||||
|
||||
LEFT JOIN stock_out_type sot
|
||||
ON sot.type_code = rr.operation_type
|
||||
AND sot.is_delete = '0'
|
||||
|
||||
WHERE rr.exec_status = '1'
|
||||
AND rr.biz_type = '1' <!-- 出库 -->
|
||||
AND rr.is_delete = '0'
|
||||
|
||||
<if test="startDate != null">
|
||||
AND ri.operation_time <![CDATA[>=]]> #{startDate}
|
||||
AND rr.operation_time <![CDATA[>=]]> #{startDate}
|
||||
</if>
|
||||
|
||||
<if test="endDate != null">
|
||||
AND ri.operation_time <![CDATA[<=]]> #{endDate}
|
||||
AND rr.operation_time <![CDATA[<=]]> #{endDate}
|
||||
</if>
|
||||
GROUP BY ri.operation_type
|
||||
|
||||
GROUP BY rr.operation_type, sot.type_name
|
||||
|
||||
</select>
|
||||
|
||||
<select id="statHomeKpi"
|
||||
resultType="com.zg.project.wisdom.domain.vo.HomeKpiVO">
|
||||
|
||||
SELECT
|
||||
/* 月入库 */
|
||||
COUNT(CASE WHEN ri.is_chuku = 0
|
||||
AND DATE_FORMAT(ri.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
/* ===== 月入库 ===== */
|
||||
COUNT(CASE WHEN rr.biz_type = '0'
|
||||
AND DATE_FORMAT(rr.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
THEN 1 END) AS monthInCount,
|
||||
|
||||
COUNT(DISTINCT CASE WHEN ri.is_chuku = 0
|
||||
AND DATE_FORMAT(ri.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
THEN ri.xm_no END) AS monthInProjectCount,
|
||||
COUNT(DISTINCT CASE WHEN rr.biz_type = '0'
|
||||
AND DATE_FORMAT(rr.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
THEN rr.xm_no END) AS monthInProjectCount,
|
||||
|
||||
IFNULL(SUM(CASE WHEN ri.is_chuku = 0
|
||||
AND DATE_FORMAT(ri.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
THEN ri.real_qty * ri.ht_dj END),0) AS monthInAmount,
|
||||
IFNULL(SUM(CASE WHEN rr.biz_type = '0'
|
||||
AND DATE_FORMAT(rr.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
THEN rr.real_qty * rr.ht_dj END),0) AS monthInAmount,
|
||||
|
||||
/* 月出库 */
|
||||
COUNT(CASE WHEN ri.is_chuku = 1
|
||||
AND DATE_FORMAT(ri.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
/* ===== 月出库 ===== */
|
||||
COUNT(CASE WHEN rr.biz_type = '1'
|
||||
AND DATE_FORMAT(rr.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
THEN 1 END) AS monthOutCount,
|
||||
|
||||
COUNT(DISTINCT CASE WHEN ri.is_chuku = 1
|
||||
AND DATE_FORMAT(ri.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
THEN ri.xm_no END) AS monthOutProjectCount,
|
||||
COUNT(DISTINCT CASE WHEN rr.biz_type = '1'
|
||||
AND DATE_FORMAT(rr.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
THEN rr.xm_no END) AS monthOutProjectCount,
|
||||
|
||||
IFNULL(SUM(CASE WHEN rr.biz_type = '1'
|
||||
AND DATE_FORMAT(rr.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
THEN rr.real_qty * rr.ht_dj END),0) AS monthOutAmount
|
||||
|
||||
FROM rk_record rr
|
||||
WHERE rr.exec_status = '1'
|
||||
AND rr.is_delete = '0'
|
||||
|
||||
IFNULL(SUM(CASE WHEN ri.is_chuku = 1
|
||||
AND DATE_FORMAT(ri.operation_time,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
|
||||
THEN ri.real_qty * ri.ht_dj END),0) AS monthOutAmount
|
||||
FROM rk_info ri
|
||||
WHERE ri.exec_status = 1
|
||||
AND ri.is_delete = 0
|
||||
</select>
|
||||
|
||||
<select id="selectStockAgeStat" resultType="com.zg.project.wisdom.domain.vo.StockAgeStatVO">
|
||||
<![CDATA[
|
||||
SELECT '10-20天' AS name, COUNT(*) AS value
|
||||
|
||||
Reference in New Issue
Block a user