Compare commits
No commits in common. "c8cba86a8c127d6e3c6f50fdd68d4a179251f906" and "95de8db2da974b0a7d90fe544ab51306eb2a9dd3" have entirely different histories.
c8cba86a8c
...
95de8db2da
|
|
@ -2,8 +2,6 @@ package com.bonus.material.basic.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.material.basic.domain.BmMessage;
|
||||
import com.bonus.material.lease.domain.DeptDto;
|
||||
import com.bonus.system.api.domain.SysDept;
|
||||
|
||||
/**
|
||||
* 消息Mapper接口
|
||||
|
|
@ -60,6 +58,4 @@ public interface BmMessageMapper {
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteBmMessageByIds(Long[] ids);
|
||||
|
||||
List<DeptDto> getdeptIds();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class MaDevQcController extends BaseController {
|
|||
@ApiOperation(value = "删除装备质检")
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody MaDevQc maDevQc) {
|
||||
if (maDevQc == null || maDevQc.getFileId() == null) {
|
||||
if (maDevQc == null || maDevQc.getMaId() == null) {
|
||||
return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
|
||||
}
|
||||
Integer i = maDevQcService.deleteById(maDevQc);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class MaDevRmController extends BaseController {
|
|||
* @param maDevQc
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "维修保养列表")
|
||||
@ApiOperation(value = "装备质检列表")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(MaDevRm maDevRm) {
|
||||
startPage();
|
||||
|
|
@ -43,7 +43,7 @@ public class MaDevRmController extends BaseController {
|
|||
* @param maDevQc
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "维修保养列表")
|
||||
@ApiOperation(value = "装备质检列表")
|
||||
@GetMapping("/rmList")
|
||||
public AjaxResult qcList(MaDevRm maDevRm) {
|
||||
startPage();
|
||||
|
|
@ -70,7 +70,7 @@ public class MaDevRmController extends BaseController {
|
|||
@ApiOperation(value = "删除装备维保")
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody MaDevRm maDevRm) {
|
||||
if (maDevRm == null || maDevRm.getFileId() == null) {
|
||||
if (maDevRm == null || maDevRm.getMaId() == null) {
|
||||
return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
|
||||
}
|
||||
Integer i = maDevRmService.deleteById(maDevRm);
|
||||
|
|
|
|||
|
|
@ -87,6 +87,5 @@ public class MaDevQc extends BaseEntity implements Serializable {
|
|||
|
||||
private Integer maintenanceAlarmDay;
|
||||
private Integer ownId;
|
||||
private Integer fileId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ public class MaDevRm extends BaseEntity implements Serializable {
|
|||
@ApiModelProperty(value = "装备名称")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty(value = "质检名称")
|
||||
private String rmName;
|
||||
|
||||
@ApiModelProperty(value = "维保编码")
|
||||
private String rmCode;
|
||||
|
||||
|
|
@ -69,8 +72,6 @@ public class MaDevRm extends BaseEntity implements Serializable {
|
|||
|
||||
@ApiModelProperty(value = "维保次数")
|
||||
private Integer num;
|
||||
@ApiModelProperty(value = "文件id")
|
||||
private Integer fileId;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,8 +79,4 @@ public interface BmFileInfoMapper {
|
|||
Integer deleteBmFileInfo(BmFileInfo fileInfo);
|
||||
|
||||
List<BmFileInfo> getInfoByMaId(Integer maId);
|
||||
|
||||
String getUrlById(Integer fileId);
|
||||
|
||||
Integer deleteBmFileInfoByFileId(@Param("fileId") Integer fileId, @Param("fileType") Integer fileType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.bonus.material.device.mapper;
|
|||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.device.domain.MaDevQc;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -34,7 +33,7 @@ public interface MaDevQcMapper {
|
|||
* @param maId
|
||||
* @return
|
||||
*/
|
||||
int deleteDevQcByFileId(Integer fileId);
|
||||
int deleteDevQcById(Integer maId);
|
||||
|
||||
/**
|
||||
* 查询月任务数
|
||||
|
|
@ -52,6 +51,4 @@ public interface MaDevQcMapper {
|
|||
Integer updateById(MaDevQc maDevQc);
|
||||
|
||||
List<MaDevQc> checkQcTime();
|
||||
|
||||
Integer updateFileId(@Param("id") Integer id, @Param("fileId") Integer fileId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.bonus.material.device.mapper;
|
|||
import com.bonus.material.device.domain.MaDevQc;
|
||||
import com.bonus.material.device.domain.MaDevRm;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -34,7 +33,7 @@ public interface MaDevRmMapper {
|
|||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int deleteDevQcByFileId(Integer fileId);
|
||||
int deleteDevQcById(Integer maId);
|
||||
|
||||
/**
|
||||
* 查询月任务数
|
||||
|
|
@ -44,6 +43,4 @@ public interface MaDevRmMapper {
|
|||
String selectTaskNumByMonth(Date nowDate);
|
||||
|
||||
List<MaDevRm> selectQcList(MaDevRm maDevRm);
|
||||
|
||||
Integer updateFileId(@Param("id") Integer id, @Param("fileId") Integer fileId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ public class MaDevQcServiceImpl implements MaDevQcService {
|
|||
bmFileInfo.setFileType(4L);
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
||||
maDevQcMapper.updateFileId(maDevQc.getId(), bmFileInfo.getId().intValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -143,9 +142,9 @@ public class MaDevQcServiceImpl implements MaDevQcService {
|
|||
*/
|
||||
@Override
|
||||
public Integer deleteById(MaDevQc maDevQc) {
|
||||
int i = maDevQcMapper.deleteDevQcByFileId(maDevQc.getFileId());
|
||||
int i = maDevQcMapper.deleteDevQcById(maDevQc.getMaId());
|
||||
if (i > 0) {
|
||||
bmFileInfoMapper.deleteBmFileInfoByMaId(maDevQc.getFileId(),4);
|
||||
bmFileInfoMapper.deleteBmFileInfoByMaId(maDevQc.getMaId(),4);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ public class MaDevRmServiceImpl implements MaDevRmService {
|
|||
bmFileInfo.setFileType(6L);
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
||||
maDevRmMapper.updateFileId(maDevRm.getId(), bmFileInfo.getId().intValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -112,20 +111,15 @@ public class MaDevRmServiceImpl implements MaDevRmService {
|
|||
*/
|
||||
@Override
|
||||
public Integer deleteById(MaDevRm maDevRm) {
|
||||
int i = maDevRmMapper.deleteDevQcByFileId(maDevRm.getFileId());
|
||||
int i = maDevRmMapper.deleteDevQcById(maDevRm.getMaId());
|
||||
if (i > 0) {
|
||||
bmFileInfoMapper.deleteBmFileInfoByFileId(maDevRm.getFileId(), 6);
|
||||
bmFileInfoMapper.deleteBmFileInfoByMaId(maDevRm.getMaId(),6);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MaDevRm> selectQcList(MaDevRm maDevRm) {
|
||||
List<MaDevRm> maDevRms = maDevRmMapper.selectQcList(maDevRm);
|
||||
for (MaDevRm devRm : maDevRms) {
|
||||
String url = bmFileInfoMapper.getUrlById(devRm.getFileId());
|
||||
devRm.setUrl(url);
|
||||
}
|
||||
return maDevRms;
|
||||
return maDevRmMapper.selectQcList(maDevRm);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
package com.bonus.material.lease.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2024/12/26 - 11:04
|
||||
*/
|
||||
@Data
|
||||
public class DeptDto {
|
||||
private Integer deptId;
|
||||
private String companyName;
|
||||
}
|
||||
|
|
@ -104,10 +104,6 @@ public class MaLeaseInfo extends BaseEntity implements Serializable {
|
|||
@ApiModelProperty(value = "接单公司名称")
|
||||
private String orderCompanyName;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "需求发布公司名称")
|
||||
private String publishCompanyName;
|
||||
|
||||
/**
|
||||
* 接单时间
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -118,6 +118,4 @@ public interface MaLeaseInfoMapper {
|
|||
Integer getTodayLeaseCount();
|
||||
|
||||
Integer getTodayLeaseOderCount();
|
||||
|
||||
MaLeaseInfo getDevInfoById(Integer id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,10 @@ import com.bonus.common.security.utils.SecurityUtils;
|
|||
import com.bonus.material.basic.domain.BmMessage;
|
||||
import com.bonus.material.basic.mapper.BmMessageMapper;
|
||||
import com.bonus.material.device.mapper.BmFileInfoMapper;
|
||||
import com.bonus.material.lease.domain.*;
|
||||
import com.bonus.material.lease.domain.MaLease;
|
||||
import com.bonus.material.lease.domain.MaLeaseDetails;
|
||||
import com.bonus.material.lease.domain.MaLeaseDto;
|
||||
import com.bonus.material.lease.domain.MaLeaseInfo;
|
||||
import com.bonus.material.lease.domain.vo.MaLeaseVo;
|
||||
import com.bonus.material.lease.mapper.MaLeaseInfoMapper;
|
||||
import com.bonus.material.lease.service.MaLeaseInfoService;
|
||||
|
|
@ -35,7 +38,6 @@ import java.util.stream.Collectors;
|
|||
|
||||
/**
|
||||
* 租赁需求大厅实现层
|
||||
*
|
||||
* @Author ma_sh
|
||||
* @create 2024/11/26 10:42
|
||||
*/
|
||||
|
|
@ -54,7 +56,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 发布租赁需求
|
||||
*
|
||||
* @param maLeaseInfo
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -89,13 +90,38 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
}
|
||||
}
|
||||
}
|
||||
BmMessage bmMessage = new BmMessage();
|
||||
bmMessage.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
bmMessage.setMessageContent("您好,有新的需求发布,如有需要请查看");
|
||||
bmMessage.setUuid(String.valueOf(UUID.randomUUID()));
|
||||
bmMessage.setFromCompany(0L);
|
||||
bmMessage.setFromUser(0L);
|
||||
bmMessage.setFromCompanyName("系统");
|
||||
|
||||
bmMessage.setToCompanyName("系统");
|
||||
bmMessage.setToUser(0L);
|
||||
bmMessage.setToCompany(0L);
|
||||
bmMessage.setIsRead(0);
|
||||
|
||||
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE + bmMessage.getFromCompany() + ":" + bmMessage.getToCompany();
|
||||
JSONArray arrayCache = SpringUtils.getBean(RedisService.class).getCacheObject(msgKey);
|
||||
if (arrayCache == null) {
|
||||
arrayCache = new JSONArray();
|
||||
}
|
||||
List<BmMessage> list = arrayCache.toList(BmMessage.class);
|
||||
list.add(bmMessage);
|
||||
(SpringUtils.getBean(RedisService.class)).setCacheObject(msgKey, list, MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE_HOURS, TimeUnit.HOURS);
|
||||
bmMessageMapper.insertBmMessage(bmMessage);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
// 5. 返回成功结果
|
||||
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg());
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入文件信息
|
||||
*
|
||||
* @param maLeaseDetails
|
||||
* @param id
|
||||
*/
|
||||
|
|
@ -115,7 +141,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 修改租赁需求
|
||||
*
|
||||
* @param maLeaseInfo
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -174,7 +199,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 查询单个租赁需求详情
|
||||
*
|
||||
* @param maLeaseInfo
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -206,7 +230,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 查询文件信息
|
||||
*
|
||||
* @param modelId
|
||||
* @param fileType
|
||||
* @return
|
||||
|
|
@ -221,7 +244,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 处理租赁详情
|
||||
*
|
||||
* @param leaseDetailsList
|
||||
* @param modelId
|
||||
*/
|
||||
|
|
@ -244,7 +266,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 更新浏览量(仅在待接单状态时)
|
||||
*
|
||||
* @param maLeaseVo
|
||||
* @param leaseId
|
||||
*/
|
||||
|
|
@ -260,7 +281,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 更新浏览量
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
private void updateHotSearch(Integer id) {
|
||||
|
|
@ -274,7 +294,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 查询租赁需求列表
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -306,7 +325,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 删除租赁需求
|
||||
*
|
||||
* @param maLeaseInfo
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -336,7 +354,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 查询租赁需求列表首页
|
||||
*
|
||||
* @param maLease
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -366,7 +383,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 出租方立即接单
|
||||
*
|
||||
* @param maLeaseInfo
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -382,33 +398,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
maLeaseInfo.setOrderTime(DateUtils.getNowDate());
|
||||
maLeaseInfo.setLeaseStatus(LeaseInfoEnum.LEASE_ORDER_AUDIT.getStatus());
|
||||
int result = leaseInfoMapper.updateDevInfo(maLeaseInfo);
|
||||
MaLeaseInfo leaseInfo = leaseInfoMapper.getDevInfoById(maLeaseInfo.getId());
|
||||
try {
|
||||
BmMessage bmMessage = new BmMessage();
|
||||
bmMessage.setCreateTime(DateUtils.getNowDate());
|
||||
bmMessage.setMessageContent("您好,您的需求已被" + leaseInfo.getOrderCompanyName() + "公司接单,请及时查看");
|
||||
bmMessage.setUuid(String.valueOf(UUID.randomUUID()));
|
||||
bmMessage.setFromCompany(0L);
|
||||
bmMessage.setFromUser(0L);
|
||||
bmMessage.setFromCompanyName("系统");
|
||||
|
||||
bmMessage.setToCompanyName(leaseInfo.getPublishCompanyName());
|
||||
bmMessage.setToUser(Long.parseLong(leaseInfo.getPublishUser()));
|
||||
bmMessage.setToCompany(Long.parseLong(leaseInfo.getPublishCompany()));
|
||||
bmMessage.setIsRead(0);
|
||||
|
||||
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE + bmMessage.getFromCompany() + ":" + bmMessage.getToCompany();
|
||||
JSONArray arrayCache = SpringUtils.getBean(RedisService.class).getCacheObject(msgKey);
|
||||
if (arrayCache == null) {
|
||||
arrayCache = new JSONArray();
|
||||
}
|
||||
List<BmMessage> list = arrayCache.toList(BmMessage.class);
|
||||
list.add(bmMessage);
|
||||
(SpringUtils.getBean(RedisService.class)).setCacheObject(msgKey, list, MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE_HOURS, TimeUnit.HOURS);
|
||||
bmMessageMapper.insertBmMessage(bmMessage);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
return result > 0 ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
|
||||
|
|
@ -421,63 +410,16 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
if (maLeaseInfo.getLeaseStatus() == 1) {
|
||||
maLeaseInfo.setAgreeUser(String.valueOf(SecurityUtils.getUserId()));
|
||||
result = leaseInfoMapper.updateDevInfo(maLeaseInfo);
|
||||
MaLeaseInfo leaseInfo = leaseInfoMapper.getDevInfoById(maLeaseInfo.getId());
|
||||
BmMessage bmMessage = new BmMessage();
|
||||
bmMessage.setCreateTime(DateUtils.getNowDate());
|
||||
bmMessage.setMessageContent("您好,您的接单需求" + leaseInfo.getPublishCompanyName() + "已同意");
|
||||
bmMessage.setUuid(String.valueOf(UUID.randomUUID()));
|
||||
bmMessage.setFromCompany(0L);
|
||||
bmMessage.setFromUser(0L);
|
||||
bmMessage.setFromCompanyName("系统");
|
||||
|
||||
bmMessage.setToCompanyName(leaseInfo.getOrderCompanyName());
|
||||
bmMessage.setToUser(Long.parseLong(leaseInfo.getOrderUser()));
|
||||
bmMessage.setToCompany(Long.parseLong(leaseInfo.getOrderCompany()));
|
||||
bmMessage.setIsRead(0);
|
||||
|
||||
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE + bmMessage.getFromCompany() + ":" + bmMessage.getToCompany();
|
||||
JSONArray arrayCache = SpringUtils.getBean(RedisService.class).getCacheObject(msgKey);
|
||||
if (arrayCache == null) {
|
||||
arrayCache = new JSONArray();
|
||||
}
|
||||
List<BmMessage> list = arrayCache.toList(BmMessage.class);
|
||||
list.add(bmMessage);
|
||||
(SpringUtils.getBean(RedisService.class)).setCacheObject(msgKey, list, MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE_HOURS, TimeUnit.HOURS);
|
||||
bmMessageMapper.insertBmMessage(bmMessage);
|
||||
}
|
||||
if (maLeaseInfo.getLeaseStatus() == 4) {
|
||||
maLeaseInfo.setRejectUser(String.valueOf(SecurityUtils.getUserId()));
|
||||
result = leaseInfoMapper.updateDevInfo(maLeaseInfo);
|
||||
MaLeaseInfo leaseInfo = leaseInfoMapper.getDevInfoById(maLeaseInfo.getId());
|
||||
BmMessage bmMessage = new BmMessage();
|
||||
bmMessage.setCreateTime(DateUtils.getNowDate());
|
||||
bmMessage.setMessageContent("您好,您的接单需求" + leaseInfo.getPublishCompanyName() + "已驳回");
|
||||
bmMessage.setUuid(String.valueOf(UUID.randomUUID()));
|
||||
bmMessage.setFromCompany(0L);
|
||||
bmMessage.setFromUser(0L);
|
||||
bmMessage.setFromCompanyName("系统");
|
||||
|
||||
bmMessage.setToCompanyName(leaseInfo.getOrderCompanyName());
|
||||
bmMessage.setToUser(Long.parseLong(leaseInfo.getOrderUser()));
|
||||
bmMessage.setToCompany(Long.parseLong(leaseInfo.getOrderCompany()));
|
||||
bmMessage.setIsRead(0);
|
||||
|
||||
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE + bmMessage.getFromCompany() + ":" + bmMessage.getToCompany();
|
||||
JSONArray arrayCache = SpringUtils.getBean(RedisService.class).getCacheObject(msgKey);
|
||||
if (arrayCache == null) {
|
||||
arrayCache = new JSONArray();
|
||||
}
|
||||
List<BmMessage> list = arrayCache.toList(BmMessage.class);
|
||||
list.add(bmMessage);
|
||||
(SpringUtils.getBean(RedisService.class)).setCacheObject(msgKey, list, MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE_HOURS, TimeUnit.HOURS);
|
||||
bmMessageMapper.insertBmMessage(bmMessage);
|
||||
}
|
||||
return result > 0 ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出租方需求列表
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -489,7 +431,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 设置租赁需求的必要字段
|
||||
*
|
||||
* @param maLeaseInfo
|
||||
*/
|
||||
private void populateLeaseInfoFields(MaLeaseInfo maLeaseInfo) {
|
||||
|
|
@ -506,7 +447,6 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
|
||||
/**
|
||||
* 生成需求编号
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String getString() {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class OrderInfoDto {
|
|||
private Integer maNumber;
|
||||
|
||||
@ApiModelProperty(value = "退租时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date rentEndTime;
|
||||
|
||||
@ApiModelProperty(value = "天数")
|
||||
|
|
|
|||
|
|
@ -6,10 +6,13 @@ import com.bonus.common.core.exception.ServiceException;
|
|||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.SpringUtils;
|
||||
import com.bonus.common.redis.service.RedisService;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.basic.domain.BmMessage;
|
||||
import com.bonus.material.basic.mapper.BmMessageMapper;
|
||||
import com.bonus.material.device.domain.MaDevQc;
|
||||
import com.bonus.material.device.mapper.MaDevQcMapper;
|
||||
import com.bonus.material.notice.entity.Notice;
|
||||
import com.bonus.material.notice.mapper.NoticeMapper;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class UserDto {
|
|||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phoneNumber;
|
||||
private String phonenumber;
|
||||
|
||||
@ApiModelProperty(value = "用户性别(0男 1女 2未知)")
|
||||
private String sex;
|
||||
|
|
|
|||
|
|
@ -57,25 +57,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by create_time
|
||||
</select>
|
||||
<select id="getdeptIds" resultType="com.bonus.material.lease.domain.DeptDto">
|
||||
SELECT
|
||||
sd.dept_id AS deptId,
|
||||
sd1.dept_name AS companyName
|
||||
FROM
|
||||
sys_dept sd
|
||||
JOIN (
|
||||
SELECT
|
||||
CASE
|
||||
ancestors
|
||||
WHEN ( '0' ) THEN
|
||||
dept_id ELSE SUBSTRING_INDEX( SUBSTRING_INDEX( ancestors, ',', 2 ), ',', - 1 )
|
||||
END AS first_ancestor,
|
||||
dept_id
|
||||
FROM
|
||||
sys_dept GROUP BY first_ancestor
|
||||
) AS subquery ON sd.dept_id = subquery.dept_id
|
||||
LEFT JOIN sys_dept sd1 ON sd1.dept_id = subquery.first_ancestor
|
||||
</select>
|
||||
|
||||
<insert id="insertBmMessage" parameterType="com.bonus.material.basic.domain.BmMessage" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bm_message
|
||||
|
|
|
|||
|
|
@ -60,9 +60,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from bm_file_info
|
||||
where model_id = #{maId} and file_type = 5 and task_type = 17
|
||||
</select>
|
||||
<select id="getUrlById" resultType="java.lang.String">
|
||||
select url from bm_file_info where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBmFileInfo" parameterType="com.bonus.common.biz.domain.BmFileInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bm_file_info
|
||||
|
|
@ -152,7 +149,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="fileType != null "> and file_type = #{fileType}</if>
|
||||
</where>
|
||||
</delete>
|
||||
<delete id="deleteBmFileInfoByFileId">
|
||||
delete from bm_file_info where id = #{fileId} and task_type = 17 and file_type = #{fileType}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -13,12 +13,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateFileId">
|
||||
update ma_dev_qc set file_id = #{fileId} where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDevQcByFileId">
|
||||
delete from ma_dev_qc where file_id = #{fileId}
|
||||
<delete id="deleteDevQcById">
|
||||
delete from ma_dev_qc where ma_id = #{maId}
|
||||
</delete>
|
||||
|
||||
<insert id="insertDevQc" useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
@ -55,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectDevQcList" resultType="com.bonus.material.device.domain.MaDevQc">
|
||||
SELECT
|
||||
m1.id,
|
||||
m2.ma_id AS maId,
|
||||
m1.ma_id AS maId,
|
||||
m2.CODE AS deviceCode,
|
||||
m2.device_name AS deviceName,
|
||||
m1.qc_code AS qcCode,
|
||||
|
|
@ -66,14 +63,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
m1.create_time AS updateTime,
|
||||
aa.create_time AS createTime
|
||||
FROM
|
||||
ma_dev_info m2
|
||||
LEFT JOIN ma_dev_qc m1 ON m1.ma_id = m2.ma_id
|
||||
LEFT JOIN ma_type m3 ON m2.type_id = m3.type_id
|
||||
ma_dev_qc m1
|
||||
LEFT JOIN ma_dev_info m2 ON m1.ma_id = m2.ma_id
|
||||
AND m2.is_active = '1'
|
||||
left join ma_type m3 ON m2.type_id = m3.type_id
|
||||
LEFT JOIN sys_user su ON su.user_id = m1.create_by
|
||||
LEFT JOIN ( SELECT count(*) as num, ma_id, MAX( qc_time ) AS max_qc_time FROM ma_dev_qc GROUP BY ma_id ) latest_qc ON m1.ma_id = latest_qc.ma_id
|
||||
LEFT JOIN ( SELECT ma_id, min( create_time ) AS create_time FROM ma_dev_qc GROUP BY ma_id ) aa ON m1.ma_id = aa.ma_id
|
||||
INNER JOIN ( SELECT count(*) as num, ma_id, MAX( qc_time ) AS max_qc_time FROM ma_dev_qc GROUP BY ma_id ) latest_qc ON m1.ma_id = latest_qc.ma_id
|
||||
AND m1.qc_time = latest_qc.max_qc_time
|
||||
INNER JOIN ( SELECT ma_id, min( create_time ) AS create_time FROM ma_dev_qc GROUP BY ma_id ) aa ON m1.ma_id = aa.ma_id
|
||||
<where>
|
||||
m2.is_active = '1'
|
||||
<if test="deviceCode != null and deviceCode != ''">
|
||||
and m2.code like concat('%',#{deviceCode},'%')
|
||||
</if>
|
||||
|
|
@ -93,10 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and DATE_FORMAT(m1.create_time,'%Y-%m-%d') between #{createStartTime} and #{createEndTime}
|
||||
</if>
|
||||
<if test="qcCom != null and qcCom != ''">
|
||||
and m2.own_co = #{qcCom}
|
||||
and m1.qc_com = #{qcCom}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY m2.ma_id
|
||||
</select>
|
||||
<select id="selectQcList" resultType="com.bonus.material.device.domain.MaDevQc">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -4,18 +4,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.bonus.material.device.mapper.MaDevRmMapper">
|
||||
<update id="updateFileId">
|
||||
update ma_dev_rm set file_id = #{fileId} where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDevQcByFileId">
|
||||
delete from ma_dev_rm where file_id = #{fileId}
|
||||
<delete id="deleteDevQcById">
|
||||
delete from ma_dev_rm where ma_id = #{maId}
|
||||
</delete>
|
||||
|
||||
<insert id="insertDevQc" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ma_dev_rm
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="maId != null">ma_id,</if>
|
||||
<if test="rmName != null and rmName != ''">rm_name,</if>
|
||||
<if test="rmCode != null and rmCode != ''">rm_code,</if>
|
||||
<if test="rmTime != null">rm_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
|
|
@ -24,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="maId != null">#{maId},</if>
|
||||
<if test="rmName != null and rmName != ''">#{rmName},</if>
|
||||
<if test="rmCode != null and rmCode != ''">#{rmCode},</if>
|
||||
<if test="rmTime != null">#{rmTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
|
|
@ -42,9 +41,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectDevQcList" resultType="com.bonus.material.device.domain.MaDevRm">
|
||||
SELECT
|
||||
m1.id,
|
||||
m2.ma_id AS maId,
|
||||
m1.ma_id AS maId,
|
||||
m2.CODE AS deviceCode,
|
||||
m2.device_name AS deviceName,
|
||||
m1.rm_name AS rmName,
|
||||
m1.rm_code AS rmCode,
|
||||
m1.rm_time AS rmTime,
|
||||
su.nick_name AS createBy,
|
||||
|
|
@ -52,13 +52,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
m1.create_time AS updateTime,
|
||||
aa.create_time AS createTime
|
||||
FROM
|
||||
ma_dev_info m2
|
||||
LEFT JOIN ma_dev_rm m1 ON m1.ma_id = m2.ma_id AND m1.rm_com = m2.own_co
|
||||
ma_dev_rm m1
|
||||
LEFT JOIN ma_dev_info m2 ON m1.ma_id = m2.ma_id
|
||||
AND m2.is_active = '1'
|
||||
LEFT JOIN sys_user su ON su.user_id = m1.create_by
|
||||
LEFT JOIN ( SELECT count(*) AS num, ma_id, MAX( rm_time ) AS max_rm_time FROM ma_dev_rm GROUP BY ma_id ) latest_rm ON m1.ma_id = latest_rm.ma_id
|
||||
LEFT JOIN ( SELECT ma_id, min( create_time ) AS create_time FROM ma_dev_rm GROUP BY ma_id ) aa ON m1.ma_id = aa.ma_id
|
||||
INNER JOIN ( SELECT count(*) as num, ma_id, MAX( rm_time ) AS max_rm_time FROM ma_dev_rm GROUP BY ma_id ) latest_rm ON m1.ma_id = latest_rm.ma_id
|
||||
AND m1.rm_time = latest_rm.max_rm_time
|
||||
INNER JOIN ( SELECT ma_id, min( create_time ) AS create_time FROM ma_dev_rm GROUP BY ma_id ) aa ON m1.ma_id = aa.ma_id
|
||||
<where>
|
||||
m2.is_active = '1'
|
||||
<if test="deviceCode != null and deviceCode != ''">
|
||||
and m2.code like concat('%',#{deviceCode},'%')
|
||||
</if>
|
||||
|
|
@ -75,15 +76,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and DATE_FORMAT(m1.create_time,'%Y-%m-%d') between #{createStartTime} and #{createEndTime}
|
||||
</if>
|
||||
<if test="rmCom != null and rmCom != ''">
|
||||
AND m2.own_co = #{rmCom}
|
||||
and m1.rm_com = #{rmCom}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY m2.ma_id
|
||||
</select>
|
||||
<select id="selectQcList" resultType="com.bonus.material.device.domain.MaDevRm">
|
||||
SELECT
|
||||
mdq.*,
|
||||
su.nick_name AS nickName
|
||||
su.nick_name AS nickName,
|
||||
bfi.url AS url
|
||||
FROM
|
||||
ma_dev_rm mdq
|
||||
LEFT JOIN bm_file_info bfi ON bfi.model_id = mdq.ma_id
|
||||
|
|
|
|||
|
|
@ -422,16 +422,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
DATE_FORMAT( order_time, '%Y-%m-%d' ) = DATE_FORMAT(NOW(),'%Y-%m-%d')
|
||||
and lease_status in (1,3)
|
||||
</select>
|
||||
<select id="getDevInfoById" resultType="com.bonus.material.lease.domain.MaLeaseInfo">
|
||||
SELECT
|
||||
mli.*,
|
||||
sd.dept_name as publishCompanyName,
|
||||
sd2.dept_name as orderCompanyName
|
||||
FROM
|
||||
ma_lease_info mli
|
||||
LEFT JOIN sys_dept sd ON mli.publish_company = sd.dept_id
|
||||
LEFT JOIN sys_dept sd2 ON mli.order_company = sd2.dept_id
|
||||
WHERE
|
||||
mli.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue