This commit is contained in:
parent
783274697f
commit
85d9e0bacd
|
|
@ -1,14 +1,11 @@
|
|||
package com.bonus.material.part.domain;
|
||||
|
||||
import com.bonus.material.part.domain.PartTypeCheckDetails;
|
||||
import com.bonus.material.part.domain.PartTypeCheckInfo;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckInfo;
|
||||
import com.bonus.material.purchase.domain.PurchaseSignRecord;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
|
@ -28,4 +25,16 @@ public class PartTypeCheckDto {
|
|||
@ApiModelProperty(value = "采购验收任务详情集合")
|
||||
private List<PartTypeCheckDetails> partTypeCheckDetailsList;
|
||||
|
||||
@ApiModelProperty(value = "签名地址")
|
||||
private String signUrl;
|
||||
|
||||
@ApiModelProperty(value = "签名类型 手写0 和 图片上传1")
|
||||
private String signType;
|
||||
|
||||
private List<PurchaseSignRecord> gySignUrl = new ArrayList<>();
|
||||
|
||||
private List<PurchaseSignRecord> scSignUrl = new ArrayList<>();
|
||||
|
||||
private List<PurchaseSignRecord> kgSignUrl = new ArrayList<>();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@ public class PartTypeQueryDto {
|
|||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date startTime;
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date endTime;
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "外层任务状态")
|
||||
private Integer taskStatus;
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ import com.bonus.common.core.web.domain.AjaxResult;
|
|||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.common.biz.domain.BmFileInfo;
|
||||
import com.bonus.material.basic.mapper.BmFileInfoMapper;
|
||||
import com.bonus.material.countersign.mapper.SignProcessMapper;
|
||||
import com.bonus.material.part.domain.*;
|
||||
import com.bonus.material.part.mapper.PartArrivedMapper;
|
||||
import com.bonus.material.part.service.IPartArrivedService;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckInfo;
|
||||
import com.bonus.material.purchase.domain.PurchaseSignRecord;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -45,6 +45,9 @@ public class PartArrivedServiceImpl implements IPartArrivedService
|
|||
@Resource
|
||||
BmFileInfoMapper bmFileInfoMapper;
|
||||
|
||||
@Resource
|
||||
private SignProcessMapper signProcessMapper;
|
||||
|
||||
// 引入新购任务阶段常量
|
||||
private static final int PURCHASE_TASK_STAGE_MANAGE = 1;
|
||||
private static final int PURCHASE_TASK_STAGE_CHECK = 2;
|
||||
|
|
@ -244,7 +247,12 @@ public class PartArrivedServiceImpl implements IPartArrivedService
|
|||
.filter(item -> containsKeyword(item, keyWord))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if (StringUtils.isNotBlank(partTypeQueryDto.getTaskStatusName())) {
|
||||
if (partTypeQueryDto.getTaskStatus() != null) {
|
||||
if (partTypeQueryDto.getTaskStatus() == 0) {
|
||||
partTypeQueryDto.setTaskStatusName("未完成");
|
||||
} else if (partTypeQueryDto.getTaskStatus() == 1) {
|
||||
partTypeQueryDto.setTaskStatusName("已完成");
|
||||
}
|
||||
purchaseCheckInfoResult = purchaseCheckInfoResult.stream()
|
||||
.filter(item -> item.getTaskStatusName().equals(partTypeQueryDto.getTaskStatusName()))
|
||||
.collect(Collectors.toList());
|
||||
|
|
@ -275,15 +283,15 @@ public class PartArrivedServiceImpl implements IPartArrivedService
|
|||
@Override
|
||||
public PartTypeCheckDto selectPartTypeCheckInfoById(PartTypeQueryDto partTypeQueryDto) {
|
||||
PartTypeCheckInfo partTypeCheckInfo = partArrivedMapper.selectPartTypeCheckInfoById(partTypeQueryDto.getId());
|
||||
PartTypeCheckDto PartTypeCheckDto = new PartTypeCheckDto();
|
||||
PartTypeCheckDto.setPartTypeCheckInfo(partTypeCheckInfo);
|
||||
PartTypeCheckDto partTypeCheckDto = new PartTypeCheckDto();
|
||||
partTypeCheckDto.setPartTypeCheckInfo(partTypeCheckInfo);
|
||||
if(null != partTypeCheckInfo){
|
||||
List<PartTypeCheckDetails> partTypeCheckDetailsList = partArrivedMapper.selectPartTypeCheckDetailsListByQueryDto(partTypeQueryDto);
|
||||
PartTypeCheckDto.setPartTypeCheckDetailsList(partTypeCheckDetailsList);
|
||||
partTypeCheckDto.setPartTypeCheckDetailsList(partTypeCheckDetailsList);
|
||||
//查询是否存在附件,给前端用于文件颜色判断
|
||||
extractedExitFile(partTypeCheckDetailsList);
|
||||
}
|
||||
return PartTypeCheckDto;
|
||||
return partTypeCheckDto;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -385,12 +393,39 @@ public class PartArrivedServiceImpl implements IPartArrivedService
|
|||
@Override
|
||||
public PartTypeCheckDto getInBoundForm(PartTypeQueryDto partTypeQueryDto) {
|
||||
PartTypeCheckInfo partTypeCheckInfo = partArrivedMapper.getCheckInfoForm(partTypeQueryDto);
|
||||
PartTypeCheckDto PartTypeCheckDto = new PartTypeCheckDto();
|
||||
PartTypeCheckDto.setPartTypeCheckInfo(partTypeCheckInfo);
|
||||
PartTypeCheckDto partTypeCheckDto = new PartTypeCheckDto();
|
||||
partTypeCheckDto.setPartTypeCheckInfo(partTypeCheckInfo);
|
||||
if(null != partTypeCheckInfo){
|
||||
List<PartTypeCheckDetails> partTypeCheckDetailsList = partArrivedMapper.selectPartTypeCheckDetailsListByQueryDto(partTypeQueryDto);
|
||||
PartTypeCheckDto.setPartTypeCheckDetailsList(partTypeCheckDetailsList);
|
||||
partTypeCheckDto.setPartTypeCheckDetailsList(partTypeCheckDetailsList);
|
||||
if (!CollectionUtils.isEmpty(partTypeCheckDetailsList)) {
|
||||
List<PurchaseSignRecord> purchaseSignRecordUserSignList = new ArrayList<>();
|
||||
HashMap<String, PurchaseSignRecord> purchaseSignRecordMap = new HashMap<>();
|
||||
for (PartTypeCheckDetails purchaseCheckDetails : partTypeCheckDetailsList) {
|
||||
// 查询已签名的记录
|
||||
if (purchaseSignRecordUserSignList.isEmpty()) {
|
||||
purchaseSignRecordUserSignList = signProcessMapper.getPurchaseSignUrlListByTaskId(purchaseCheckDetails.getTaskId());
|
||||
for (PurchaseSignRecord purchaseSignRecord : purchaseSignRecordUserSignList) {
|
||||
purchaseSignRecordMap.put(purchaseSignRecord.getSignUrl(), purchaseSignRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 分流存入集合,利用Map去重
|
||||
purchaseSignRecordMap.forEach((k, v) -> {
|
||||
if (null != v.getUserId()) {
|
||||
if (311 == v.getOrgId()) {
|
||||
partTypeCheckDto.getGySignUrl().add(v);
|
||||
}
|
||||
if (313 == v.getOrgId()) {
|
||||
partTypeCheckDto.getScSignUrl().add(v);
|
||||
}
|
||||
if (312 == v.getOrgId()) {
|
||||
partTypeCheckDto.getKgSignUrl().add(v);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return PartTypeCheckDto;
|
||||
return partTypeCheckDto;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,14 +96,15 @@ public class PurchaseNoticePersonServiceImpl implements IPurchaseNoticePersonSer
|
|||
);
|
||||
// 修改配件采购明细的任务状态
|
||||
partCheckMapper.batchUpdateDetailsTaskStatus(purchaseNoticePersonDto.getTaskId(), PurchaseTaskStatusEnum.TO_CHECK.getStatus(), "");
|
||||
} else {
|
||||
tmTaskMapper.updateTmTask(new TmTask()
|
||||
.setTaskId(purchaseNoticePersonDto.getTaskId())
|
||||
.setTaskType(TmTaskTypeEnum.TM_TASK_PURCHASE.getTaskTypeId())
|
||||
.setTaskStatus(PurchaseTaskStatusEnum.TASK_IN_PROGRESS.getStatus())
|
||||
);
|
||||
// 修改采购明细的任务状态
|
||||
purchaseCheckDetailsService.batchUpdateDetailsTaskStatus(purchaseNoticePersonDto.getTaskId(), PurchaseTaskStatusEnum.TO_CHECK.getStatus(), "");
|
||||
}
|
||||
tmTaskMapper.updateTmTask(new TmTask()
|
||||
.setTaskId(purchaseNoticePersonDto.getTaskId())
|
||||
.setTaskType(TmTaskTypeEnum.TM_TASK_PURCHASE.getTaskTypeId())
|
||||
.setTaskStatus(PurchaseTaskStatusEnum.TASK_IN_PROGRESS.getStatus())
|
||||
);
|
||||
// 修改采购明细的任务状态
|
||||
purchaseCheckDetailsService.batchUpdateDetailsTaskStatus(purchaseNoticePersonDto.getTaskId(), PurchaseTaskStatusEnum.TO_CHECK.getStatus(), "");
|
||||
return AjaxResult.success("短信发送成功:" + sendResult);
|
||||
} else {
|
||||
return AjaxResult.error("短信发送失败,发送结果为空");
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectPartTypeCheckInfoJoinList" resultType="com.bonus.material.part.domain.PartTypeCheckInfo">
|
||||
select
|
||||
ppi.id, ppi.task_id as taskId, ppi.purchase_time as purchasePrice, ppi.arrival_time as arrivalTime, ppi.purchaser, ppi.supplier_id as supplierId, ppi.tax_rate as taxRate,
|
||||
ppi.id, ppi.task_id as taskId, ppi.purchase_time as purchaseTime, ppi.arrival_time as arrivalTime, ppi.purchaser, ppi.supplier_id as supplierId, ppi.tax_rate as taxRate,
|
||||
ppi.create_by as createBy, ppi.create_time as createTime, ppi.update_by as updateBy, ppi.update_time as updateTime, ppi.remark, ppi.company_id as companyId,
|
||||
t.task_status as taskStatus,t.code,msi.supplier
|
||||
from
|
||||
|
|
@ -120,9 +120,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_user su ON ppi.create_by = su.user_id
|
||||
left join ma_supplier_info msi on ppi.supplier_id = msi.supplier_id
|
||||
<where>
|
||||
<if test="startTime != null "> and date_format(ppi.create_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')</if>
|
||||
<if test="endTime != null "> and date_format(ppi.create_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')</if>
|
||||
<if test="taskStatus != null "> and t.task_status = #{taskStatus}</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[and DATE_FORMAT( ppi.arrival_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
</if>
|
||||
</where>
|
||||
order by ppi.create_time desc
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue