Merge branch 'master' of http://192.168.30.2:3000/bonus/Bonus-Cloud-Material
This commit is contained in:
commit
5a8808b2c4
|
|
@ -125,4 +125,19 @@ public class PurchaseDto {
|
|||
|
||||
@ApiModelProperty(value = "物资厂家名称")
|
||||
private String supplier;
|
||||
|
||||
@ApiModelProperty(value = "默认0 不是立体库,1 立体库")
|
||||
private Integer isRs;
|
||||
|
||||
@ApiModelProperty(value = "单号")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
private String maTypeName;
|
||||
|
||||
@ApiModelProperty("计量单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("设备状态")
|
||||
private String maStatus;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,4 +201,12 @@ public class RepairInputDetails extends BaseEntity {
|
|||
|
||||
private String backCode;
|
||||
|
||||
@ApiModelProperty(value = "默认0 不是立体库,1 立体库")
|
||||
private Integer isRs;
|
||||
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
private String maTypeName;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ public enum PurchaseTaskStatusEnum {
|
|||
IN_STORE(19, "已入库", PurchaseTaskStageEnum.STORE.getCode()),
|
||||
|
||||
TASK_IN_PROGRESS(21, "入库进行中", PurchaseTaskStageEnum.STORE.getCode()),
|
||||
TASK_FINISHED(22, "入库已完成", PurchaseTaskStageEnum.STORE.getCode());
|
||||
TASK_FINISHED(22, "入库已完成", PurchaseTaskStageEnum.STORE.getCode()),
|
||||
// 待上架,创建立体仓入库任务后,状态为待上架
|
||||
TO_UPLOAD(23, "待上架", PurchaseTaskStageEnum.STORE.getCode());
|
||||
|
||||
private final Integer status;
|
||||
private final String statusName;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ public enum RepairInputStatusEnum {
|
|||
|
||||
INPUT_TASK_NO_FINISHED(0, "入库进行中"),
|
||||
INPUT_TASK_IN_FINISHED(1, "入库完成"),
|
||||
INPUT_TASK_TO_REJECT(2, "入库驳回");
|
||||
INPUT_TASK_TO_REJECT(2, "入库驳回"),
|
||||
// 待上架
|
||||
TO_UPLOAD(3, "待上架");
|
||||
|
||||
private final Integer status;
|
||||
private final String statusName;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.convert.Convert;
|
|||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.bonus.common.biz.config.ListPagingUtil;
|
||||
import com.bonus.common.biz.utils.StringHelper;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
|
|
@ -1028,4 +1029,38 @@ public class BmReportController extends BaseController {
|
|||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 资产占有月度报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "资产占有月度报表查询")
|
||||
@GetMapping("/getAssetReportList")
|
||||
public AjaxResult getAssetReportList(AssetReportInfo bean) {
|
||||
startPage();
|
||||
List<AssetReportInfo> pageList = bmReportService.getAssetReportList(bean);
|
||||
return AjaxResult.success(getDataTable(pageList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出资产占有月度报表
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出资产占有月度报表")
|
||||
@PostMapping("/exportAssetReportList")
|
||||
public void exportAssetReportList(HttpServletResponse response, AssetReportInfo bean)
|
||||
{
|
||||
String fileName = "资产占有月度报表";
|
||||
List<AssetReportInfo> list = bmReportService.getAssetReportList(bean);
|
||||
// 根据list集合数,去填充序号
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).setSeq(i + 1);
|
||||
}
|
||||
ExcelUtil<AssetReportInfo> util = new ExcelUtil<>(AssetReportInfo.class);
|
||||
// 获取当前年月日时分秒导出时间,用括号拼接在后面
|
||||
String title = "资产占有月度报表" + "(" + "导出时间:" + DateUtils.getTime() + ")";
|
||||
util.exportExcel(response, list, fileName, title);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,4 +200,7 @@ public class PurchaseCheckDetails extends BaseEntity {
|
|||
|
||||
@ApiModelProperty(value = "签名类型")
|
||||
private int signTypes;
|
||||
|
||||
@ApiModelProperty(value = "默认0 不是立体库,1 立体库")
|
||||
private Integer isRs;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,4 +93,7 @@ public class PurchaseQueryDto {
|
|||
*/
|
||||
@ApiModelProperty(value = "子任务状态列表")
|
||||
private List<Integer> statusList;
|
||||
|
||||
@ApiModelProperty(value = "默认0 不是立体库,1 立体库")
|
||||
private Integer isRs;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,4 +100,33 @@ public interface PurchaseStorageMapper {
|
|||
* @return
|
||||
*/
|
||||
int updatePurchaseBindBy(@Param("status") Integer status, @Param("taskId") String taskId, @Param("typeId") Long typeId);
|
||||
|
||||
/**
|
||||
* 修改上架数量
|
||||
* @param purchaseId
|
||||
* @param bindNum
|
||||
*/
|
||||
void updateUpNum(@Param("id") Long purchaseId, @Param("bindNum") BigDecimal bindNum);
|
||||
|
||||
/**
|
||||
* 修改机具状态
|
||||
* @param dto
|
||||
*/
|
||||
void updateMaStatus(PurchaseDto dto);
|
||||
|
||||
/**
|
||||
* 修改详情任务状态
|
||||
* @param updatedStatus
|
||||
* @param id
|
||||
*/
|
||||
int updatePurchaseStatus(@Param("updatedStatus") Integer updatedStatus, @Param("id") int id);
|
||||
|
||||
/**
|
||||
* 修改上架数量
|
||||
* @param status
|
||||
* @param parseInt
|
||||
* @param inputNum
|
||||
* @return
|
||||
*/
|
||||
int updateNumById(@Param("updatedStatus") Integer status, @Param("id") String parseInt,@Param("inputNum") BigDecimal inputNum);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
PurchaseTaskStatusEnum.IN_STORE.getStatus().equals(o.getStatus()) ||
|
||||
PurchaseTaskStatusEnum.TO_STORE.getStatus().equals(o.getStatus()) ||
|
||||
PurchaseTaskStatusEnum.TASK_FINISHED.getStatus().equals(o.getStatus()) ||
|
||||
PurchaseTaskStatusEnum.TO_UPLOAD.getStatus().equals(o.getStatus()) ||
|
||||
(PurchaseTaskStatusEnum.TO_BIND.getStatus().equals(o.getStatus()) && null != o.getBindNum() && 0 < o.getBindNum().compareTo(BigDecimal.ZERO)) ||
|
||||
(PurchaseTaskStatusEnum.TO_STORE_AFTER_REJECT.getStatus().equals(o.getStatus()) && null != o.getBindNum() && 0 < o.getBindNum().compareTo(BigDecimal.ZERO))
|
||||
).collect(Collectors.toList());
|
||||
|
|
@ -297,6 +298,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
case PURCHASE_TASK_STAGE_STORE:
|
||||
purchaseCheckDetails = purchaseCheckDetails.stream().filter(o ->
|
||||
PurchaseTaskStatusEnum.IN_STORE.getStatus().equals(o.getStatus()) ||
|
||||
PurchaseTaskStatusEnum.TO_UPLOAD.getStatus().equals(o.getStatus()) ||
|
||||
PurchaseTaskStatusEnum.TO_STORE.getStatus().equals(o.getStatus()) ||
|
||||
PurchaseTaskStatusEnum.TASK_FINISHED.getStatus().equals(o.getStatus()) ||
|
||||
(PurchaseTaskStatusEnum.TO_BIND.getStatus().equals(o.getStatus()) && null != o.getBindNum() && 0 < o.getBindNum().compareTo(BigDecimal.ZERO)) ||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
package com.bonus.material.purchase.service.impl;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.bonus.common.biz.constant.MaterialConstants;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import com.bonus.common.biz.domain.purchase.AutomaticInPutDto;
|
||||
import com.bonus.common.biz.enums.HttpCodeEnum;
|
||||
import com.bonus.common.biz.enums.MaTypeManageTypeEnum;
|
||||
import com.bonus.common.biz.enums.PurchaseTaskStatusEnum;
|
||||
import com.bonus.common.biz.utils.AutomaticHttpHelper;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.lease.mapper.LeaseOutDetailsMapper;
|
||||
|
|
@ -219,18 +223,90 @@ public class PurchaseStorageServiceImpl implements IPurchaseStorageService {
|
|||
private AjaxResult processByPurchaseIds(PurchaseDto purchaseDto) {
|
||||
int result = 0;
|
||||
try {
|
||||
if (purchaseDto.getIsRs() != null && purchaseDto.getIsRs() == 1) {
|
||||
Integer manageType = null;
|
||||
ArrayList<AutomaticInPutDto> list = new ArrayList<>();
|
||||
//数量入库
|
||||
if (CollectionUtils.isEmpty(purchaseDto.getInPutList())) {
|
||||
//数量入库
|
||||
List<PurchaseVo> details = purchaseBindMapper.getDetails(purchaseDto);
|
||||
if (CollectionUtils.isNotEmpty(details)) {
|
||||
if (details.get(0).getCheckNum().compareTo(details.get(0).getInPutNum()) == 0) {
|
||||
purchaseStorageMapper.updateStatusById(PurchaseTaskStatusEnum.IN_STORE.getStatus(), Integer.parseInt(purchaseDto.getPurchaseId()));
|
||||
List<PurchaseVo> statusList = purchaseStorageMapper.select(purchaseDto.getTaskId());
|
||||
result += updateTaskStatus(statusList);
|
||||
return AjaxResult.error("该设备已全部入库,请勿重复操作");
|
||||
}
|
||||
}
|
||||
manageType = 1;
|
||||
AutomaticInPutDto automaticInPutDto = new AutomaticInPutDto();
|
||||
automaticInPutDto.setMaterialName(purchaseDto.getMaTypeName());
|
||||
automaticInPutDto.setUnitCode(purchaseDto.getUnitName());
|
||||
automaticInPutDto.setInQty(purchaseDto.getInputNum());
|
||||
automaticInPutDto.setLineNum(1);
|
||||
automaticInPutDto.setPurchaseId(purchaseDto.getPurchaseId());
|
||||
automaticInPutDto.setTypeId(Long.valueOf(purchaseDto.getTypeId()));
|
||||
list.add(automaticInPutDto);
|
||||
} else {
|
||||
manageType = 0;
|
||||
for (int i = 0; i < purchaseDto.getInPutList().size(); i++) {
|
||||
AutomaticInPutDto automaticInPutDto = new AutomaticInPutDto();
|
||||
automaticInPutDto.setMaterialName(purchaseDto.getMaTypeName());
|
||||
automaticInPutDto.setUnitCode(purchaseDto.getUnitName());
|
||||
automaticInPutDto.setInQty(BigDecimal.ONE);
|
||||
automaticInPutDto.setMaterialCode(purchaseDto.getInPutList().get(i).getMaCode());
|
||||
automaticInPutDto.setLineNum(i + 1);
|
||||
automaticInPutDto.setPurchaseId(purchaseDto.getPurchaseId());
|
||||
automaticInPutDto.setTypeId(Long.valueOf(purchaseDto.getTypeId()));
|
||||
list.add(automaticInPutDto);
|
||||
}
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("ExternalNo", purchaseDto.getCode());
|
||||
map.put("taskId", purchaseDto.getTaskId());
|
||||
map.put("manageType", manageType);
|
||||
map.put("InDes", "采购入库");
|
||||
map.put("DtlList", list);
|
||||
String body = JSONObject.toJSONString(map);
|
||||
// 立体库本地建立入库单接口路径
|
||||
String url = MaterialConstants.TEST_CREATE_IN_URL;
|
||||
// 立体库生产建立入库单接口路径
|
||||
//String url = MaterialConstants.PROD_CREATE_IN_URL;
|
||||
String data = AutomaticHttpHelper.sendHttpPostPushCost(url, body);
|
||||
if (StringUtils.isEmpty(data)) {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "立体仓入库单创建失败");
|
||||
}
|
||||
JSONObject object = JSONObject.parseObject(data);
|
||||
String code = object.getString("code");
|
||||
if ("0".equals(code)) {
|
||||
// 修改状态为待上架
|
||||
if (CollectionUtils.isEmpty(purchaseDto.getInPutList())) {
|
||||
// 数量设备
|
||||
purchaseStorageMapper.updateNumById(PurchaseTaskStatusEnum.TO_UPLOAD.getStatus(), purchaseDto.getPurchaseId(), purchaseDto.getInputNum());
|
||||
} else {
|
||||
// 修改上架数量
|
||||
purchaseStorageMapper.updateUpNum(Long.valueOf(purchaseDto.getPurchaseId()), BigDecimal.valueOf(purchaseDto.getInPutList().size()));
|
||||
// 编码设备
|
||||
for (PurchaseDto dto : purchaseDto.getInPutList()) {
|
||||
dto.setTypeId(purchaseDto.getTypeId());
|
||||
// 待上架
|
||||
dto.setMaStatus("19");
|
||||
purchaseStorageMapper.updateMaStatus(dto);
|
||||
}
|
||||
// 修改详情任务状态
|
||||
purchaseStorageMapper.updatePurchaseStatus(PurchaseTaskStatusEnum.TO_UPLOAD.getStatus(), Integer.parseInt(purchaseDto.getPurchaseId()));
|
||||
}
|
||||
return AjaxResult.success("立体仓入库单创建成功");
|
||||
} else {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "立体仓入库单创建失败");
|
||||
}
|
||||
}
|
||||
//判断为数量还是编码入库
|
||||
purchaseDto.setPreStoreNum(getStorageNum(purchaseDto));
|
||||
if (CollectionUtils.isEmpty(purchaseDto.getInPutList())) {
|
||||
//数量入库
|
||||
List<PurchaseVo> details = purchaseBindMapper.getDetails(purchaseDto);
|
||||
if (CollectionUtils.isNotEmpty(details)) {
|
||||
if (details.get(0).getCheckNum().compareTo(details.get(0).getInPutNum()) == 0) {
|
||||
purchaseStorageMapper.updateStatusById(PurchaseTaskStatusEnum.IN_STORE.getStatus(), Integer.parseInt(purchaseDto.getPurchaseId()));
|
||||
List<PurchaseVo> statusList = purchaseStorageMapper.select(purchaseDto.getTaskId());
|
||||
result += updateTaskStatus(statusList);
|
||||
return AjaxResult.error("该设备已全部入库,请勿重复操作");
|
||||
}
|
||||
purchaseDto.setInputNum(details.get(0).getCheckNum().subtract(details.get(0).getInPutNum()));
|
||||
result += updatePurchaseInfoAndDetails(details.get(0), Integer.parseInt(purchaseDto.getPurchaseId()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,6 +125,19 @@ public class RepairController extends BaseController {
|
|||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取结算申请列表维修单列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "获取维修物资设备列表---不分页")
|
||||
//@RequiresPermissions(value = "repair:manage:list")
|
||||
@GetMapping("/getRepairDetailsList")
|
||||
public AjaxResult getRepairDetailsList(RepairTaskDetails bean) {
|
||||
List<RepairDeviceSummaryVo> list = service.getRepairDetailsList(bean);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修已完成--Ⅱ级页面详情列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -86,4 +86,7 @@ public class RepairInputInfo extends BaseEntity {
|
|||
* 在老系统中表示维修任务Id
|
||||
*/
|
||||
private Long repairId;
|
||||
|
||||
@ApiModelProperty(value = "默认0 不是立体库,1 立体库")
|
||||
private Integer isRs;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,4 +81,10 @@ public class RepairDeviceSummaryVo extends BaseVO {
|
|||
private BigDecimal waitRepairNum;
|
||||
|
||||
private BigDecimal completeNum;
|
||||
|
||||
@ApiModelProperty(value = "退料单位名称")
|
||||
private String backUnit;
|
||||
|
||||
@ApiModelProperty(value = "退料工程名称")
|
||||
private String backPro;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,6 +146,12 @@ public class RepairDeviceVO {
|
|||
*/
|
||||
private BigDecimal completeNum;
|
||||
|
||||
@ApiModelProperty(value = "退料单位名称")
|
||||
private String backUnit;
|
||||
|
||||
@ApiModelProperty(value = "退料工程名称")
|
||||
private String backPro;
|
||||
|
||||
// 手动覆盖 getter 方法,确保 List 始终被初始化
|
||||
public List<RepairPartDetails> getCodeInRepairPartList() {
|
||||
if (this.codeInRepairPartList == null) {this.codeInRepairPartList = new ArrayList<>();}
|
||||
|
|
|
|||
|
|
@ -167,4 +167,18 @@ public interface RepairInputDetailsMapper {
|
|||
* @return
|
||||
*/
|
||||
List<RepairInputExportDetails> selectExportDetails(RepairInputDetails repairInputDetails);
|
||||
|
||||
/**
|
||||
* 修改修试后入库状态
|
||||
* @param inputDetails
|
||||
* @return
|
||||
*/
|
||||
int updateRepairStatus(RepairInputDetails inputDetails);
|
||||
|
||||
/**
|
||||
* 修改设备状态
|
||||
* @param inputDetails
|
||||
* @return
|
||||
*/
|
||||
int updateStatus(RepairInputDetails inputDetails);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -464,4 +464,6 @@ public interface RepairMapper {
|
|||
* @return
|
||||
*/
|
||||
List<RepairTask> getRepairAuditQueryList(RepairTask bean);
|
||||
|
||||
List<RepairDeviceVO> getRepairDetailsList(RepairTaskDetails bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,4 +184,6 @@ public interface RepairService {
|
|||
* @return
|
||||
*/
|
||||
List<RepairTask> getRepairAuditQueryList(RepairTask bean);
|
||||
|
||||
List<RepairDeviceSummaryVo> getRepairDetailsList(RepairTaskDetails bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,19 +2,19 @@ package com.bonus.material.repair.service.impl;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.bonus.common.biz.constant.GlobalConstants;
|
||||
import com.bonus.common.biz.constant.MaterialConstants;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import com.bonus.common.biz.domain.purchase.AutomaticInPutDto;
|
||||
import com.bonus.common.biz.domain.repair.RepairInputExportDetails;
|
||||
import com.bonus.common.biz.enums.*;
|
||||
import com.bonus.common.biz.utils.AutomaticHttpHelper;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
|
|
@ -118,6 +118,11 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
|||
statusList.stream().allMatch(status -> status.equals(RepairInputStatusEnum.INPUT_TASK_IN_FINISHED.getStatus()))) {
|
||||
inputInfo.setStatus(String.valueOf(RepairInputStatusEnum.INPUT_TASK_IN_FINISHED.getStatus()));
|
||||
inputInfo.setStatusName(String.valueOf(RepairInputStatusEnum.INPUT_TASK_IN_FINISHED.getStatusName()));
|
||||
} else if (!statusList.contains(RepairInputStatusEnum.INPUT_TASK_NO_FINISHED.getStatus()) &&
|
||||
!statusList.contains(RepairInputStatusEnum.INPUT_TASK_TO_REJECT.getStatus()) &&
|
||||
statusList.stream().allMatch(status -> status.equals(RepairInputStatusEnum.TO_UPLOAD.getStatus()))) {
|
||||
inputInfo.setStatus(String.valueOf(RepairInputStatusEnum.TO_UPLOAD.getStatus()));
|
||||
inputInfo.setStatusName(String.valueOf(RepairInputStatusEnum.TO_UPLOAD.getStatusName()));
|
||||
} else {
|
||||
inputInfo.setStatus(String.valueOf(RepairInputStatusEnum.INPUT_TASK_NO_FINISHED.getStatus()));
|
||||
inputInfo.setStatusName(String.valueOf(RepairInputStatusEnum.INPUT_TASK_NO_FINISHED.getStatusName()));
|
||||
|
|
@ -285,7 +290,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
|||
// 检查条件,确保修试入库条件有效
|
||||
if (repairInputDetails.getTaskId() != null && repairInputDetails.getTypeId() != null && CollectionUtils.isEmpty(repairInputDetails.getOutTaskList())) {
|
||||
// 内层入库
|
||||
result += processInnerStorage(repairInputDetails);
|
||||
return processInnerStorage(repairInputDetails);
|
||||
} else if (CollectionUtils.isNotEmpty(repairInputDetails.getOutTaskList())) {
|
||||
// 查询外层任务列表,仅供库存日志使用
|
||||
List<Long> taskIdList = repairInputDetails.getOutTaskList().stream()
|
||||
|
|
@ -595,46 +600,134 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
|||
* @param repairInputDetails
|
||||
* @return
|
||||
*/
|
||||
private int processInnerStorage(RepairInputDetails repairInputDetails) {
|
||||
private AjaxResult processInnerStorage(RepairInputDetails repairInputDetails) {
|
||||
int result = 0;
|
||||
// 获取操作前的库存数量
|
||||
repairInputDetails.setPreStoreNum(getStorageNum(repairInputDetails));
|
||||
// 入库数量不能大于预入库数量
|
||||
if (repairInputDetails.getInputNum() != null && repairInputDetails.getPendingInputNum() != null) {
|
||||
if (repairInputDetails.getInputNum().compareTo(repairInputDetails.getPendingInputNum()) > 0) {
|
||||
throw new ServiceException("入库数量不能大于预入库数量");
|
||||
try {
|
||||
// 获取操作前的库存数量
|
||||
repairInputDetails.setPreStoreNum(getStorageNum(repairInputDetails));
|
||||
// 入库数量不能大于预入库数量
|
||||
if (repairInputDetails.getInputNum() != null && repairInputDetails.getPendingInputNum() != null) {
|
||||
if (repairInputDetails.getInputNum().compareTo(repairInputDetails.getPendingInputNum()) > 0) {
|
||||
throw new ServiceException("入库数量不能大于预入库数量");
|
||||
}
|
||||
}
|
||||
}
|
||||
repairInputDetails.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
repairInputDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
// 立体仓修试入库
|
||||
if (repairInputDetails.getIsRs() != null && repairInputDetails.getIsRs() == 1) {
|
||||
Integer manageType = null;
|
||||
ArrayList<AutomaticInPutDto> list = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(repairInputDetails.getMaCodeList())) {
|
||||
// 编码修试入库
|
||||
manageType = 0;
|
||||
for (int i = 0; i < repairInputDetails.getMaCodeList().size(); i++) {
|
||||
repairInputDetails.getMaCodeList().get(i).setTaskId(repairInputDetails.getTaskId());
|
||||
repairInputDetails.getMaCodeList().get(i).setTypeId(repairInputDetails.getTypeId());
|
||||
// 根据taskId以及typeId查询该设备是否已经入库
|
||||
RepairInputDetails info = repairInputDetailsMapper.selectInfoNum(repairInputDetails.getMaCodeList().get(i));
|
||||
if (info != null) {
|
||||
if (info.getInputNum().compareTo(info.getRepairNum()) >= 0) {
|
||||
throw new ServiceException("该设备已经入库,请勿重复入库");
|
||||
}
|
||||
}
|
||||
AutomaticInPutDto automaticInPutDto = new AutomaticInPutDto();
|
||||
automaticInPutDto.setMaterialName(repairInputDetails.getMaTypeName());
|
||||
automaticInPutDto.setUnitCode(repairInputDetails.getUnitName());
|
||||
automaticInPutDto.setInQty(BigDecimal.ONE);
|
||||
automaticInPutDto.setMaterialCode(repairInputDetails.getMaCodeList().get(i).getMaCode());
|
||||
automaticInPutDto.setLineNum(i + 1);
|
||||
automaticInPutDto.setTypeId(repairInputDetails.getTypeId());
|
||||
automaticInPutDto.setPendingInputNum(BigDecimal.ONE);
|
||||
automaticInPutDto.setMaId(repairInputDetails.getMaCodeList().get(i).getMaId());
|
||||
list.add(automaticInPutDto);
|
||||
}
|
||||
} else {
|
||||
// 数量修试入库
|
||||
AutomaticInPutDto automaticInPutDto = new AutomaticInPutDto();
|
||||
manageType = 1;
|
||||
automaticInPutDto.setMaterialName(repairInputDetails.getMaTypeName());
|
||||
automaticInPutDto.setUnitCode(repairInputDetails.getUnitName());
|
||||
automaticInPutDto.setInQty(repairInputDetails.getInputNum());
|
||||
automaticInPutDto.setLineNum(1);
|
||||
automaticInPutDto.setTypeId(repairInputDetails.getTypeId());
|
||||
automaticInPutDto.setPendingInputNum(repairInputDetails.getPendingInputNum());
|
||||
list.add(automaticInPutDto);
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("agreementId", repairInputDetails.getAgreementId());
|
||||
map.put("ExternalNo", repairInputDetails.getInputCode());
|
||||
map.put("taskId", repairInputDetails.getTaskId());
|
||||
map.put("manageType", manageType);
|
||||
map.put("InDes", "修试入库");
|
||||
map.put("DtlList", list);
|
||||
String body = JSONObject.toJSONString(map);
|
||||
// 立体库本地建立入库单接口路径
|
||||
String url = MaterialConstants.TEST_CREATE_IN_URL;
|
||||
// 立体库生产建立入库单接口路径
|
||||
//String url = MaterialConstants.PROD_CREATE_IN_URL;
|
||||
String data = AutomaticHttpHelper.sendHttpPostPushCost(url, body);
|
||||
if (StringUtils.isEmpty(data)) {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "立体仓入库单创建失败");
|
||||
}
|
||||
JSONObject object = JSONObject.parseObject(data);
|
||||
String code = object.getString("code");
|
||||
if ("0".equals(code)) {
|
||||
if (CollectionUtils.isNotEmpty(repairInputDetails.getMaCodeList())) {
|
||||
for (RepairInputDetails inputDetails : repairInputDetails.getMaCodeList()) {
|
||||
inputDetails.setStatus(RepairInputStatusEnum.TO_UPLOAD.getStatus().toString());
|
||||
inputDetails.setTaskId(repairInputDetails.getTaskId());
|
||||
inputDetails.setTypeId(repairInputDetails.getTypeId());
|
||||
inputDetails.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
inputDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
result += repairInputDetailsMapper.updateRepairStatus(inputDetails);
|
||||
// 待上架
|
||||
inputDetails.setStatus(MaMachineStatusEnum.TO_UPLOAD.getStatus().toString());
|
||||
repairInputDetailsMapper.updateStatus(inputDetails);
|
||||
}
|
||||
} else {
|
||||
repairInputDetails.setStatus(RepairInputStatusEnum.TO_UPLOAD.getStatus().toString());
|
||||
repairInputDetails.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
repairInputDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
result += repairInputDetailsMapper.updateRepairStatus(repairInputDetails);
|
||||
}
|
||||
return AjaxResult.success("立体仓入库单创建成功");
|
||||
} else {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "立体仓入库单创建失败");
|
||||
}
|
||||
}
|
||||
repairInputDetails.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
repairInputDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
|
||||
// 编码类型入库
|
||||
if (CollectionUtils.isNotEmpty(repairInputDetails.getMaCodeList())) {
|
||||
for (RepairInputDetails inputDetails : repairInputDetails.getMaCodeList()) {
|
||||
inputDetails.setTaskId(repairInputDetails.getTaskId());
|
||||
inputDetails.setTypeId(repairInputDetails.getTypeId());
|
||||
// 编码类型入库
|
||||
if (CollectionUtils.isNotEmpty(repairInputDetails.getMaCodeList())) {
|
||||
for (RepairInputDetails inputDetails : repairInputDetails.getMaCodeList()) {
|
||||
inputDetails.setTaskId(repairInputDetails.getTaskId());
|
||||
inputDetails.setTypeId(repairInputDetails.getTypeId());
|
||||
// 根据taskId以及typeId查询该设备是否已经入库
|
||||
RepairInputDetails info = repairInputDetailsMapper.selectInfoNum(inputDetails);
|
||||
if (info != null) {
|
||||
if (info.getInputNum().compareTo(info.getRepairNum()) >= 0) {
|
||||
throw new ServiceException("该设备已经入库,请勿重复入库");
|
||||
}
|
||||
}
|
||||
}
|
||||
result += processCodeTypeStorage(repairInputDetails);
|
||||
} else {
|
||||
// 根据taskId以及typeId查询该设备是否已经入库
|
||||
RepairInputDetails info = repairInputDetailsMapper.selectInfoNum(inputDetails);
|
||||
if (info != null) {
|
||||
if (info.getInputNum().compareTo(info.getRepairNum()) >= 0) {
|
||||
RepairInputDetails inputDetails = repairInputDetailsMapper.selectInfoNum(repairInputDetails);
|
||||
if (inputDetails != null) {
|
||||
if (inputDetails.getInputNum().compareTo(inputDetails.getRepairNum()) >= 0) {
|
||||
throw new ServiceException("该设备已经入库,请勿重复入库");
|
||||
}
|
||||
}
|
||||
// 数量类型入库
|
||||
result += processQuantityTypeStorage(repairInputDetails);
|
||||
}
|
||||
result += processCodeTypeStorage(repairInputDetails);
|
||||
} else {
|
||||
// 根据taskId以及typeId查询该设备是否已经入库
|
||||
RepairInputDetails inputDetails = repairInputDetailsMapper.selectInfoNum(repairInputDetails);
|
||||
if (inputDetails != null) {
|
||||
if (inputDetails.getInputNum().compareTo(inputDetails.getRepairNum()) >= 0) {
|
||||
throw new ServiceException("该设备已经入库,请勿重复入库");
|
||||
}
|
||||
}
|
||||
// 数量类型入库
|
||||
result += processQuantityTypeStorage(repairInputDetails);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
|
||||
return result;
|
||||
if (result > 0) {
|
||||
return AjaxResult.success("入库成功");
|
||||
}
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2466,4 +2466,62 @@ public class RepairServiceImpl implements RepairService {
|
|||
repairMapper.updateStatusByRepairScrapNum(bean.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取修试查询列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<RepairDeviceSummaryVo> getRepairDetailsList(RepairTaskDetails bean) {
|
||||
List<RepairDeviceSummaryVo> repairDeviceSummaryVoList = new ArrayList<>();
|
||||
List<RepairDeviceVO> repairDeviceList = repairMapper.getRepairDetailsList(bean);
|
||||
Map<Long, List<RepairDeviceVO>> map = repairDeviceList.stream().collect(Collectors.groupingBy(RepairDeviceVO::getTypeId));
|
||||
for (Long key : map.keySet()) {
|
||||
List<RepairDeviceVO> tempList = map.get(key);
|
||||
if (CollectionUtil.isNotEmpty(tempList)) {
|
||||
RepairDeviceSummaryVo vo = new RepairDeviceSummaryVo();
|
||||
Long[] ids = tempList.stream().map(RepairDeviceVO::getId).toArray(Long[]::new);
|
||||
BigDecimal repairNumSum = tempList.stream()
|
||||
.map(RepairDeviceVO::getRepairNum)
|
||||
.map(num -> Optional.ofNullable(num).orElse(BigDecimal.ZERO))
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal repairedNumSum = tempList.stream()
|
||||
.map(RepairDeviceVO::getRepairedNum)
|
||||
.map(num -> Optional.ofNullable(num).orElse(BigDecimal.ZERO))
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal scrapNumSum = tempList.stream()
|
||||
.map(RepairDeviceVO::getScrapNum)
|
||||
.map(num -> Optional.ofNullable(num).orElse(BigDecimal.ZERO))
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal completeNum = tempList.stream()
|
||||
.map(RepairDeviceVO::getCompleteNum)
|
||||
.map(num -> Optional.ofNullable(num).orElse(BigDecimal.ZERO))
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
Integer dataStatusSum = tempList.stream()
|
||||
.map(RepairDeviceVO::getDataStatus)
|
||||
.filter(Objects::nonNull)
|
||||
.map(status -> "1".equals(status) ? 1 : 0) // 安全转换
|
||||
.reduce(0, Integer::sum);
|
||||
BigDecimal waitRepairNum = repairNumSum.subtract(repairedNumSum).subtract(scrapNumSum);
|
||||
BigDecimal typeCostSum = tempList.stream().map(RepairDeviceVO::getTotalCost).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
vo.setRepairDeviceList(tempList)
|
||||
.setIds(ids).setTypeRepairNum(repairNumSum).setTypeRepairedNum(repairedNumSum)
|
||||
.setTypeScrapNum(scrapNumSum).setTaskId(tempList.get(0).getTaskId())
|
||||
.setCode(tempList.get(0).getCode()).setTypeName(tempList.get(0).getTypeName())
|
||||
.setTypeId(tempList.get(0).getTypeId()).setType(tempList.get(0).getType())
|
||||
.setUnitName(tempList.get(0).getUnitName()).setManageType(tempList.get(0).getManageType())
|
||||
.setDataStatusNum(dataStatusSum)
|
||||
.setUnitValue(tempList.get(0).getUnitValue())
|
||||
.setWaitRepairNum(waitRepairNum)
|
||||
.setCompleteNum(completeNum)
|
||||
.setTypeCost(typeCostSum)
|
||||
.setBackPro(tempList.get(0).getBackPro())
|
||||
.setBackUnit(tempList.get(0).getBackUnit());
|
||||
repairDeviceSummaryVoList.add(vo);
|
||||
}
|
||||
}
|
||||
return repairDeviceSummaryVoList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -614,8 +614,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
list.add("计量单位");
|
||||
list.add("租赁单价");
|
||||
list.add("租赁数量");
|
||||
list.add("租赁日期");
|
||||
list.add("归还日期");
|
||||
list.add("租赁开始日期");
|
||||
list.add("租赁结束日期");
|
||||
list.add("租赁天数");
|
||||
list.add("租赁费用(元)");
|
||||
list.add("备注");
|
||||
|
|
@ -625,8 +625,8 @@ public class SltAgreementInfoController extends BaseController {
|
|||
list.add("计量单位");
|
||||
list.add("租赁单价");
|
||||
list.add("租赁数量");
|
||||
list.add("租赁日期");
|
||||
list.add("归还日期");
|
||||
list.add("租赁开始日期");
|
||||
list.add("租赁结束日期");
|
||||
list.add("租赁天数");
|
||||
list.add("租赁费用(元)");
|
||||
list.add("备注");
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pcd.file_url, pcd.company_id, pcd.fix_code, mt.type_name, mt.unit_name, mt.unit_value,mtp.type_name as ma_type_name,mtp2.type_name as ma_type_model, mt.manage_type as manage_type,
|
||||
pcd.warn_documents as warnDocuments, pcd.reason as reason, mt.rent_price as rentPrice, su.sign_url as signUrl, su.sign_type as signType,msi.supplier as supplier_name,
|
||||
su2.sign_url as signUrls,
|
||||
su2.sign_type as signTypes
|
||||
su2.sign_type as signTypes,
|
||||
mt.is_rs as isRs
|
||||
from purchase_check_details pcd
|
||||
left join ma_supplier_info msi on msi.supplier_id = pcd.supplier_id
|
||||
left join ma_type mt on pcd.type_id = mt.type_id
|
||||
|
|
|
|||
|
|
@ -34,10 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<sql id="selectPurchaseCheckInfoBaseSQL">
|
||||
select
|
||||
pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.supplier_id, pci.tax_rate, pci.create_by,
|
||||
pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id, pcd.production_time
|
||||
pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id, pcd.production_time, t.code
|
||||
from
|
||||
purchase_check_info pci
|
||||
left join purchase_check_details pcd ON pci.task_id = pcd.task_id
|
||||
left join tm_task t on t.task_id = pci.task_id
|
||||
</sql>
|
||||
|
||||
<sql id="selectPurchaseCheckInfoJoinSQL">
|
||||
|
|
|
|||
|
|
@ -62,6 +62,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
UPDATE purchase_check_details SET `status` = if(bind_num = input_num, #{status}, `status`) WHERE task_id = #{taskId} and type_id = #{typeId}
|
||||
</update>
|
||||
|
||||
<update id="updateUpNum">
|
||||
UPDATE purchase_check_details
|
||||
SET up_num = ifnull(up_num, 0) + ifnull(#{bindNum},0)
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="updateMaStatus">
|
||||
UPDATE ma_machine
|
||||
SET ma_status = #{maStatus}
|
||||
WHERE ma_code = #{maCode}
|
||||
and type_id = #{typeId}
|
||||
</update>
|
||||
|
||||
<update id="updatePurchaseStatus">
|
||||
UPDATE purchase_check_details SET `status` = if(check_num = up_num, #{updatedStatus}, `status`) WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateNumById">
|
||||
UPDATE purchase_check_details
|
||||
SET `status` = #{updatedStatus},
|
||||
up_num = #{inputNum}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectAll" resultType="com.bonus.material.purchase.domain.vo.PurchaseVo">
|
||||
SELECT
|
||||
pci.task_id as taskId,
|
||||
|
|
|
|||
|
|
@ -174,7 +174,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt.manage_type AS manageType,
|
||||
tta.agreement_id as agreementId,
|
||||
rid.reject_reason as rejectReason,
|
||||
mt4.type_id as firstId
|
||||
mt4.type_id as firstId,
|
||||
mt.is_rs as isRs
|
||||
from repair_input_details rid
|
||||
LEFT JOIN tm_task tt on tt.task_id=rid.task_id
|
||||
LEFT JOIN ma_type mt on rid.type_id = mt.type_id and mt.del_flag = '0'
|
||||
|
|
@ -228,6 +229,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
rid.task_id = #{taskId}
|
||||
AND rid.type_id = #{typeId}
|
||||
AND mm.ma_status != '19'
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
locate(#{keyWord}, mt1.type_name) > 0
|
||||
|
|
@ -746,4 +748,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update bm_qrcode_box set box_status = 6
|
||||
where box_code = #{boxCode}
|
||||
</update>
|
||||
|
||||
<update id="updateRepairStatus">
|
||||
UPDATE repair_input_details
|
||||
SET
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime},
|
||||
status = #{status}
|
||||
WHERE task_id = #{taskId}
|
||||
and type_id = #{typeId}
|
||||
<if test="maId != null">
|
||||
and ma_id = #{maId}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="updateStatus">
|
||||
UPDATE ma_machine
|
||||
SET ma_status = #{status}
|
||||
WHERE
|
||||
ma_id = #{maId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1830,4 +1830,72 @@
|
|||
GROUP BY rad.task_id, rad.type_id) a
|
||||
order by createTime desc
|
||||
</select>
|
||||
|
||||
<select id="getRepairDetailsList" resultType="com.bonus.material.repair.domain.vo.RepairDeviceVO">
|
||||
<![CDATA[
|
||||
select
|
||||
rad.id as id,
|
||||
rad.task_id as taskId,
|
||||
rad.ma_id as maId,
|
||||
mt2.type_name as typeName,
|
||||
mt2.type_id as typeNameId,
|
||||
mt.type_name as type,
|
||||
mt.unit_name as unitName,
|
||||
mt.manage_type as manageType,
|
||||
mm.ma_code as code,
|
||||
ifnull(rad.repair_num, 0) as repairNum,
|
||||
sum(ifnull(rad.repaired_num,0) + ifnull(rad.this_repaired_num,0)) as repairedNum,
|
||||
sum(ifnull(rad.scrap_num,0) + ifnull(rad.this_scrap_num,0)) as scrapNum,
|
||||
rad.status as status,
|
||||
rad.status as completeNum,
|
||||
su.nick_name as repairer,
|
||||
rad.update_time as updateTime,
|
||||
rad.type_id as typeId,
|
||||
rad.back_id as backId,
|
||||
rad.level as level,
|
||||
rad.parent_id as parentId,
|
||||
rad.create_time,
|
||||
bai.CODE AS backCode,
|
||||
mt4.type_id AS firstId,
|
||||
( SELECT COUNT(*) FROM repair_cost rc WHERE rc.repair_id = rad.id ) AS totalCostRecords,
|
||||
( SELECT COALESCE(SUM(rc.costs), 0) FROM repair_cost rc WHERE rc.repair_id = rad.id ) AS totalCost,
|
||||
rad2.`status` as dataStatus,
|
||||
mt.unit_value AS unitValue,
|
||||
bui.unit_name AS backUnit,
|
||||
bpi.pro_name AS backPro
|
||||
from
|
||||
repair_apply_details rad
|
||||
left join ma_type mt on rad.type_id = mt.type_id
|
||||
left join ma_machine mm on mm.ma_id = rad.ma_id
|
||||
left join sys_user su on rad.repairer = su.user_id
|
||||
left join ma_type mt2 on mt.parent_id = mt2.type_id
|
||||
LEFT JOIN back_apply_info bai ON rad.back_id = bai.id
|
||||
left join ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = '0'
|
||||
left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0'
|
||||
LEFT JOIN tm_task_agreement tta ON rad.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai2 ON tta.agreement_id = bai2.agreement_id
|
||||
LEFT JOIN bm_unit bui ON bai2.unit_id = bui.unit_id
|
||||
LEFT JOIN bm_project bpi ON bai2.project_id = bpi.pro_id and bpi.del_flag = '0'
|
||||
left join repair_apply_details rad2 on rad2.task_id=rad.task_id and rad2.ma_id <=> rad.ma_id and rad2.type_id=rad.type_id and rad2.is_ds='1'
|
||||
]]>
|
||||
where
|
||||
rad.task_id = #{taskId}
|
||||
<if test="companyId != null and companyId != ''">
|
||||
and rad.company_id = #{companyId}
|
||||
</if>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, mm.ma_code) > 0
|
||||
or locate(#{keyword}, su.nick_name) > 0
|
||||
or locate(#{keyword}, mt2.type_name) > 0
|
||||
or locate(#{keyword}, mt.type_name) > 0)
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND mt.type_id = #{type}
|
||||
</if>
|
||||
<if test="typeName != null and typeName != ''">
|
||||
AND mt2.type_id = #{typeName}
|
||||
</if>
|
||||
GROUP BY rad.id
|
||||
order by rad.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue