新购优化
This commit is contained in:
parent
c6028b6166
commit
c5761ebb0d
|
|
@ -45,7 +45,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
* 查询新购短信通知人员列表
|
||||
*/
|
||||
@ApiOperation(value = "查询新购短信通知人员列表")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
//@RequiresPermissions("purchase:person:notice")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PurchaseNoticePerson purchaseNoticePerson) {
|
||||
List<PurchaseNoticePerson> list = purchaseNoticePersonService.selectPurchaseNoticePersonList(purchaseNoticePerson);
|
||||
|
|
@ -56,7 +56,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
* 查询新购短信通知人员列表
|
||||
*/
|
||||
@ApiOperation(value = "查询等待选择的新购短信通知人员列表")
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
//@RequiresPermissions("purchase:person:notice")
|
||||
@GetMapping("/listUnSelected")
|
||||
public TableDataInfo listUnSelected(PurchaseNoticePerson purchaseNoticePerson) {
|
||||
List<PurchaseNoticePerson> list = purchaseNoticePersonService.getUnSelectedUserList(purchaseNoticePerson);
|
||||
|
|
@ -108,7 +108,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "批量新增新购短信通知人员")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
//@RequiresPermissions("purchase:person:notice")
|
||||
@SysLog(title = "批量新增新购短信通知人员", businessType = OperaType.INSERT, module = "物资新购->批量新增新购短信通知人员")
|
||||
@PostMapping("/batchAddNoticePerson")
|
||||
public AjaxResult batchAddNoticePerson(@RequestBody List<PurchaseNoticePerson> purchaseNoticePersonList) {
|
||||
|
|
@ -124,7 +124,7 @@ public class PurchaseNoticePersonController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "批量发送短信")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("purchase:person:notice")
|
||||
//@RequiresPermissions("purchase:person:notice")
|
||||
@SysLog(title = "批量发送短信", businessType = OperaType.UPDATE, module = "物资新购->批量发送短信")
|
||||
@PutMapping("/batchSendSms")
|
||||
public AjaxResult batchSendSms(@NotNull @Valid @RequestBody PurchaseNoticePersonDto purchaseNoticePersonDto) {
|
||||
|
|
|
|||
|
|
@ -144,4 +144,12 @@ public interface PurchaseCheckDetailsMapper {
|
|||
* @return
|
||||
*/
|
||||
List<PurchaseCheckDetails> selectPurchaseCheckDetailsListById(PurchaseQueryDto purchaseQueryDto);
|
||||
|
||||
/**
|
||||
* 批量查询编码物资类型名称
|
||||
* @param taskIds
|
||||
* @param statusList
|
||||
* @return
|
||||
*/
|
||||
List<PurchaseCheckInfo> selectBindInfo(@Param("taskIds") List<Long> taskIds, @Param("statusList") List<Integer> statusList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -642,13 +642,13 @@ public class PurchaseBindServiceImpl implements IPurchaseBindService {
|
|||
.filter(task -> task.getTaskId() != null)
|
||||
.collect(Collectors.toMap(TmTask::getTaskId, Function.identity()));
|
||||
|
||||
// 批量查询物资类型名称
|
||||
// 批量查询编码物资类型名称
|
||||
final boolean isAllowPartTransfer = bmConfigService.isBmConfigEnabledWithDefaultFalse(BmConfigItems.BOOLEAN_ALLOW_PURCHASE_PART_TRANSFER);
|
||||
List<PurchaseCheckInfo> maTypeNames;
|
||||
if (isAllowPartTransfer) {
|
||||
maTypeNames = purchaseCheckDetailsMapper.selectMaTypeNameByTaskIdsBatch(taskIds, purchaseQueryDto.getStatusList());
|
||||
maTypeNames = purchaseCheckDetailsMapper.selectBindInfo(taskIds, purchaseQueryDto.getStatusList());
|
||||
} else {
|
||||
maTypeNames = purchaseCheckDetailsMapper.selectMaTypeNameByTaskIdsBatch(taskIds, Collections.emptyList());
|
||||
maTypeNames = purchaseCheckDetailsMapper.selectBindInfo(taskIds, Collections.emptyList());
|
||||
}
|
||||
Map<Long, String> maTypeNameMap = maTypeNames.stream()
|
||||
.filter(info -> info.getTaskId() != null)
|
||||
|
|
@ -687,7 +687,8 @@ public class PurchaseBindServiceImpl implements IPurchaseBindService {
|
|||
!PurchaseTaskStatusEnum.TO_NOTICE.getStatus().equals(o.getStatus()) &&
|
||||
!PurchaseTaskStatusEnum.TO_CHECK_AFTER_REJECT.getStatus().equals(o.getStatus()) &&
|
||||
!PurchaseTaskStatusEnum.TO_CHECK.getStatus().equals(o.getStatus()) &&
|
||||
!PurchaseTaskStatusEnum.TO_BIND_AFTER_REJECT.getStatus().equals(o.getStatus())
|
||||
!PurchaseTaskStatusEnum.TO_BIND_AFTER_REJECT.getStatus().equals(o.getStatus()) &&
|
||||
o.getManageType() == 0
|
||||
).collect(Collectors.toList());
|
||||
break;
|
||||
case PURCHASE_TASK_STAGE_STORE:
|
||||
|
|
@ -793,6 +794,10 @@ public class PurchaseBindServiceImpl implements IPurchaseBindService {
|
|||
}
|
||||
|
||||
if (!CollectionUtils.isEmpty(purchaseCheckInfoResult)) {
|
||||
// 将purchaseCheckInfoResult中purchaseMaTypeName为空的数据剔除
|
||||
purchaseCheckInfoResult = purchaseCheckInfoResult.stream()
|
||||
.filter(item -> StringUtils.isNotBlank(item.getPurchaseMaTypeName()))
|
||||
.collect(Collectors.toList());
|
||||
// 关键字过滤
|
||||
String keyWord = purchaseQueryDto.getKeyWord();
|
||||
if (!StringUtils.isBlank(keyWord)) {
|
||||
|
|
@ -831,6 +836,7 @@ public class PurchaseBindServiceImpl implements IPurchaseBindService {
|
|||
purchaseCheckDetailsList = purchaseCheckDetailsList.stream().filter(o ->
|
||||
!PurchaseTaskStatusEnum.TO_NOTICE.getStatus().equals(o.getStatus()) && !PurchaseTaskStatusEnum.TO_CHECK_AFTER_REJECT.getStatus().equals(o.getStatus()) &&
|
||||
!PurchaseTaskStatusEnum.TO_CHECK.getStatus().equals(o.getStatus()) && !PurchaseTaskStatusEnum.TO_BIND_AFTER_REJECT.getStatus().equals(o.getStatus())
|
||||
&& o.getManageType() != 1
|
||||
).collect(Collectors.toList());
|
||||
break;
|
||||
case PURCHASE_TASK_STAGE_STORE:
|
||||
|
|
|
|||
|
|
@ -845,8 +845,8 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
if (0 < addPurchaseSignResult) {
|
||||
// 会签成功,对配置的流程进行处理
|
||||
configSignOrgSet.remove(loginUserDeptId);
|
||||
// 如果loginUserDeptId包含库管一班、库管二班或者库管三班的任意一个组织id,那么库管班就算审核通过
|
||||
if (loginUserDeptId == 106L || loginUserDeptId == 334L || loginUserDeptId == 335L) {
|
||||
// 如果loginUserDeptId包含库管一班、库管二班、库管三班或修试二班的任意一个组织id,那么库管班就算审核通过
|
||||
if (loginUserDeptId == 106L || loginUserDeptId == 334L || loginUserDeptId == 335L || loginUserDeptId == 336L) {
|
||||
// 库管班审核通过,放行进行验收流程
|
||||
System.out.println("ONE会签成功,放行进行验收流程!");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and (sdd.dict_label like concat('%', #{keyWord}, '%') or sdd2.dict_label like concat('%', #{keyWord}, '%')
|
||||
or sd.dept_name like concat('%', #{keyWord}, '%'))
|
||||
</if>
|
||||
AND sd.dept_name NOT LIKE '%库管%'
|
||||
AND (sd.dept_name NOT LIKE '%库管%' AND sd.dept_name NOT LIKE '%修试%')
|
||||
union
|
||||
SELECT
|
||||
sc.id AS id,
|
||||
|
|
@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and (sdd.dict_label like concat('%', #{keyWord}, '%') or sdd2.dict_label like concat('%', #{keyWord}, '%')
|
||||
or sd.dept_name like concat('%', #{keyWord}, '%'))
|
||||
</if>
|
||||
AND sd.dept_name LIKE '%库管%'
|
||||
AND (sd.dept_name LIKE '%库管%' OR sd.dept_name LIKE '%修试%')
|
||||
GROUP BY
|
||||
sc.process_id,
|
||||
sc.sign_type,
|
||||
|
|
|
|||
|
|
@ -476,4 +476,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
or mtp.type_name like concat('%', #{keyWord}, '%'))
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectBindInfo" resultType="com.bonus.material.purchase.domain.PurchaseCheckInfo">
|
||||
select
|
||||
task_id as taskId,
|
||||
GROUP_CONCAT(type_name) as purchaseMaTypeName
|
||||
from
|
||||
(
|
||||
select
|
||||
distinct pcd.task_id, mt1.type_name
|
||||
from
|
||||
purchase_check_details pcd
|
||||
left join
|
||||
ma_type mt on pcd.type_id = mt.type_id
|
||||
left join
|
||||
ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
where
|
||||
mt.manage_type = 0
|
||||
<if test="taskIds != null and taskIds.size() > 0">
|
||||
and pcd.task_id in
|
||||
<foreach item="taskId" collection="taskIds" open="(" separator="," close=")">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="statusList != null and statusList.size() > 0">
|
||||
and pcd.status in
|
||||
<foreach item="item" collection="statusList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
) t
|
||||
GROUP BY task_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue