维修审核驳回修改

This commit is contained in:
1539530615@qq.com 2024-01-25 13:16:01 +08:00
parent cffce178a3
commit e62aa0f71c
8 changed files with 61 additions and 21 deletions

View File

@ -24,9 +24,15 @@ public class SysNoticeController {
@ApiOperation(value = "查询通知公告列表")
@GetMapping("/getList")
public AjaxResult getList(@RequestParam(required = false, defaultValue = "", value = "keyword") String keyword)
{
public AjaxResult getList(@RequestParam(required = false, defaultValue = "", value = "keyword") String keyword) {
List<SysNotice> list = service.getList(keyword);
return AjaxResult.success("操作成功",list);
}
@ApiOperation(value = "查询通知公告详细")
@GetMapping("/getById")
public AjaxResult getById(@RequestParam(required = false, defaultValue = "", value = "noticeId") Long noticeId) {
SysNotice bean = service.getById(noticeId);
return AjaxResult.success("操作成功",bean);
}
}

View File

@ -17,4 +17,6 @@ public interface SysNoticeMapper {
* @return
*/
List<SysNotice> getList(String keyword);
SysNotice getById(Long noticeId);
}

View File

@ -15,4 +15,6 @@ public interface SysNoticeService {
* @return
*/
List<SysNotice> getList(String keyword);
SysNotice getById(Long noticeId);
}

View File

@ -29,4 +29,14 @@ public class SysNoticeServiceImpl implements SysNoticeService {
}
return list;
}
@Override
public SysNotice getById(Long noticeId) {
SysNotice bean = mapper.getById(noticeId);
if (bean.getNoticeContent() != null){
String noticeContent = Base64.getEncoder().encodeToString(bean.getNoticeContent());
bean.setNoticeContentStr(noticeContent);
}
return bean;
}
}

View File

@ -21,4 +21,18 @@
</if>
order by create_time desc
</select>
<select id="getById" resultType="com.bonus.sgzb.app.domain.SysNotice">
select notice_id as noticeId,
notice_title as noticeTitle,
notice_type as noticeType,
notice_content as noticeContent,
status as status,
create_by as createBy,
create_time as createTime,
update_by as updateBy,
update_time as updateTime,
remark as remark
from sys_notice
where status = '0' and notice_id = #{noticeId}
</select>
</mapper>

View File

@ -82,4 +82,6 @@ public interface RepairAuditDetailsMapper
int insertRepairDetails(RepairTaskDetails repairTaskDetails);
Long getBackId(Long repairId);
List<RepairAuditDetails> selectnotAuditByTaskId(Long taskId);
}

View File

@ -172,6 +172,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
}
List<RepairAuditDetails> auditAllList = repairAuditDetailsMapper.selectRepairAuditDetailsByTaskId(taskId);
List<RepairAuditDetails> notAuditList = repairAuditDetailsMapper.selectnotAuditByTaskId(taskId);
// 查询协议表
TmTaskAgreement tmTaskAgreement = agreementMapper.selectTmTaskAgreementByTaskId(taskId);
String taskCode ="";
@ -241,7 +242,6 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
// 创建报废任务
BigDecimal scrapNum = scrapDetails.getScrapNum();
if (scrapNum.compareTo(b) > 0) {
// 添加退料任务
ScrapApplyDetails scrapApplyDetails = new ScrapApplyDetails();
scrapApplyDetails.setTaskId(scrapTaskId);
scrapApplyDetails.setTypeId(typeId);
@ -258,17 +258,15 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
}
// 修饰审核通过时改修任务为已通过审核
int i = 0;
int j = 0;
if (repairInputList != null){
i = repairInputList.size();
}
if (scrapNumList != null){
j = scrapNumList.size();
}
if (auditAllList.size() == (i + j)){
if (auditDetailList != null){
if (auditDetailList.size() == notAuditList.size()){
task1.setTaskStatus(47);
}
}else if (auditAllList != null){
if (auditAllList.size() == notAuditList.size()){
task1.setTaskStatus(47);
}
}
task1.setUpdateTime(new Date());
task1.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
taskMapper.updateTmTask(task1);
@ -280,7 +278,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
}else {
repairDetailList.addAll(auditAllList);
}
if(repairDetailList != null && repairDetailList.size() > 0){
if(repairDetailList.size() > 0){
if (repairDetailList.get(0).getCompanyId() != null){
companyId = repairDetailList.get(0).getCompanyId();
}
@ -309,8 +307,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
TmTask tmTask = new TmTask();
tmTask.setTaskId(taskId);
tmTask.setRemark(scrapAudit.getRemark());
int i = repairDetailList.size();
if (auditAllList.size() == i){
if (repairDetailList.size() == notAuditList.size()){
tmTask.setTaskStatus(48);
}
tmTask.setUpdateTime(new Date());
@ -326,6 +323,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
}
}
}else {
if (auditAllList != null) {
for (RepairAuditDetails bean : auditAllList){
bean.setAuditBy(SecurityUtils.getLoginUser().getUserid());
bean.setStatus(status);
@ -333,6 +331,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
}
}
}
}
return 1;
}

View File

@ -295,7 +295,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
dic.NAME taskStatusName,
bui.unit_name unitName,
bpl.lot_name projectName,
tk.create_by createBy,
su.user_name createBy,
tk.create_time createTime,
tk.remark,
tk.CODE repairNum,
@ -324,6 +324,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt ON rad.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
left join ma_machine mma on rad.ma_id= mma.ma_id
LEFT JOIN sys_user su ON su.user_id = tk.create_by
WHERE
tk.task_type = 45
<if test="keyword != null and keyword != ''">
@ -382,5 +383,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from repair_apply_details
where id = #{repairId}
</select>
<select id="selectnotAuditByTaskId" resultType="com.bonus.sgzb.material.domain.RepairAuditDetails">
<include refid="selectRepairAuditDetailsVo"/>
where task_id = #{taskId} and rd.STATUS = '0'
</select>
</mapper>