This commit is contained in:
parent
25d102c90a
commit
50108d818a
|
|
@ -44,11 +44,14 @@ public class TreeSelect implements Serializable {
|
|||
@ApiModelProperty(value = "是否录入编码(0:否,1:是)")
|
||||
private String isEnter;
|
||||
|
||||
@ApiModelProperty(value = "库管员id")
|
||||
private Long keeperUserId;
|
||||
|
||||
public TreeSelect() {
|
||||
|
||||
}
|
||||
|
||||
public TreeSelect(Long id, String label, Long houseId, Integer level, Long parentId, List<TreeSelect> children, Integer number, String isEnter) {
|
||||
public TreeSelect(Long id, String label, Long houseId, Integer level, Long parentId, List<TreeSelect> children, Integer number, String isEnter, Long keeperUserId) {
|
||||
this.id = id;
|
||||
this.label = label;
|
||||
this.houseId = houseId;
|
||||
|
|
@ -57,6 +60,7 @@ public class TreeSelect implements Serializable {
|
|||
this.children = children;
|
||||
this.number = number;
|
||||
this.isEnter = isEnter;
|
||||
this.keeperUserId = keeperUserId;
|
||||
}
|
||||
|
||||
public TreeSelect(Long id, String label, Integer level, Long parentId) {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class LeaseApplyInfo extends BaseEntity{
|
|||
private String leaseSignUrl;
|
||||
|
||||
@ApiModelProperty(value = "领料人签名类型")
|
||||
private Byte leaseSignType;
|
||||
private int leaseSignType;
|
||||
|
||||
/**
|
||||
* 领料物资名称汇总
|
||||
|
|
@ -88,6 +88,11 @@ public class LeaseApplyInfo extends BaseEntity{
|
|||
@Excel(name = "租赁申请单号")
|
||||
private String code;
|
||||
|
||||
/** 任务编号: 业务联系单号 */
|
||||
@ApiModelProperty(value = "业务联系单号")
|
||||
@Excel(name = "业务联系单号")
|
||||
private String businessCode;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Long taskId;
|
||||
|
|
@ -148,9 +153,7 @@ public class LeaseApplyInfo extends BaseEntity{
|
|||
private Long companyId;
|
||||
|
||||
/** 1机具分公司审核通过,2调试分公司审核通过3机具分公司审核驳回4调试分公司审核驳回5出库进行中5出库完成 */
|
||||
// @Excel(name = "1机具分公司审核通过,2调试分公司审核通过3机具分公司审核驳回4调试分公司审核驳回5出库进行中5出库完成")
|
||||
// @ApiModelProperty(value = "1机具分公司审核通过,2调试分公司审核通过3机具分公司审核驳回4调试分公司审核驳回5出库进行中5出库完成")
|
||||
// private String status;
|
||||
private String status;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long directId;
|
||||
|
|
|
|||
|
|
@ -19,4 +19,9 @@ public class LeaseOutSign {
|
|||
|
||||
@ApiModelProperty(value = "出库人签名类型")
|
||||
private int outSignType;
|
||||
|
||||
public LeaseOutSign(int outSignType, String outSignUrl) {
|
||||
this.outSignType = outSignType;
|
||||
this.outSignUrl = outSignUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,6 +184,15 @@ public class LeaseApplyDetails extends BaseEntity {
|
|||
|
||||
private List<Long> typeIdList;
|
||||
|
||||
@ApiModelProperty(value = "签名URL")
|
||||
private String signUrl;
|
||||
|
||||
@ApiModelProperty(value = "签名类型")
|
||||
private int signType;
|
||||
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "领料物资名称汇总")
|
||||
private String maTypeNames;
|
||||
public LeaseApplyDetails(Long id, Long parentId, Long typeId, BigDecimal preNum, BigDecimal auditNum, BigDecimal alNum, String status, Long companyId) {
|
||||
|
|
|
|||
|
|
@ -142,4 +142,7 @@ public class LeasePublishDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "发布批次")
|
||||
private String publishTask;
|
||||
|
||||
@ApiModelProperty(value = "单号")
|
||||
private String code;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,11 @@ public class LeaseApplyRequestVo extends BaseEntity {
|
|||
*/
|
||||
private List<LeaseOutSign> outSignList;
|
||||
|
||||
/**
|
||||
* 审核签名集合
|
||||
*/
|
||||
private List<LeaseOutSign> approveSignList;
|
||||
|
||||
private int statusFlag;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import com.bonus.common.biz.domain.lease.LeasePublishInfo;
|
|||
import com.bonus.common.biz.domain.lease.WorkApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.WorkPeopleInfo;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.domain.LeasePublishDetails;
|
||||
import com.bonus.material.lease.domain.vo.LeaseDeptInfo;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -188,4 +188,10 @@ public interface LeaseTaskMapper {
|
|||
void updateWorkPeopleInfo(WorkPeopleInfo peopleInfo);
|
||||
|
||||
WorkPeopleInfo getWorkPeopleInfo(WorkPeopleInfo peopleInfo);
|
||||
|
||||
/**
|
||||
* 根据code查询领用申请详情
|
||||
* @return
|
||||
*/
|
||||
LeasePublishDetails selectPublishDetailsByCode();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,12 +23,13 @@ import com.bonus.common.security.utils.SecurityUtils;
|
|||
import com.bonus.material.back.domain.vo.MaCodeVo;
|
||||
import com.bonus.material.basic.domain.BmQrcodeInfo;
|
||||
import com.bonus.material.basic.mapper.BmFileInfoMapper;
|
||||
import com.bonus.material.clz.domain.lease.MaterialLeaseApplyInfo;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.domain.LeasePublishDetails;
|
||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||
import com.bonus.material.lease.domain.vo.LeaseOutVo;
|
||||
import com.bonus.material.lease.mapper.LeaseApplyDetailsMapper;
|
||||
import com.bonus.material.lease.mapper.LeaseOutDetailsMapper;
|
||||
import com.bonus.material.lease.mapper.LeaseTaskMapper;
|
||||
import com.bonus.material.lease.service.ILeaseOutDetailsService;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
import com.bonus.material.task.domain.TmTaskAgreement;
|
||||
|
|
@ -76,6 +77,9 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
@Resource
|
||||
private LeaseOutDetailsMapper leaseOutDetailsMapper;
|
||||
|
||||
@Resource
|
||||
private LeaseTaskMapper mapper;
|
||||
|
||||
/**
|
||||
* 查询领料任务
|
||||
*
|
||||
|
|
@ -175,8 +179,22 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
detail.setMaCodeVoList(maCodeVoList);
|
||||
}
|
||||
}
|
||||
// 提取details中的signType和signUrl,单独作为一个集合,并去重
|
||||
List<LeaseOutSign> approveSignList = details.stream()
|
||||
.map(detail -> new LeaseOutSign(detail.getSignType(), detail.getSignUrl()))
|
||||
.distinct() // 去重操作
|
||||
.collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(approveSignList)) {
|
||||
for (LeaseOutSign leaseOutSign : approveSignList) {
|
||||
if (StringUtils.isNotBlank(leaseOutSign.getOutSignUrl())) {
|
||||
leaseOutSign.setOutSignUrl("data:image/png;base64," + leaseOutSign.getOutSignUrl());
|
||||
}
|
||||
// 根据id查询领料出库情况,查询出库人电子签名详情
|
||||
}
|
||||
leaseApplyRequestVo.setApproveSignList(approveSignList);
|
||||
}
|
||||
|
||||
}
|
||||
// 根据id查询领料出库情况,查询出库库管员电子签名详情
|
||||
List<LeaseOutSign> outSignList = leaseApplyInfoMapper.selectLeaseApplyOutList(id);
|
||||
if (!CollectionUtils.isEmpty(outSignList)) {
|
||||
for (LeaseOutSign applyInfo : outSignList) {
|
||||
|
|
@ -187,7 +205,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
leaseApplyRequestVo.setKgSignList(outSignList);
|
||||
}
|
||||
|
||||
// 根据id查询领料出库情况,查询出库人电子签名详情
|
||||
// 根据id查询领料出库情况,查询领料人电子签名详情
|
||||
List<LeaseOutSign> signList = leaseApplyInfoMapper.selectOutList(id, null);
|
||||
if (!CollectionUtils.isEmpty(signList)) {
|
||||
for (LeaseOutSign applyInfo : signList) {
|
||||
|
|
@ -255,6 +273,19 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
detail.setMaCodeVoList(maCodeVoList);
|
||||
}
|
||||
}
|
||||
// 提取details中的signType和signUrl,单独作为一个集合,并去重
|
||||
List<LeaseOutSign> approveSignList = details.stream()
|
||||
.map(detail -> new LeaseOutSign(detail.getSignType(), detail.getSignUrl()))
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(approveSignList)) {
|
||||
for (LeaseOutSign leaseOutSign : approveSignList) {
|
||||
if (StringUtils.isNotBlank(leaseOutSign.getOutSignUrl())) {
|
||||
leaseOutSign.setOutSignUrl("data:image/png;base64," + leaseOutSign.getOutSignUrl());
|
||||
}
|
||||
}
|
||||
leaseApplyRequestVo.setApproveSignList(approveSignList);
|
||||
}
|
||||
}
|
||||
|
||||
// 根据id查询领料出库情况,查询出库人电子签名详情
|
||||
|
|
@ -311,46 +342,25 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
if (CollectionUtils.isEmpty(typeIdList)) {
|
||||
leaseApplyInfo.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||
}
|
||||
leaseApplyInfo.setTaskType(2);
|
||||
//用leaseApplyInfo.getQueryType的值来区分是否是领用出库查询,如果是,时间筛选为发布时间
|
||||
List<LeaseApplyInfo> list = leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
||||
// 如果statusList包含3、4、5,则为领料出库查询
|
||||
if (!CollectionUtils.isEmpty(leaseApplyInfo.getStatusList())) {
|
||||
if (((leaseApplyInfo.getStatusList().contains(3) || leaseApplyInfo.getStatusList().contains(4)) && !leaseApplyInfo.getStatusList().contains(1))
|
||||
|| leaseApplyInfo.getStatusList().containsAll(Arrays.asList(3, 4, 5))) {
|
||||
leaseApplyInfo.setTaskType(1);
|
||||
}
|
||||
}
|
||||
//用leaseApplyInfo.getQueryType的值来区分是否是领用出库查询,如果是,时间筛选为发布时间
|
||||
List<LeaseApplyInfo> list = leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
||||
|
||||
// 如果leaseApplyInfo.getQueryType的值为1,则为领料出库查询,需查询领用出库数据,进行拼接
|
||||
if (leaseApplyInfo.getTaskType()==1){
|
||||
// 查询领用出库数据
|
||||
extracted(leaseApplyInfo, list);
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
if (leaseApplyInfo.getHasSign() != null && leaseApplyInfo.getHasSign() == 0) {
|
||||
list = leaseApplyInfoMapper.selectNoSignList(leaseApplyInfo);
|
||||
}
|
||||
}
|
||||
// 使用 Stream API 进行降序排序
|
||||
List<LeaseApplyInfo> sortedList =new ArrayList<>();
|
||||
if (leaseApplyInfo.getTaskType()==1){
|
||||
sortedList = list.stream()
|
||||
List<LeaseApplyInfo> sortedList = list.stream()
|
||||
.sorted(Comparator.comparing(LeaseApplyInfo::getReleaseTime,
|
||||
Comparator.nullsFirst(Comparator.naturalOrder())).reversed())
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
sortedList = list.stream()
|
||||
.sorted(Comparator.comparing(LeaseApplyInfo::getCreateTime,
|
||||
Comparator.nullsFirst(Comparator.naturalOrder())).reversed())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
// List<LeaseApplyInfo> sortedList = list.stream()
|
||||
// .sorted(Comparator.comparing(LeaseApplyInfo::getCreateTime,
|
||||
// Comparator.nullsFirst(Comparator.naturalOrder())).reversed())
|
||||
// .collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(sortedList)) {
|
||||
if (!CollectionUtils.isEmpty(typeIdList)) {
|
||||
// 使用流过滤符合条件的元素
|
||||
|
|
@ -629,6 +639,24 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
try {
|
||||
int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId());
|
||||
LeasePublishDetails publishDetails = mapper.selectPublishDetailsByCode();
|
||||
if (publishDetails != null && StringUtils.isNotBlank(publishDetails.getCode())) {
|
||||
String code = publishDetails.getCode();
|
||||
if (code.contains("-")) {
|
||||
// 分割字符串,获取"-"后面的部分
|
||||
String suffix = code.split("-")[1];
|
||||
try {
|
||||
// 转换为整数
|
||||
int value = Integer.parseInt(suffix);
|
||||
// 比较并更新最大值
|
||||
if (value > thisMonthMaxOrder) {
|
||||
thisMonthMaxOrder = value;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
throw new ServiceException("保存失败,请联系管理员");
|
||||
}
|
||||
}
|
||||
}
|
||||
String taskCode = genderTaskCode(thisMonthMaxOrder);
|
||||
TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId(),
|
||||
LeaseTaskStatusEnum.LEASE_TASK_TO_PUBLISHED.getStatus(),
|
||||
|
|
@ -736,6 +764,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
}
|
||||
try {
|
||||
leaseApplyInfo.setReleaseTime(DateUtils.getTime());
|
||||
leaseApplyInfo.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
int result = leaseApplyInfoMapper.updateLeaseApplyInfo(leaseApplyInfo);
|
||||
if (result > 0) {
|
||||
// 同步修改tm_task任务状态, 如果不需要审核,改成 LEASE_TASK_IN_PROGRESS, 如果需要审核,改成 LEASE_TASK_TO_AUDIT
|
||||
|
|
|
|||
|
|
@ -757,6 +757,13 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
if (CollectionUtils.isEmpty(typeIdList)) {
|
||||
leaseApplyInfo.setUserId(userId == 0 ? null : userId);
|
||||
}
|
||||
if (StringUtils.isNotBlank(leaseApplyInfo.getStatus())) {
|
||||
List<String> stringList = Arrays.asList(leaseApplyInfo.getStatus().split(","));
|
||||
List<Integer> integerList = stringList.stream()
|
||||
.map(Integer::parseInt)
|
||||
.collect(Collectors.toList());
|
||||
leaseApplyInfo.setStatusList(integerList);
|
||||
}
|
||||
List<LeasePublishInfo> list = mapper.getPublishList(leaseApplyInfo);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
if (!CollectionUtils.isEmpty(typeIdList)) {
|
||||
|
|
@ -877,6 +884,26 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
List<LeaseApplyDetails> leaseApplyDetailsList = leaseApplyRequestVo.getLeaseApplyDetailsList();
|
||||
Long parentId = leaseApplyDetailsList.get(0).getParentId();
|
||||
int thisMonthMaxOrder = mapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth());
|
||||
int monthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId());
|
||||
LeasePublishDetails publishDetails = mapper.selectPublishDetailsByCode();
|
||||
if (publishDetails != null && StringUtils.isNotBlank(publishDetails.getCode())) {
|
||||
String code = publishDetails.getCode();
|
||||
if (code.contains("-")) {
|
||||
// 分割字符串,获取"-"后面的部分
|
||||
String suffix = code.split("-")[1];
|
||||
try {
|
||||
// 转换为整数
|
||||
int value = Integer.parseInt(suffix);
|
||||
// 比较并更新最大值
|
||||
if (value > monthMaxOrder) {
|
||||
monthMaxOrder = value;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
throw new ServiceException("保存失败,请联系管理员");
|
||||
}
|
||||
}
|
||||
}
|
||||
String code = genderTaskCode(monthMaxOrder);
|
||||
for (LeaseApplyDetails applyDetails : leaseApplyDetailsList) {
|
||||
// 根据parentId及typeId更新lease_apply_details表的发布数量
|
||||
result = mapper.updatePublish(applyDetails);
|
||||
|
|
@ -892,6 +919,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
applyDetails.setMonthOrder(thisMonthMaxOrder + 1);
|
||||
String publishTask = genderPublishTask(thisMonthMaxOrder);
|
||||
applyDetails.setPublishTask(publishTask);
|
||||
applyDetails.setCode(code);
|
||||
result = mapper.addPublish(applyDetails);
|
||||
if (result == 0) {
|
||||
return AjaxResult.error("发布失败,请联系管理员");
|
||||
|
|
@ -936,7 +964,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
return AjaxResult.error("参数不能为空");
|
||||
}
|
||||
// 根据taskId修改任务状态为终结
|
||||
int result = tmTaskMapper.updateTaskStatus(String.valueOf(leaseApplyInfo.getTaskId()), 4);
|
||||
int result = tmTaskMapper.updateTaskStatus(String.valueOf(leaseApplyInfo.getTaskId()), 5);
|
||||
if (result == 0) {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -290,30 +290,14 @@ public class TypeController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询物资类型配置右侧列表
|
||||
* 查询物资类型管理绑定的库管班长用户列表
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
// @ApiOperation(value = "查询物资类型配置右侧列表")
|
||||
// @RequiresPermissions("ma:typeConfig:list")
|
||||
// @GetMapping("/getMaTypeConfigList")
|
||||
// public AjaxResult getMaTypeConfigList(MaTypeConfigDto maTypeConfigDto) {
|
||||
// // 调用service处理业务逻辑
|
||||
// return typeService.getMaTypeConfigList(maTypeConfigDto);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 根据左列表类型id查询右表格 --- 暂未启用,代码有问题!!
|
||||
* TODO: 待完善
|
||||
* @param typeId 左列表类型id
|
||||
|
||||
@ApiOperation(value = "根据左列表类型id查询右表格")
|
||||
@GetMapping("/getListByMaType")
|
||||
public AjaxResult getListByMaType(Long typeId, @RequestParam(required = false) String typeName, Integer level) {
|
||||
List<Integer> parentIds = typeService.selectParentId(typeId, level);
|
||||
List<Type> listByMaType = new ArrayList<>();
|
||||
for (Integer parentId : parentIds) {
|
||||
listByMaType.addAll(typeService.getListByParentId(parentId.longValue(), typeName));
|
||||
@ApiOperation(value = "查询物资类型管理绑定的库管班长用户列表")
|
||||
@GetMapping("/getUserList")
|
||||
public AjaxResult getUserList(MaTypeVo type) {
|
||||
List<MaTypeVo> list = typeService.getUserList(type);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
return null;
|
||||
}*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,4 +237,7 @@ public class Type extends BaseEntity {
|
|||
@ApiModelProperty(value = "是否录入编码(0:否,1:是)")
|
||||
private String isEnter;
|
||||
|
||||
@ApiModelProperty(value = "库管员id")
|
||||
private Long keeperUserId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,4 +210,11 @@ public interface TypeMapper {
|
|||
* @return
|
||||
*/
|
||||
Type getNumList(Type type);
|
||||
|
||||
/**
|
||||
* 查询物资类型管理绑定的用户列表
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
List<MaTypeVo> getUserList(MaTypeVo type);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,4 +137,11 @@ public interface ITypeService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult getListLevel(MaTypeVo maTypeVo);
|
||||
|
||||
/**
|
||||
* 查询物资类型管理绑定的库管班长用户列表
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
List<MaTypeVo> getUserList(MaTypeVo type);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -303,6 +303,6 @@ public class StandardConfigManageServiceImpl implements StandardConfigManageServ
|
|||
.filter(Objects::nonNull)
|
||||
.map(this::convertToTreeSelect)
|
||||
.collect(Collectors.toList());
|
||||
return new TreeSelect(type.getId(), type.getConfigName(), null, Integer.valueOf(type.getLevel()), type.getParentId(), children, null, null);
|
||||
return new TreeSelect(type.getId(), type.getConfigName(), null, Integer.valueOf(type.getLevel()), type.getParentId(), children, null, null, null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,6 +193,16 @@ public class TypeServiceImpl implements ITypeService {
|
|||
return AjaxResult.success(maTypeVos);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物资类型管理绑定的库管班长用户列表
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MaTypeVo> getUserList(MaTypeVo type) {
|
||||
return typeMapper.getUserList(type);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<MaTypeSelectVo> selectMaTypeListByHouseId(Long houseId) {
|
||||
|
|
@ -646,7 +656,7 @@ public class TypeServiceImpl implements ITypeService {
|
|||
.filter(Objects::nonNull)
|
||||
.map(this::convertToTreeSelect)
|
||||
.collect(Collectors.toList());
|
||||
return new TreeSelect(type.getTypeId(), type.getTypeName(), type.getHouseId(), Integer.valueOf(type.getLevel()),type.getParentId(), children, type.getNumber(), type.getIsEnter());
|
||||
return new TreeSelect(type.getTypeId(), type.getTypeName(), type.getHouseId(), Integer.valueOf(type.getLevel()),type.getParentId(), children, type.getNumber(), type.getIsEnter(), type.getKeeperUserId());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
IFNULL(lad.al_num,0) as al_num,
|
||||
IFNULL(lad.status,0) as status, mt.unit_name,mt.unit_value,
|
||||
lad.create_by, lad.create_time, lad.update_by, lad.update_time, lad.remark, lad.company_id,
|
||||
mt4.type_id as firstId
|
||||
mt4.type_id as firstId,
|
||||
su.sign_url as signUrl,
|
||||
su.sign_type as signType
|
||||
from
|
||||
lease_apply_details lad
|
||||
left join
|
||||
|
|
@ -54,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ma_type mt2 on mt2.type_id = mt.parent_id and mt2.`level` = '3' and mt2.del_flag = '0'
|
||||
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 sys_user su on su.user_id = mt3.keep_user_id
|
||||
left join (SELECT mt.type_id,
|
||||
mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
|
|
@ -470,7 +473,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ELSE
|
||||
IFNULL(mt.storage_num, 0)
|
||||
END as storageNum,
|
||||
mt4.type_id as firstId
|
||||
mt4.type_id as firstId,
|
||||
su.sign_url as signUrl,
|
||||
su.sign_type as signType
|
||||
FROM
|
||||
lease_publish_details lpd
|
||||
LEFT JOIN ma_type mt ON lpd.new_type = mt.type_id
|
||||
|
|
@ -479,6 +484,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND mt1.del_flag = '0'
|
||||
left join ma_type mt3 ON mt1.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 sys_user su on su.user_id = mt3.keep_user_id
|
||||
left join (SELECT mt.type_id,
|
||||
mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
|
|
|
|||
|
|
@ -59,7 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sd.dept_name as impUnitName,
|
||||
tt.task_type as taskType,
|
||||
lai.release_time as releaseTime,
|
||||
GROUP_CONCAT(DISTINCT mt3.type_id) as firstId
|
||||
GROUP_CONCAT(DISTINCT mt3.type_id) as firstId,
|
||||
su.sign_type as lease_sign_type,
|
||||
su.sign_url as lease_sign_url
|
||||
from
|
||||
lease_apply_info lai
|
||||
left join tm_task tt on lai.task_id = tt.task_id
|
||||
|
|
@ -71,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_dept sd on sd.dept_id = bp.imp_unit
|
||||
left join sys_dict_data sda on tt.task_status = sda.dict_value
|
||||
and sda.dict_type = 'lease_task_status'
|
||||
left join sys_user su on lai.publisher = su.user_id
|
||||
left join ma_type mt on lad.type_id = mt.type_id and mt.del_flag = '0'
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id and mt1.del_flag = '0'
|
||||
left join ma_type mt2 ON mt1.parent_id = mt2.type_id and mt2.del_flag = '0'
|
||||
|
|
@ -141,14 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<choose>
|
||||
<when test="taskType == 1">
|
||||
and lai.release_time BETWEEN CONCAT(#{startTime},' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</when>
|
||||
<when test="taskType == 2">
|
||||
and lai.create_time BETWEEN CONCAT(#{startTime},' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="directId != null "> and lai.direct_id = #{directId}</if>
|
||||
<if test="leaseType != null and leaseType != ''"> and lai.lease_type = #{leaseType}</if>
|
||||
|
|
@ -265,6 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="estimateLeaseTime != null">estimate_lease_time = #{estimateLeaseTime},</if>
|
||||
<if test="releaseTime != null">release_time = #{releaseTime},</if>
|
||||
<if test="costBearingParty != null">cost_bearing_party = #{costBearingParty},</if>
|
||||
<if test="updateBy != null and updateBy != ''">publisher = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
@ -323,7 +320,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectPublishList" resultType="com.bonus.common.biz.domain.lease.LeaseApplyInfo">
|
||||
SELECT
|
||||
lai.id AS id,
|
||||
lai.code AS code,
|
||||
lpd.code AS code,
|
||||
lai.code AS businessCode,
|
||||
lai.create_by AS createBy,
|
||||
lai.create_time AS createTime,
|
||||
sd.dept_name AS impUnitName,
|
||||
|
|
@ -340,14 +338,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
GROUP_CONCAT( DISTINCT mt1.type_name ) AS maTypeNames,
|
||||
lpd.publish_task AS publishTask,
|
||||
lai.task_id AS taskId,
|
||||
lpd.lease_sign_url AS leaseSignUrl,
|
||||
lpd.lease_sign_type AS leaseSignType,
|
||||
su.sign_url AS leaseSignUrl,
|
||||
su.sign_type AS leaseSignType,
|
||||
tt.task_type AS taskType,
|
||||
lai.material_man AS materialMan,
|
||||
lai.confirm_time AS confirmTime,
|
||||
lai.is_confirm AS isConfirm,
|
||||
lai.confirm_remark AS confirmRemark,
|
||||
mt3.type_id AS firstId
|
||||
mt3.type_id AS firstId,
|
||||
lpd.create_time AS releaseTime
|
||||
FROM
|
||||
lease_publish_details lpd
|
||||
LEFT JOIN lease_apply_info lai ON lai.id = lpd.parent_id
|
||||
|
|
@ -366,12 +365,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = '0'
|
||||
LEFT JOIN bm_agreement_info bai ON lpd.unit_id = bai.unit_id
|
||||
AND lpd.project_id = bai.project_id
|
||||
left join sys_user su on lpd.create_by = su.user_id
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_keeper mtk ON mtk.type_id = lpd.type_id AND mtk.user_id = #{userId}
|
||||
</if>
|
||||
where 1 = 1
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[ AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
<![CDATA[ AND DATE_FORMAT( lpd.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
</if>
|
||||
<if test="id != null ">
|
||||
AND lai.id = #{id}
|
||||
|
|
@ -483,7 +483,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
GROUP_CONCAT(DISTINCT mt1.type_name) as maTypeNames,
|
||||
bp.contract_part as contractPart,
|
||||
sd.dept_name as impUnitName,
|
||||
tt.task_type as taskType
|
||||
tt.task_type as taskType,
|
||||
su.sign_type as lease_sign_type,
|
||||
su.sign_url as lease_sign_url
|
||||
from
|
||||
lease_apply_info lai
|
||||
left join tm_task tt on lai.task_id = tt.task_id
|
||||
|
|
@ -498,6 +500,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and sda.dict_type = 'lease_task_status'
|
||||
left join ma_type mt on lad.type_id = mt.type_id and mt.del_flag = '0'
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id and mt1.del_flag = '0'
|
||||
left join sys_user su on lai.publisher = su.user_id
|
||||
where lai.id = #{id}
|
||||
</select>
|
||||
<select id="getDetailsLeaseList" resultType="com.bonus.material.lease.domain.LeaseApplyDetails">
|
||||
|
|
@ -512,10 +515,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
lod.remark as remark,
|
||||
mt1.manage_type as manageType,
|
||||
lod.confirm_person as confirmPerson,
|
||||
mt1.unit_name as unitName
|
||||
mt1.unit_name as unitName,
|
||||
su.sign_url as signUrl,
|
||||
su.sign_type as signType
|
||||
from lease_out_details lod
|
||||
left join ma_type mt1 on lod.type_id = mt1.type_id
|
||||
left join ma_type mt2 on mt1.parent_id = mt2.type_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 sys_user su on su.user_id = mt3.keep_user_id
|
||||
where lod.parent_id = #{id}
|
||||
and lod.out_num > 0
|
||||
and lod.lease_sign_id = #{leaseSignId}
|
||||
|
|
@ -595,7 +603,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
lsi.lease_sign_url IS NOT NULL
|
||||
and lod.parent_id = #{id}
|
||||
<if test="leaseSignId != null">
|
||||
and lsi.id = #{leaseSignId}
|
||||
</if>
|
||||
GROUP BY
|
||||
lod.lease_sign_id
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -324,6 +324,7 @@
|
|||
<if test="projectId != null">project_id,</if>
|
||||
<if test="monthOrder != null">month_order,</if>
|
||||
<if test="publishTask != null and publishTask != ''">publish_task,</if>
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
|
|
@ -341,6 +342,7 @@
|
|||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="monthOrder != null">#{monthOrder},</if>
|
||||
<if test="publishTask != null and publishTask != ''">#{publishTask},</if>
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -802,8 +804,9 @@
|
|||
|
||||
case tt.task_status
|
||||
when 1 then '未完成'
|
||||
when 4 then '已终止'
|
||||
when 4 then '已完成'
|
||||
when 3 then '已完成'
|
||||
when 5 then '已终止'
|
||||
end as taskStatusName,
|
||||
IFNULL(sum(lad.pre_num),0) as preCountNum,
|
||||
IFNULL(sum(lad.al_num),0) as alNum,
|
||||
|
|
@ -843,8 +846,8 @@
|
|||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
<if test="isApp != null and taskStatus==1">and (tt.task_status = 0 or tt.task_status = 1 or tt.task_status = 2) </if>
|
||||
<if test="isApp != null and taskStatus==3">and (tt.task_status = 3 or tt.task_status = 4)</if>
|
||||
<if test="isApp != null and taskStatus==1">and (tt.task_status = 0 or tt.task_status = 1) </if>
|
||||
<if test="isApp != null and taskStatus==3">and (tt.task_status = 3 or tt.task_status = 4 or tt.task_status = 5)</if>
|
||||
GROUP BY lai.id
|
||||
ORDER BY tt.create_time desc
|
||||
</select>
|
||||
|
|
@ -1021,6 +1024,15 @@
|
|||
limit 1
|
||||
|
||||
</select>
|
||||
<select id="selectPublishDetailsByCode" resultType="com.bonus.material.lease.domain.LeasePublishDetails">
|
||||
SELECT id as id,
|
||||
parent_id as parentId,
|
||||
type_id as typeId,
|
||||
code as code
|
||||
FROM lease_publish_details
|
||||
order by create_time desc
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<delete id="deletePublishDetails">
|
||||
DELETE
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="companyId" column="company_id" />
|
||||
<result property="samplingRatio" column="sampling_ratio" />
|
||||
<result property="isEnter" column="is_enter" />
|
||||
<result property="keeperUserId" column="keep_user_id" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.bonus.material.ma.domain.vo.MaTypeVo" id="MaTypeVoResult">
|
||||
|
|
@ -330,6 +331,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="samplingRatio != null">sampling_ratio = #{samplingRatio},</if>
|
||||
<if test="notTaxPrice != null">notax_price = #{notTaxPrice},</if>
|
||||
<if test="isEnter != null">is_enter = #{isEnter},</if>
|
||||
<if test="keeperUserId != null">keep_user_id = #{keeperUserId},</if>
|
||||
</trim>
|
||||
where type_id = #{typeId}
|
||||
</update>
|
||||
|
|
@ -352,7 +354,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectMaTypeTree" resultMap="TypeResult">
|
||||
select
|
||||
mt3.type_id, mt3.type_name, mt3.parent_id, mt3.storage_num, mt3.type_code, mt3.model_code, mt3.unit_id,
|
||||
mt3.unit_name, mt3.level, whs.house_id, mt3.is_enter
|
||||
mt3.unit_name, mt3.level, whs.house_id, mt3.is_enter, mt3.keep_user_id
|
||||
from ma_type mt3
|
||||
left join ma_type mt2 on mt2.type_id=mt3.parent_id
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
|
|
@ -363,7 +365,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
select
|
||||
mt2.type_id, mt2.type_name, mt2.parent_id, mt2.storage_num, mt2.type_code, mt2.model_code, mt2.unit_id,
|
||||
mt2.unit_name, mt2.level, whs.house_id, mt2.is_enter
|
||||
mt2.unit_name, mt2.level, whs.house_id, mt2.is_enter, mt2.keep_user_id
|
||||
from ma_type mt2
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
|
|
@ -373,7 +375,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
select
|
||||
mt1.type_id, mt1.type_name, mt1.parent_id, mt1.storage_num, mt1.type_code, mt1.model_code, mt1.unit_id,
|
||||
mt1.unit_name, mt1.level, whs.house_id, mt1.is_enter
|
||||
mt1.unit_name, mt1.level, whs.house_id, mt1.is_enter, mt1.keep_user_id
|
||||
from ma_type mt1
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
where mt1.del_flag = 0 and mt1.level = 1
|
||||
|
|
@ -979,4 +981,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
GROUP BY
|
||||
mt.type_id
|
||||
</select>
|
||||
|
||||
<select id="getUserList" resultType="com.bonus.material.ma.domain.vo.MaTypeVo">
|
||||
SELECT DISTINCT
|
||||
su.user_id as keeperUserId,
|
||||
su.nick_name as keeperUserName
|
||||
FROM
|
||||
sys_user su
|
||||
LEFT JOIN sys_user_role sur ON su.user_id = sur.user_id
|
||||
WHERE
|
||||
sur.role_id = 73 OR sur.role_id = 70
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue