Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a3b562a77c
|
|
@ -162,4 +162,13 @@ public class partArrivedController extends BaseController {
|
|||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据任务id查询入库单
|
||||
*/
|
||||
@ApiOperation("根据任务id查询入库单")
|
||||
//@RequiresPermissions("purchase:info:query")
|
||||
@GetMapping(value = "/getInBoundForm")
|
||||
public AjaxResult getInBoundForm( PartTypeQueryDto partTypeQueryDto) {
|
||||
return success(partArrivedService.getInBoundForm(partTypeQueryDto));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,4 +109,12 @@ public interface PartArrivedMapper
|
|||
|
||||
//删除附件文件相关任务文件
|
||||
int deleteBmFileList(Long taskId);
|
||||
|
||||
/**
|
||||
* 获取入库单外层信息数据
|
||||
*
|
||||
* @param partTypeQueryDto 外层信息
|
||||
* @return 外层信息
|
||||
*/
|
||||
PartTypeCheckInfo getCheckInfoForm(PartTypeQueryDto partTypeQueryDto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,4 +72,12 @@ public interface IPartArrivedService {
|
|||
* @return 查询附件列表
|
||||
*/
|
||||
List<BmPartFileInfo> getPartFilelist(BmPartFileInfo bmPartFileInfo);
|
||||
|
||||
/**
|
||||
* 根据任务id查询入库单
|
||||
*
|
||||
* @param partTypeQueryDto 入库单
|
||||
* @return 入库单
|
||||
*/
|
||||
PartTypeCheckDto getInBoundForm(PartTypeQueryDto partTypeQueryDto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -319,4 +319,22 @@ public class PartArrivedServiceImpl implements IPartArrivedService
|
|||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据任务id查询入库单
|
||||
*
|
||||
* @param partTypeQueryDto 入库单
|
||||
* @return 入库单
|
||||
*/
|
||||
@Override
|
||||
public PartTypeCheckDto getInBoundForm(PartTypeQueryDto partTypeQueryDto) {
|
||||
PartTypeCheckInfo partTypeCheckInfo = partArrivedMapper.getCheckInfoForm(partTypeQueryDto);
|
||||
PartTypeCheckDto PartTypeCheckDto = new PartTypeCheckDto();
|
||||
PartTypeCheckDto.setPartTypeCheckInfo(partTypeCheckInfo);
|
||||
if(null != partTypeCheckInfo){
|
||||
List<PartTypeCheckDetails> partTypeCheckDetailsList = partArrivedMapper.selectPartTypeCheckDetailsListByQueryDto(partTypeQueryDto);
|
||||
PartTypeCheckDto.setPartTypeCheckDetailsList(partTypeCheckDetailsList);
|
||||
}
|
||||
return PartTypeCheckDto;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
private TmTaskMapper tmTaskMapper;
|
||||
|
||||
@Resource
|
||||
BmFileInfoMapper bmFileInfoMapper;
|
||||
private BmFileInfoMapper bmFileInfoMapper;
|
||||
|
||||
@Resource
|
||||
private TypeMapper typeMapper;
|
||||
|
|
@ -79,7 +79,6 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
@Resource
|
||||
private SignProcessMapper signProcessMapper;
|
||||
|
||||
|
||||
// 引入新购任务阶段常量
|
||||
private static final int PURCHASE_TASK_STAGE_MANAGE = 1;
|
||||
private static final int PURCHASE_TASK_STAGE_CHECK = 2;
|
||||
|
|
@ -278,9 +277,6 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
purchaseInfo.setCheckMaNumber(checkMaTotalNumber);
|
||||
purchaseInfo.setInputMaNumber(inputMaTotalNumber);
|
||||
purchaseInfo.setWaitInputNumber(Optional.of(purchaseMaTotalNumber).orElse(BigDecimal.ZERO).subtract(Optional.of(inputMaTotalNumber).orElse(BigDecimal.ZERO)));
|
||||
// if (null != purchaseInfo.getTaxRate() && null != purchaseInfo.getPurchasePrice()) {
|
||||
// purchaseInfo.setPurchaseTaxPrice(calculateTaxPrice(purchaseMaTotalPrice.get(), purchaseInfo.getTaxRate()));
|
||||
// }
|
||||
|
||||
// 设置外层任务状态:入库待开始、入库进行中、入库已完成
|
||||
final TmTask tmTask = tmTaskMapper.selectTmTaskByTaskId(purchaseInfo.getTaskId());
|
||||
|
|
@ -493,7 +489,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
System.out.println("ONE会签成功,放行进行验收流程!");
|
||||
} else {
|
||||
// 如果本次会签完成后还有需要进行会签的,那么本次会签完成,返回前端
|
||||
return AjaxResult.success("本次会签成功,还有未进行的会签部门!");
|
||||
return AjaxResult.success("会签成功!");
|
||||
}
|
||||
} else {
|
||||
return AjaxResult.error("会签失败!,插入0条数据");
|
||||
|
|
@ -523,10 +519,6 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
for (PurchaseCheckDetails details : purchaseVerifyVo.getPurchaseCheckDetailsList()) {
|
||||
details.setStatus(PurchaseTaskStatusEnum.TO_CHECK_AFTER_REJECT.getStatus());
|
||||
result = 0 < purchaseCheckDetailsMapper.updatePurchaseDetails4Check(details) ? AjaxResult.success("detail验证驳回成功") : AjaxResult.error("details无验证信息");
|
||||
/*tmTaskMapper.updateTmTask(new TmTask()
|
||||
.setTaskId(details.getTaskId())
|
||||
.setTaskType(TmTaskTypeEnum.TM_TASK_PURCHASE.getTaskTypeId())
|
||||
.setTaskStatus(PurchaseTaskStatusEnum.TASK_IN_PROGRESS.getStatus()));*/
|
||||
extractedFile(details);
|
||||
}
|
||||
}
|
||||
|
|
@ -570,21 +562,26 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
List<PurchaseCheckDetails> list = purchaseCheckDetailsMapper.selectPurchaseCheckDetailsListFromInfo(purchaseCheckInfo);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
List<PurchaseSignRecord> purchaseSignRecordUserSignList = new ArrayList<>();
|
||||
HashMap<String, PurchaseSignRecord> purchaseSignRecordMap = new HashMap<>();
|
||||
for (PurchaseCheckDetails purchaseCheckDetails : list) {
|
||||
// 查询已签名的记录
|
||||
if (purchaseSignRecordUserSignList.isEmpty()) {
|
||||
purchaseSignRecordUserSignList = signProcessMapper.getPurchaseSignUrlListByTaskId(purchaseCheckDetails.getTaskId());
|
||||
for (PurchaseSignRecord purchaseSignRecord : purchaseSignRecordUserSignList) {
|
||||
purchaseSignRecordMap.put(purchaseSignRecord.getSignUrl(), purchaseSignRecord);
|
||||
}
|
||||
}
|
||||
result.setSignUrl(null != purchaseCheckDetails.getSignUrl() ? purchaseCheckDetails.getSignUrl() : "");
|
||||
result.setSignType(null != purchaseCheckDetails.getSignType() ? purchaseCheckDetails.getSignType() : "");
|
||||
}
|
||||
// 分流存入集合
|
||||
for (PurchaseSignRecord userSignObj : purchaseSignRecordUserSignList) {
|
||||
if (null == userSignObj.getOrgId()) { continue;}
|
||||
if (311 == userSignObj.getOrgId()) {result.getGySignUrl().add(userSignObj);}
|
||||
if (313 == userSignObj.getOrgId()) {result.getScSignUrl().add(userSignObj);}
|
||||
if (312 == userSignObj.getOrgId()) {result.getKgSignUrl().add(userSignObj);}
|
||||
// 分流存入集合,利用Map去重
|
||||
purchaseSignRecordMap.forEach((k, v) -> {
|
||||
if (null != v.getUserId()) {
|
||||
if (311 == v.getOrgId()) {result.getGySignUrl().add(v);}
|
||||
if (313 == v.getOrgId()) {result.getScSignUrl().add(v);}
|
||||
if (312 == v.getOrgId()) {result.getKgSignUrl().add(v);}
|
||||
}
|
||||
});
|
||||
}
|
||||
// 执行SQL查询内层信息
|
||||
final List<PurchaseCheckDetails> purchaseCheckDetails = purchaseCheckDetailsMapper.selectPurchaseCheckDetailsListByTaskId(taskId, null, SecurityUtils.getUserId());
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class ScrapReason extends BaseEntity {
|
|||
private Date updateTime;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注", width = 40)
|
||||
// @Excel(name = "备注", width = 40)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ public class ScrapReasonServiceImpl implements IScrapReasonService
|
|||
{
|
||||
scrapReason.setCreateTime(DateUtils.getNowDate());
|
||||
scrapReason.setUpdateTime(DateUtils.getNowDate());
|
||||
scrapReason.setCreateBy(SecurityUtils.getUsername());
|
||||
scrapReason.setUpdateBy(SecurityUtils.getUsername());
|
||||
scrapReason.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
|
||||
scrapReason.setUpdateBy(String.valueOf(SecurityUtils.getUserId()));
|
||||
try {
|
||||
return scrapReasonMapper.insertScrapReasonInfo(scrapReason);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -106,7 +106,7 @@ public class ScrapReasonServiceImpl implements IScrapReasonService
|
|||
public int updateScrapReasonInfo(ScrapReason scrapReason)
|
||||
{
|
||||
scrapReason.setUpdateTime(DateUtils.getNowDate());
|
||||
scrapReason.setUpdateBy(SecurityUtils.getUsername());
|
||||
scrapReason.setUpdateBy(String.valueOf(SecurityUtils.getUserId()));
|
||||
try {
|
||||
return scrapReasonMapper.updateScrapReasonInfo(scrapReason);
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -118,6 +118,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
su.sign_url as signUrl,su.sign_type as signType
|
||||
FROM purchase_audit_record par
|
||||
LEFT JOIN sys_user su ON su.user_id = par.auditor
|
||||
WHERE par.task_id = '844'
|
||||
WHERE par.task_id = #{taskId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -197,4 +197,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<delete id="deleteBmFileList" parameterType="Long">
|
||||
delete from bm_file_info bfi where task_id = #{taskId} and task_type = 13
|
||||
</delete>
|
||||
|
||||
<select id="getCheckInfoForm" 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.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
|
||||
purchase_part_info ppi
|
||||
left join tm_task t on t.task_id = ppi.task_id
|
||||
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 ppi.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectScrapReasonList" resultType="com.bonus.material.scrap.domain.ScrapReason">
|
||||
select
|
||||
sc.id as id,sc.type_id as typeId,mt.type_name as typeName,mt1.type_id as parentId,mt1.type_name as parentName,
|
||||
sc.update_time as updateTime,sc.update_by as updateBy,sc.reason as reason
|
||||
sc.update_time as updateTime,su.nick_name as updateBy,sc.reason as reason
|
||||
from scrap_reason sc
|
||||
left join ma_type mt on sc.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 sc.update_by = su.user_id and su.del_flag = 0
|
||||
where sc.del_flag = 0
|
||||
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
|
|
@ -102,9 +103,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="updateScrapReasonInfo">
|
||||
update scrap_reason
|
||||
set type_id = #{typeId},
|
||||
|
|
|
|||
Loading…
Reference in New Issue