This commit is contained in:
parent
3c6ab1c7fd
commit
bcad052493
|
|
@ -15,7 +15,7 @@ public enum LeaseTaskStatusEnum {
|
|||
LEASE_TASK_TO_PUBLISHED(1, "待出库"),
|
||||
LEASE_TASK_TO_AUDIT(2, "已终止"),
|
||||
LEASE_TASK_IN_PROGRESS(3, "出库进行中"),
|
||||
LEASE_TASK_FINISHED(4, "已提交"),
|
||||
LEASE_TASK_FINISHED(4, "已出库"),
|
||||
LEASE_AUDIT_ING(6, "审核中");
|
||||
private final Integer status;
|
||||
private final String statusName;
|
||||
|
|
|
|||
|
|
@ -376,17 +376,17 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(),
|
||||
null,thisMonthMaxOrder + 1, code);
|
||||
tmTask.setCreateTime(DateUtils.getNowDate());
|
||||
tmTask.setCreateBy(SecurityUtils.getUsername());
|
||||
tmTask.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
BackApplyInfo backApplyInfo = dto.getBackApplyInfo();
|
||||
backApplyInfo.setCode(code);
|
||||
backApplyInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
backApplyInfo.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
backApplyInfo.setCreateTime(DateUtils.getNowDate());
|
||||
// 保存退料信息到 tm_task 表中
|
||||
result += taskMapper.insertTmTask(tmTask);
|
||||
if (result > 0) {
|
||||
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), dto.getBackApplyInfo().getAgreementId());
|
||||
tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
|
||||
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername());
|
||||
tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
|
||||
backApplyInfo.setTaskId(tmTask.getTaskId());
|
||||
|
||||
|
|
@ -452,7 +452,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
details.setParentId(backApplyInfo.getId());
|
||||
details.setAuditNum(details.getPreNum());
|
||||
details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus()));
|
||||
details.setCreateBy(SecurityUtils.getUsername());
|
||||
details.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
details.setCreateTime(DateUtils.getNowDate());
|
||||
// 保存退料详情
|
||||
// 先根据typeId和parentId查询该类型是否存在
|
||||
|
|
@ -481,7 +481,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
private int saveBmFileInfo(BackApplyDetails details, Long taskId, int result) {
|
||||
if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) {
|
||||
for (BmFileInfo bmFileInfo : details.getBmFileInfos()) {
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
bmFileInfo.setCreateTime(DateUtils.getNowDate());
|
||||
bmFileInfo.setTaskId(taskId);
|
||||
bmFileInfo.setTaskType(3);
|
||||
|
|
@ -522,7 +522,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
result += backApplyInfoMapper.insertCheckDetails(details);
|
||||
if (CollectionUtils.isNotEmpty(maCodeDto.getBmFileInfos())) {
|
||||
for (BmFileInfo bmFileInfo : maCodeDto.getBmFileInfos()) {
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
bmFileInfo.setCreateTime(DateUtils.getNowDate());
|
||||
bmFileInfo.setTaskId(details.getId());
|
||||
bmFileInfo.setTaskType(3);
|
||||
|
|
@ -596,7 +596,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
//执行新增操作
|
||||
BackApplyInfo info = dto.getBackApplyInfo();
|
||||
info.setUpdateTime(DateUtils.getNowDate());
|
||||
info.setUpdateBy(SecurityUtils.getUsername());
|
||||
info.setUpdateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
info.setCode(backApplyInfo.getCode());
|
||||
result += backApplyInfoMapper.updateBackApplyInfo(info);
|
||||
// 保存退料详情
|
||||
|
|
@ -865,10 +865,10 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(),
|
||||
null, thisMonthMaxOrder + 1, code);
|
||||
tmTask.setCreateTime(DateUtils.getNowDate());
|
||||
tmTask.setCreateBy(SecurityUtils.getUsername());
|
||||
tmTask.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
BackApplyInfo backApplyInfo = dto.getBackApplyInfo();
|
||||
backApplyInfo.setCode(code);
|
||||
backApplyInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
backApplyInfo.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
backApplyInfo.setCreateTime(DateUtils.getNowDate());
|
||||
result = getResultTask(dto, result, tmTask, backApplyInfo);
|
||||
if (result > 0) {
|
||||
|
|
@ -970,7 +970,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
if (result > 0) {
|
||||
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), dto.getBackApplyInfo().getAgreementId());
|
||||
tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
|
||||
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername());
|
||||
tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
taskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
|
||||
backApplyInfo.setTaskId(tmTask.getTaskId());
|
||||
result += backApplyInfoMapper.insertBackApplyInfo(backApplyInfo);
|
||||
|
|
@ -990,7 +990,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
details.setParentId(dto.getBackApplyInfo().getId());
|
||||
details.setAuditNum(details.getPreNum());
|
||||
details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus()));
|
||||
details.setCreateBy(SecurityUtils.getUsername());
|
||||
details.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
details.setCreateTime(DateUtils.getNowDate());
|
||||
// 保存退料详情
|
||||
//现根据id查询back_apply_details表,看数据是否存在,存在则对数量进行更新,不存在则插入
|
||||
|
|
@ -1034,7 +1034,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
details.setAuditNum(details.getPreNum());
|
||||
details.setNum(BigDecimal.valueOf(num));
|
||||
details.setStatus(String.valueOf(BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus()));
|
||||
details.setCreateBy(SecurityUtils.getUsername());
|
||||
details.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
details.setCreateTime(DateUtils.getNowDate());
|
||||
// 保存退料详情
|
||||
//现根据id查询back_apply_details表,看数据是否存在,存在则对数量进行更新,不存在则插入
|
||||
|
|
@ -1060,7 +1060,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
//result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.BACK_REPAIR.getStatus());
|
||||
if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) {
|
||||
for (BmFileInfo bmFileInfo : details.getBmFileInfos()) {
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
bmFileInfo.setCreateTime(DateUtils.getNowDate());
|
||||
bmFileInfo.setTaskId(details.getId());
|
||||
bmFileInfo.setTaskType(3);
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
return AjaxResult.error("请先添加领料任务物资明细");
|
||||
}
|
||||
leaseApplyRequestVo.getLeaseApplyInfo().setCreateTime(DateUtils.getNowDate());
|
||||
leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getUsername());
|
||||
leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
try {
|
||||
int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId());
|
||||
String taskCode = genderTaskCode(thisMonthMaxOrder);
|
||||
|
|
@ -230,13 +230,13 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
LeaseTaskStatusEnum.LEASE_TASK_TO_PUBLISHED.getStatus(),
|
||||
leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(),thisMonthMaxOrder + 1, taskCode);
|
||||
tmTask.setCreateTime(DateUtils.getNowDate());
|
||||
tmTask.setCreateBy(SecurityUtils.getUsername());
|
||||
tmTask.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
tmTaskMapper.insertTmTask(tmTask);
|
||||
BmAgreementInfo bmAgreementInfo = new BmAgreementInfo();
|
||||
bmAgreementInfo.setProjectId(leaseApplyRequestVo.getLeaseApplyInfo().getProjectId());
|
||||
bmAgreementInfo.setTeamId(leaseApplyRequestVo.getLeaseApplyInfo().getTeamId());
|
||||
bmAgreementInfo.setCreateTime(DateUtils.getNowDate());
|
||||
bmAgreementInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
bmAgreementInfo.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
// 先根据班组和工程id查询,若存在则直接返回,不存在则新增
|
||||
BmAgreementInfo info = bmAgreementInfoMapper.queryByTeamIdAndProjectId(bmAgreementInfo);
|
||||
if (info != null) {
|
||||
|
|
@ -251,7 +251,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
}
|
||||
TmTaskAgreement tmTaskAgreement = new TmTaskAgreement(tmTask.getTaskId(), leaseApplyRequestVo.getLeaseApplyInfo().getAgreementId());
|
||||
tmTaskAgreement.setCreateTime(DateUtils.getNowDate());
|
||||
tmTaskAgreement.setCreateBy(SecurityUtils.getUsername());
|
||||
tmTaskAgreement.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
tmTaskAgreementMapper.insertTmTaskAgreement(tmTaskAgreement);
|
||||
leaseApplyRequestVo.getLeaseApplyInfo().setTaskId(tmTask.getTaskId());
|
||||
leaseApplyRequestVo.getLeaseApplyInfo().setCode(taskCode);
|
||||
|
|
@ -270,7 +270,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
bmFileInfo.setTaskId(tmTask.getTaskId());
|
||||
bmFileInfo.setModelId(leaseApplyRequestVo.getLeaseApplyInfo().getId());
|
||||
bmFileInfo.setFileType(5L);
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
bmFileInfo.setCreateTime(DateUtils.getNowDate());
|
||||
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
||||
});
|
||||
|
|
@ -737,7 +737,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
for (LeaseApplyDetails details : leaseApplyDetailsList) {
|
||||
details.setParentId(parentId); // 设置info.parentId
|
||||
details.setCreateTime(DateUtils.getNowDate());
|
||||
details.setCreateBy(SecurityUtils.getUsername());
|
||||
details.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
}
|
||||
// 批量插入详情数据
|
||||
int count = leaseApplyDetailsMapper.insertLeaseApplyDetailsList(leaseApplyDetailsList);
|
||||
|
|
@ -785,7 +785,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
LeaseApplyInfo leaseApplyInfo = leaseApplyRequestVo.getLeaseApplyInfo();
|
||||
if (leaseApplyInfo != null && leaseApplyInfo.getId() != null) {
|
||||
leaseApplyInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
leaseApplyInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||
leaseApplyInfo.setUpdateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
|
||||
// 去除创建一个新的数组对象,直接复用
|
||||
Long[] ids = {leaseApplyInfo.getId()};
|
||||
|
|
@ -802,7 +802,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
fileInfo.setModelId(leaseApplyInfo.getId());
|
||||
fileInfo.setTaskType(2);
|
||||
fileInfo.setFileType(5L);
|
||||
fileInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
fileInfo.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
fileInfo.setCreateTime(DateUtils.getNowDate());
|
||||
bmFileInfoMapper.insertBmFileInfo(fileInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
throw new RuntimeException("出库失败,更新设备规格库存数量时出错!");
|
||||
}
|
||||
// 4、修改任务状态(tm_task)
|
||||
/*if (record.getIsApp() != null && record.getIsApp() == 0) {
|
||||
if (record.getIsApp() != null && record.getIsApp() == 0) {
|
||||
LeaseApplyDetails leaseApplyDetails = new LeaseApplyDetails();
|
||||
leaseApplyDetails.setId(record.getParentId());
|
||||
List<LeaseApplyDetails> list = leaseApplyDetailsMapper.getOutNum(leaseApplyDetails);
|
||||
|
|
@ -220,12 +220,12 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
}
|
||||
if (res == 0) {
|
||||
throw new RuntimeException("出库失败,修改任务状态失败");
|
||||
}*/
|
||||
// 修改任务为待提交状态
|
||||
}
|
||||
/*// 修改任务为待提交状态
|
||||
res = updateTaskStatus(record);
|
||||
if (res == 0) {
|
||||
throw new RuntimeException("出库失败,修改任务状态失败");
|
||||
}
|
||||
}*/
|
||||
// 5、插入结算记录
|
||||
String taskId = leaseApplyInfoMapper.getTaskId(record.getParentId());
|
||||
record.setTaskId(taskId);
|
||||
|
|
@ -406,7 +406,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
*/
|
||||
private int updateTaskStatus(LeaseOutDetails record) {
|
||||
String taskId = leaseApplyInfoMapper.getTaskId(record.getParentId());
|
||||
return tmTaskMapper.updateTaskStatus(taskId, LeaseTaskStatusEnum.LEASE_TASK_SUBMIT.getStatus());
|
||||
return tmTaskMapper.updateTaskStatus(taskId, LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatus());
|
||||
}
|
||||
|
||||
private int checkStorageNum(LeaseOutDetails record) {
|
||||
|
|
@ -444,7 +444,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
leaseApplyDetailsMapper.updateLeaseApplyDetailsByLeaseOutRecord(record);
|
||||
}*/
|
||||
// 插入领料出库明细表(lease_out_details)
|
||||
record.setCreateBy(SecurityUtils.getUsername());
|
||||
record.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
if (!CollectionUtils.isEmpty(record.getMaCodeList())) {
|
||||
for (LeaseMaCodeDto leaseMaCodeDto : record.getMaCodeList()) {
|
||||
record.setMaId(leaseMaCodeDto.getMaId());
|
||||
|
|
|
|||
|
|
@ -182,12 +182,12 @@ public class TypeController extends BaseController {
|
|||
/**
|
||||
* 查询物资类型4级规格型号--前端联动式下拉框
|
||||
*
|
||||
* @param typeId 规格型号
|
||||
* @param type
|
||||
*/
|
||||
@ApiOperation(value = "获取物资类型连动式下拉框")
|
||||
@GetMapping("/equipmentType")
|
||||
public AjaxResult equipmentType(@RequestParam(required = false) Long typeId, @RequestParam(required = false) String typeName) {
|
||||
List<Type> listByMaType = typeService.getEquipmentType(typeId, typeName);
|
||||
public AjaxResult equipmentType(Type type) {
|
||||
List<Type> listByMaType = typeService.getEquipmentType(type);
|
||||
return success(listByMaType);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,12 @@ public class Type extends BaseEntity {
|
|||
@ApiModelProperty(value = "实时库存")
|
||||
private BigDecimal storageNum;
|
||||
|
||||
@ApiModelProperty(value = "在用数量")
|
||||
private BigDecimal useNum;
|
||||
|
||||
@ApiModelProperty(value = "协议id")
|
||||
private Long agreementId;
|
||||
|
||||
/** 是否扣费 */
|
||||
@ApiModelProperty(value = "是否扣费,0:扣费, 1:不扣费")
|
||||
private Byte isCharging = 1;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public interface TypeMapper {
|
|||
// 查询物资类型的内部租赁价
|
||||
BigDecimal selectLeasePriceByTypeId(Long typeId);
|
||||
|
||||
List<Type> selectMaTypeList(@Param("typeId") Long typeId,@Param("typeName") String typeName);
|
||||
List<Type> selectMaTypeList(Type type);
|
||||
|
||||
/**
|
||||
* 查询物资类型3级--前端联动式下拉框
|
||||
|
|
@ -222,4 +222,11 @@ public interface TypeMapper {
|
|||
List<Type> getLevelList(Type type);
|
||||
|
||||
List<Type> getLevelThreeList(Type type);
|
||||
|
||||
/**
|
||||
* 获取设备在用量
|
||||
* @param maType
|
||||
* @return
|
||||
*/
|
||||
Type getNumList(Type maType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public interface ITypeService {
|
|||
|
||||
List<Integer> selectParentId(MaTypeVo type);
|
||||
|
||||
List<Type> getEquipmentType(Long typeId, String typeName);
|
||||
List<Type> getEquipmentType(Type type);
|
||||
|
||||
/**
|
||||
* 查询物资类型3级--前端联动式下拉框
|
||||
|
|
|
|||
|
|
@ -79,12 +79,27 @@ public class TypeServiceImpl implements ITypeService {
|
|||
|
||||
/**
|
||||
* 查询物资类型四级树--前端联动式下拉框
|
||||
* @param typeId 类型id
|
||||
* @param typeName 类型名称
|
||||
* @param type
|
||||
*/
|
||||
@Override
|
||||
public List<Type> getEquipmentType(Long typeId, String typeName) {
|
||||
List<Type> maTypes = typeMapper.selectMaTypeList(typeId, typeName);
|
||||
public List<Type> getEquipmentType(Type type) {
|
||||
List<Type> maTypes = typeMapper.selectMaTypeList(type);
|
||||
if (!CollectionUtils.isEmpty(maTypes)) {
|
||||
for (Type maType : maTypes) {
|
||||
// 根据协议id以及typeId查询在用量
|
||||
if (type.getAgreementId() != null) {
|
||||
maType.setAgreementId(type.getAgreementId());
|
||||
Type dto = typeMapper.getNumList(maType);
|
||||
if (dto != null) {
|
||||
maType.setUseNum(dto.getUseNum());
|
||||
} else {
|
||||
maType.setUseNum(BigDecimal.ZERO);
|
||||
}
|
||||
} else {
|
||||
maType.setUseNum(BigDecimal.ZERO);
|
||||
}
|
||||
}
|
||||
}
|
||||
List<Type> roots = maTypes.stream()
|
||||
.filter(t -> t.getParentId() == 0)
|
||||
.collect(Collectors.toList());
|
||||
|
|
|
|||
|
|
@ -1060,4 +1060,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from ma_station_code
|
||||
GROUP BY ma_name
|
||||
</select>
|
||||
|
||||
<select id="getNumList" resultType="com.bonus.material.ma.domain.Type">
|
||||
SELECT
|
||||
mt.type_id as typeId,
|
||||
mt1.type_name as materialName,
|
||||
mt.type_name as typeName,
|
||||
mt.parent_id as parentId,
|
||||
mt.unit_name as unitName,
|
||||
mt.unit_value as unitValue,
|
||||
mt.manage_type as manageType,
|
||||
SUM( CASE WHEN sai.agreement_id = #{agreementId} AND sai.STATUS = '0' THEN sai.num ELSE 0 END ) AS useNum,
|
||||
mt.LEVEL as level
|
||||
FROM
|
||||
ma_type mt
|
||||
LEFT JOIN slt_agreement_info sai ON mt.type_id = sai.type_id
|
||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
|
||||
WHERE
|
||||
EXISTS ( SELECT 1 FROM slt_agreement_info sai2 WHERE sai2.type_id = mt.type_id AND sai2.agreement_id = #{agreementId}
|
||||
AND sai2.STATUS = '0' and sai2.num > 0)
|
||||
<if test="typeId != null">
|
||||
and mt.type_id = #{typeId}
|
||||
</if>
|
||||
GROUP BY
|
||||
mt.type_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue