Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cdeeab88bc
|
|
@ -120,6 +120,8 @@ public class BackApplyInfoController extends BaseController {
|
||||||
if (!result.isSuccess()) {
|
if (!result.isSuccess()) {
|
||||||
return AjaxResult.error("SysFile文件服务上传失败:" + result.get("msg"));
|
return AjaxResult.error("SysFile文件服务上传失败:" + result.get("msg"));
|
||||||
}
|
}
|
||||||
|
//电子档案工程同步,第一次执行时间较长
|
||||||
|
syncProject();
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Map<String, Object> jsonObject = (Map<String, Object>) result.get("data");
|
Map<String, Object> jsonObject = (Map<String, Object>) result.get("data");
|
||||||
|
|
@ -559,6 +561,7 @@ public class BackApplyInfoController extends BaseController {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, new ArrayList<>()));
|
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, new ArrayList<>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -573,4 +576,27 @@ public class BackApplyInfoController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** -------出门证结束------- */
|
/** -------出门证结束------- */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电子档案工程同步
|
||||||
|
*/
|
||||||
|
public void syncProject() {
|
||||||
|
//1、查询未同步的工程信息
|
||||||
|
List<BackApplyInfo> list = backApplyInfoService.selectNotSyncProject();
|
||||||
|
if (list.size()>0){
|
||||||
|
for (BackApplyInfo backApplyInfo : list){
|
||||||
|
//2、将所有工程信息插入archives_record_info,并返回id
|
||||||
|
backApplyInfoService.syncProject(backApplyInfo);
|
||||||
|
if (backApplyInfo.getId()!=null){
|
||||||
|
//3、将返回的每个id插入archives_record_details
|
||||||
|
backApplyInfoService.syncProjectDetails(backApplyInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -507,4 +507,10 @@ public interface BackApplyInfoMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int delHandlingOrder(HandlingOrder bean);
|
int delHandlingOrder(HandlingOrder bean);
|
||||||
|
|
||||||
|
List<BackApplyInfo> selectNotSyncProject();
|
||||||
|
|
||||||
|
int syncProject(BackApplyInfo backApplyInfo);
|
||||||
|
|
||||||
|
int syncProjectDetails(BackApplyInfo backApplyInfo2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -242,5 +242,12 @@ public interface IBackApplyInfoService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult delHandlingOrder(HandlingOrder bean);
|
AjaxResult delHandlingOrder(HandlingOrder bean);
|
||||||
|
|
||||||
|
|
||||||
|
List<BackApplyInfo> selectNotSyncProject();
|
||||||
|
|
||||||
|
int syncProject(BackApplyInfo backApplyInfo);
|
||||||
|
|
||||||
|
int syncProjectDetails(BackApplyInfo backApplyInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2294,6 +2294,29 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BackApplyInfo> selectNotSyncProject() {
|
||||||
|
return backApplyInfoMapper.selectNotSyncProject();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int syncProject(BackApplyInfo backApplyInfo) {
|
||||||
|
return backApplyInfoMapper.syncProject(backApplyInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int syncProjectDetails(BackApplyInfo backApplyInfo) {
|
||||||
|
BackApplyInfo backApplyInfo2 = new BackApplyInfo();
|
||||||
|
backApplyInfo2.setId(backApplyInfo.getId());
|
||||||
|
backApplyInfo2.setTypeName("领料单");
|
||||||
|
backApplyInfoMapper.syncProjectDetails(backApplyInfo2);
|
||||||
|
backApplyInfo2.setTypeName("退料单");
|
||||||
|
backApplyInfoMapper.syncProjectDetails(backApplyInfo2);
|
||||||
|
backApplyInfo2.setTypeName("业务联系单");
|
||||||
|
backApplyInfoMapper.syncProjectDetails(backApplyInfo2);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理班组退料结算协议
|
* 处理班组退料结算协议
|
||||||
* @param record
|
* @param record
|
||||||
|
|
|
||||||
|
|
@ -172,11 +172,7 @@ public class MachineController extends BaseController {
|
||||||
@ApiOperation(value = "电子标签查询")
|
@ApiOperation(value = "电子标签查询")
|
||||||
@GetMapping("/getElectronicLabel")
|
@GetMapping("/getElectronicLabel")
|
||||||
public AjaxResult getElectronicLabel(Machine machine) {
|
public AjaxResult getElectronicLabel(Machine machine) {
|
||||||
try {
|
return machineService.getElectronicLabel(machine);
|
||||||
return success(machineService.getElectronicLabel(machine));
|
|
||||||
} catch (Exception e) {
|
|
||||||
return error("系统错误, " + e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ public interface IMachineService
|
||||||
* @param machine
|
* @param machine
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Machine> getElectronicLabel(Machine machine);
|
AjaxResult getElectronicLabel(Machine machine);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据标签信息查询出库单
|
* 根据标签信息查询出库单
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.bonus.material.ma.service.impl;
|
package com.bonus.material.ma.service.impl;
|
||||||
|
|
||||||
|
import java.time.ZoneId;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
@ -207,8 +209,9 @@ public class MachineServiceImpl implements IMachineService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Machine> getElectronicLabel(Machine machine) {
|
public AjaxResult getElectronicLabel(Machine machine) {
|
||||||
List<Machine> list = new ArrayList<>();
|
List<Machine> list = new ArrayList<>();
|
||||||
|
int type = 0;
|
||||||
try {
|
try {
|
||||||
if (machine.getDevType()==1){
|
if (machine.getDevType()==1){
|
||||||
//查询ws_ma_info,工器具
|
//查询ws_ma_info,工器具
|
||||||
|
|
@ -217,6 +220,18 @@ public class MachineServiceImpl implements IMachineService
|
||||||
//查询ma_machine表,安全工器具
|
//查询ma_machine表,安全工器具
|
||||||
list = machineMapper.getElectronicLabel(machine);
|
list = machineMapper.getElectronicLabel(machine);
|
||||||
}
|
}
|
||||||
|
for (Machine dto : list){
|
||||||
|
Date nextCheckTime = dto.getNextCheckTime();
|
||||||
|
Date todayStart = new Date(); // 获取当前时间
|
||||||
|
// 将 todayStart 设置为当天的开始时间(00:00:00)
|
||||||
|
todayStart = Date.from(todayStart.toInstant().atZone(ZoneId.systemDefault())
|
||||||
|
.withHour(0).withMinute(0).withSecond(0).withNano(0)
|
||||||
|
.toInstant());
|
||||||
|
if (nextCheckTime != null && nextCheckTime.before(todayStart)) {
|
||||||
|
type=1;
|
||||||
|
throw new RuntimeException("该工器具已临近下次检验时间,请及时退还至机具(物流)分公司!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
for (Machine dto : list) {
|
for (Machine dto : list) {
|
||||||
|
|
@ -237,9 +252,13 @@ public class MachineServiceImpl implements IMachineService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return AjaxResult.success(list);
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
return new ArrayList<>();
|
if (type==1){
|
||||||
|
return AjaxResult.error("该工器具已临近下次检验时间,请及时退还至机具(物流)分公司!");
|
||||||
|
} else {
|
||||||
|
return AjaxResult.success(new ArrayList<>());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,11 @@ public interface RepairApplyDetailsMapper {
|
||||||
*/
|
*/
|
||||||
public int deleteRepairApplyDetailsByIds(Long[] ids);
|
public int deleteRepairApplyDetailsByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量根据维修ID数组查询维修任务单号
|
||||||
|
*/
|
||||||
|
List<RepairAuditDetails> selectRepairCodeByIds(@Param("list") List<Long> list);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据维修ID查询维修任务单号
|
* 根据维修ID查询维修任务单号
|
||||||
* @param repairId
|
* @param repairId
|
||||||
|
|
@ -102,6 +107,11 @@ public interface RepairApplyDetailsMapper {
|
||||||
*/
|
*/
|
||||||
int updateRepairApplyDetailsAfterAudit(RepairAuditDetails dto);
|
int updateRepairApplyDetailsAfterAudit(RepairAuditDetails dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量修改repair_apply_record维修任务详情状态
|
||||||
|
*/
|
||||||
|
int updateRepairApplyDetailsAfterAuditBatch(@Param("list") List<RepairAuditDetails> list);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据back_id获取最大level
|
* 根据back_id获取最大level
|
||||||
* @param backId
|
* @param backId
|
||||||
|
|
|
||||||
|
|
@ -603,21 +603,10 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
level = details.getLevel();
|
level = details.getLevel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*if (Objects.nonNull(preTmTaskInfo) && Objects.nonNull(preTmTaskInfo.getPreTaskId())) {
|
|
||||||
taskMapper.updateTaskStatus(String.valueOf(preTmTaskInfo.getPreTaskId()), RepairTaskStatusEnum.TASK_STATUS_PROCESSING.getStatus());
|
|
||||||
}*/
|
|
||||||
// 根据taskId查询维修审核明细
|
// 根据taskId查询维修审核明细
|
||||||
final List<RepairAuditDetails> repairAuditDetailsByTaskId = repairAuditDetailsMapper.selectRepairAuditDetailsByTaskId(auditDetails.getTaskId());
|
final List<RepairAuditDetails> repairAuditDetailsByTaskId = repairAuditDetailsMapper.selectRepairAuditDetailsByTaskId(auditDetails.getTaskId());
|
||||||
if (!CollectionUtils.isEmpty(repairAuditDetailsByTaskId)) {
|
if (!CollectionUtils.isEmpty(repairAuditDetailsByTaskId)) {
|
||||||
for (RepairAuditDetails repairAuditDetail : repairAuditDetailsByTaskId) {
|
for (RepairAuditDetails repairAuditDetail : repairAuditDetailsByTaskId) {
|
||||||
/*if ("1".equals(repairAuditDetail.getStatus()) || "2".equals(repairAuditDetail.getStatus())) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// 根据查询详情获取的维修ID,更新scrap_apply_details维修数量
|
|
||||||
repairApplyDetailsMapper.updateRepairApplyDetailsAfterReject(
|
|
||||||
ObjectUtils.defaultIfNull(repairAuditDetail.getRepairedNum(),0).longValue(),
|
|
||||||
ObjectUtils.defaultIfNull(repairAuditDetail.getScrapNum(),0).longValue(), repairAuditDetail.getRepairId());
|
|
||||||
repairApplyDetailsMapper.updateStatus(repairAuditDetail.getRepairId(), RepairTaskStatusEnum.TASK_STATUS_PROCESSING.getStatus());*/
|
|
||||||
RepairTaskDetails repairTaskDetails = new RepairTaskDetails();
|
RepairTaskDetails repairTaskDetails = new RepairTaskDetails();
|
||||||
repairTaskDetails.setNewTaskId(newTaskId);
|
repairTaskDetails.setNewTaskId(newTaskId);
|
||||||
repairTaskDetails.setMaId(repairAuditDetail.getMaId() == null ? null : repairAuditDetail.getMaId().toString());
|
repairTaskDetails.setMaId(repairAuditDetail.getMaId() == null ? null : repairAuditDetail.getMaId().toString());
|
||||||
|
|
@ -785,6 +774,12 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量插入维修明细
|
||||||
|
* @param scrapApplyDetailList 报废明细
|
||||||
|
* @param repairAuditDetailsByQuery 维修明细by查询
|
||||||
|
* @param agreementId 协议ID
|
||||||
|
*/
|
||||||
private void batchInsertRepairInputDetails(List<ScrapApplyDetails> scrapApplyDetailList, List<RepairAuditDetails> repairAuditDetailsByQuery, Long agreementId) {
|
private void batchInsertRepairInputDetails(List<ScrapApplyDetails> scrapApplyDetailList, List<RepairAuditDetails> repairAuditDetailsByQuery, Long agreementId) {
|
||||||
boolean inputFlag = false;
|
boolean inputFlag = false;
|
||||||
boolean scrapFlag = false;
|
boolean scrapFlag = false;
|
||||||
|
|
@ -803,7 +798,9 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
//插入修饰审核入库任务表
|
//插入修饰审核入库任务表
|
||||||
Long newTaskId = null;
|
Long newTaskId = null;
|
||||||
if (inputFlag) {
|
if (inputFlag) {
|
||||||
|
// 插入任务表
|
||||||
newTaskId = insertTt();
|
newTaskId = insertTt();
|
||||||
|
// 插入任务协议关联表
|
||||||
insertTta(newTaskId, agreementId);
|
insertTta(newTaskId, agreementId);
|
||||||
}
|
}
|
||||||
//插入报废任务表
|
//插入报废任务表
|
||||||
|
|
@ -813,11 +810,37 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
insertScrapTta(newScrapTaskId, agreementId);
|
insertScrapTta(newScrapTaskId, agreementId);
|
||||||
}
|
}
|
||||||
final List<RepairInputDetails> inputList = new ArrayList<>();
|
final List<RepairInputDetails> inputList = new ArrayList<>();
|
||||||
|
|
||||||
|
List<RepairAuditDetails> dtoArray = new ArrayList<>();
|
||||||
|
List<ScrapApplyDetails> listAll = new ArrayList<>();
|
||||||
|
if (CollectionUtil.isNotEmpty(repairAuditDetailsByQuery)) {
|
||||||
|
dtoArray = repairApplyDetailsMapper.selectRepairCodeByIds(repairAuditDetailsByQuery.stream().map(RepairAuditDetails::getRepairId).collect(Collectors.toList()));
|
||||||
|
repairApplyDetailsMapper.updateRepairApplyDetailsAfterAuditBatch(repairAuditDetailsByQuery);
|
||||||
|
listAll = scrapApplyDetailsMapper.selectScrapByTaskIdList(repairAuditDetailsByQuery);
|
||||||
|
}
|
||||||
|
|
||||||
for (final RepairAuditDetails details : repairAuditDetailsByQuery) {
|
for (final RepairAuditDetails details : repairAuditDetailsByQuery) {
|
||||||
RepairAuditDetails dto = repairApplyDetailsMapper.selectById(details.getRepairId());
|
RepairAuditDetails dto;
|
||||||
// 根据taskId修改repair_apply_record的status状态为已审核1
|
if (CollectionUtil.isEmpty(dtoArray)) {
|
||||||
repairApplyDetailsMapper.updateRepairApplyDetailsAfterAudit(dto);
|
dto = repairApplyDetailsMapper.selectById(details.getRepairId());
|
||||||
List<ScrapApplyDetails> list = scrapApplyDetailsMapper.selectScrapByTaskId(dto);
|
// 根据taskId修改repair_apply_record的status状态为已审核1
|
||||||
|
repairApplyDetailsMapper.updateRepairApplyDetailsAfterAudit(dto);
|
||||||
|
} else {
|
||||||
|
dto = dtoArray.stream().filter(dto1 -> dto1.getRepairId().equals(details.getRepairId())).findFirst().orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ScrapApplyDetails> list;
|
||||||
|
if (CollectionUtil.isNotEmpty(listAll)) {
|
||||||
|
list = listAll.stream().filter(item -> {
|
||||||
|
if (dto != null) {
|
||||||
|
return item.getTaskId().equals(dto.getTaskId());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
} else {
|
||||||
|
list = scrapApplyDetailsMapper.selectScrapByTaskId(dto);
|
||||||
|
}
|
||||||
|
|
||||||
if (details.getRepairedNum().compareTo(BigDecimal.ZERO) > 0) {
|
if (details.getRepairedNum().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
//修改机具状态为修试后待入库
|
//修改机具状态为修试后待入库
|
||||||
if (null != details.getMaId()) {
|
if (null != details.getMaId()) {
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,11 @@ public interface ScrapApplyDetailsMapper {
|
||||||
*/
|
*/
|
||||||
List<ScrapApplyDetails> selectScrapByTaskId(RepairAuditDetails dto);
|
List<ScrapApplyDetails> selectScrapByTaskId(RepairAuditDetails dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量根据任务id数组查询报废详情
|
||||||
|
*/
|
||||||
|
List<ScrapApplyDetails> selectScrapByTaskIdList(@Param("list") List<RepairAuditDetails> list);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 台账审核
|
* 台账审核
|
||||||
* @param scrapApplyDetails
|
* @param scrapApplyDetails
|
||||||
|
|
|
||||||
|
|
@ -1445,9 +1445,6 @@ public class SltAgreementInfoController extends BaseController {
|
||||||
@ApiOperation(value = "未结算报表list查询")
|
@ApiOperation(value = "未结算报表list查询")
|
||||||
@GetMapping("/getSltReportList")
|
@GetMapping("/getSltReportList")
|
||||||
public TableDataInfo getSltReportList(SltAgreementInfo query) {
|
public TableDataInfo getSltReportList(SltAgreementInfo query) {
|
||||||
// ----------- 定义返回集合 ------------
|
|
||||||
List<SltInfoVo> resultList = new ArrayList<>();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// ----------- 查询列表 ---------------
|
// ----------- 查询列表 ---------------
|
||||||
List<SltAgreementInfo> list = sltAgreementInfoService.getSltReportList(query);
|
List<SltAgreementInfo> list = sltAgreementInfoService.getSltReportList(query);
|
||||||
|
|
@ -1457,12 +1454,14 @@ public class SltAgreementInfoController extends BaseController {
|
||||||
// 设置结算权限,控制展示
|
// 设置结算权限,控制展示
|
||||||
list.forEach(info -> info.setSettlementType(settlementType));
|
list.forEach(info -> info.setSettlementType(settlementType));
|
||||||
|
|
||||||
|
// --------- 定义返回集合 ------------------
|
||||||
List<SltInfoVo> dataList = new ArrayList<>();
|
List<SltInfoVo> dataList = new ArrayList<>();
|
||||||
SltInfoVo bean = new SltInfoVo();
|
// --------- 拿到list中所有的agreementId存成集合,给每个info赋值 ------------------
|
||||||
|
List<Long> AgreementIdsArray = list.stream().map(SltAgreementInfo::getAgreementId).collect(Collectors.toList());
|
||||||
|
|
||||||
// 把每个对象的agreementId设置成集合,避免重复查询
|
// 把每个对象的agreementId设置成集合,避免重复查询
|
||||||
list.forEach(info -> {
|
list.forEach(info -> {
|
||||||
info.setAgreementIds(list.stream().map(SltAgreementInfo::getAgreementId).collect(Collectors.toList()));
|
info.setAgreementIds(AgreementIdsArray);
|
||||||
SltInfoVo vo = sltAgreementInfoService.getSltInfoReportBatch(info);
|
SltInfoVo vo = sltAgreementInfoService.getSltInfoReportBatch(info);
|
||||||
if (vo != null && !ObjectUtil.isEmpty(vo)) {
|
if (vo != null && !ObjectUtil.isEmpty(vo)) {
|
||||||
vo.setAgreementId(info.getAgreementId());
|
vo.setAgreementId(info.getAgreementId());
|
||||||
|
|
|
||||||
|
|
@ -796,6 +796,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
insert into bm_exit_permit (material,name,car_code,add_date,create_by,create_time)
|
insert into bm_exit_permit (material,name,car_code,add_date,create_by,create_time)
|
||||||
values (#{material}, #{name}, #{carCode}, #{addDate}, #{createBy}, now())
|
values (#{material}, #{name}, #{carCode}, #{addDate}, #{createBy}, now())
|
||||||
</insert>
|
</insert>
|
||||||
|
<insert id="syncProject" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
INSERT INTO archives_record_info
|
||||||
|
(
|
||||||
|
parent_id,`level`,archives_value,archives_name,del_flag,create_time
|
||||||
|
) VALUES (
|
||||||
|
'22','2',#{proId},#{proName},'0',NOW()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="syncProjectDetails">
|
||||||
|
INSERT INTO archives_record_details
|
||||||
|
(
|
||||||
|
info_id,parent_id,`level`,doc_name,doc_type,del_flag,create_time
|
||||||
|
) VALUES (
|
||||||
|
#{id},'0','1',#{typeName},'文件夹','0',NOW()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
<delete id="deleteBackApply">
|
<delete id="deleteBackApply">
|
||||||
delete from back_apply_info where id = #{id}
|
delete from back_apply_info where id = #{id}
|
||||||
|
|
@ -1558,4 +1574,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_user su
|
from sys_user su
|
||||||
where su.user_id = 474 and su.del_flag = 0
|
where su.user_id = 474 and su.del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectNotSyncProject" resultType="com.bonus.material.back.domain.BackApplyInfo">
|
||||||
|
SELECT
|
||||||
|
pro_id as proId,
|
||||||
|
pro_name as proName
|
||||||
|
FROM
|
||||||
|
bm_project
|
||||||
|
WHERE
|
||||||
|
del_flag='0'
|
||||||
|
and pro_id not in (
|
||||||
|
SELECT
|
||||||
|
archives_value
|
||||||
|
FROM
|
||||||
|
archives_record_info
|
||||||
|
WHERE
|
||||||
|
parent_id='22'
|
||||||
|
and archives_value is not null
|
||||||
|
)
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -490,8 +490,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mi.ma_name as materialName,
|
mi.ma_name as materialName,
|
||||||
mi.ma_model as materialModel,
|
mi.ma_model as materialModel,
|
||||||
mi.ma_code as maCode,
|
mi.ma_code as maCode,
|
||||||
mi.this_check_time as thisCheckTime,
|
LEFT(mi.this_check_time, 10) AS thisCheckTime,
|
||||||
mi.next_check_time as nextCheckTime,
|
LEFT(mi.next_check_time, 10) AS nextCheckTime,
|
||||||
mi.repair_man as repairMan,
|
mi.repair_man as repairMan,
|
||||||
mi.check_man as checkMan,
|
mi.check_man as checkMan,
|
||||||
mi.phone,
|
mi.phone,
|
||||||
|
|
@ -500,15 +500,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
'1' as devType
|
'1' as devType
|
||||||
FROM
|
FROM
|
||||||
ws_ma_info mi
|
ws_ma_info mi
|
||||||
WHERE mi.ma_code LIKE CONCAT('%',#{maCode},'%') and mi.is_active = 1 and DATEDIFF(mi.next_check_time,NOW()) > 0
|
WHERE mi.ma_code LIKE CONCAT('%',#{maCode},'%') and mi.is_active = 1
|
||||||
UNION
|
UNION
|
||||||
SELECT
|
SELECT
|
||||||
mm.ma_id AS id,
|
mm.ma_id AS id,
|
||||||
mt2.type_name as maName,
|
mt2.type_name as maName,
|
||||||
mt.type_name as maModel,
|
mt.type_name as maModel,
|
||||||
mm.ma_code as maCode,
|
mm.ma_code as maCode,
|
||||||
mm.this_check_time as thisCheckTime,
|
LEFT(mm.this_check_time, 10) AS thisCheckTime,
|
||||||
mm.next_check_time as nextCheckTime,
|
LEFT(mm.next_check_time, 10) AS nextCheckTime,
|
||||||
mm.check_man as repairMan,
|
mm.check_man as repairMan,
|
||||||
ifnull(mm.inspect_man,"高民") as checkMan,
|
ifnull(mm.inspect_man,"高民") as checkMan,
|
||||||
"0551-63703966" as phone,
|
"0551-63703966" as phone,
|
||||||
|
|
@ -518,7 +518,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
FROM ma_machine mm
|
FROM ma_machine mm
|
||||||
LEFT JOIN ma_type mt on mm.type_id = mt.type_id
|
LEFT JOIN ma_type mt on mm.type_id = mt.type_id
|
||||||
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||||
WHERE mm.ma_code LIKE CONCAT('%',#{maCode},'%') and mt.MANAGE_TYPE =0 and DATEDIFF(mm.next_check_time,NOW()) > 0
|
WHERE mm.ma_code LIKE CONCAT('%',#{maCode},'%') and mt.MANAGE_TYPE =0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteMachineByMaCodeAndTypeId">
|
<delete id="deleteMachineByMaCodeAndTypeId">
|
||||||
|
|
|
||||||
|
|
@ -260,4 +260,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectRepairCodeByIds" resultType="com.bonus.material.repair.domain.RepairAuditDetails">
|
||||||
|
select
|
||||||
|
id as repairId,
|
||||||
|
task_id as taskId,
|
||||||
|
type_id as typeId,
|
||||||
|
ma_id as maId,
|
||||||
|
level as level
|
||||||
|
from repair_apply_details
|
||||||
|
where id in
|
||||||
|
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateRepairApplyDetailsAfterAuditBatch">
|
||||||
|
update repair_apply_record
|
||||||
|
set status = 1,
|
||||||
|
update_time = NOW()
|
||||||
|
where task_id in
|
||||||
|
<foreach item="obj" collection="list" open="(" separator="," close=")">
|
||||||
|
#{obj.taskId}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -579,4 +579,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND m.type_id = #{typeId}
|
AND m.type_id = #{typeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectScrapByTaskIdList" resultType="com.bonus.material.scrap.domain.ScrapApplyDetails">
|
||||||
|
SELECT
|
||||||
|
task_id AS taskId,
|
||||||
|
ma_id AS maId,
|
||||||
|
type_id AS typeId,
|
||||||
|
GROUP_CONCAT(DISTINCT scrap_reason) AS scrapReason,
|
||||||
|
GROUP_CONCAT(DISTINCT scrap_type) AS scrapType,
|
||||||
|
GROUP_CONCAT(DISTINCT create_by) AS createBy
|
||||||
|
FROM repair_apply_record rc
|
||||||
|
WHERE rc.repair_type = '3'
|
||||||
|
<if test="list != null and list.size > 0">
|
||||||
|
AND (
|
||||||
|
<foreach collection="list" item="t" separator=" OR ">
|
||||||
|
(
|
||||||
|
rc.task_id = #{t.taskId}
|
||||||
|
AND rc.type_id = #{t.typeId}
|
||||||
|
<if test="t.maId != null">
|
||||||
|
AND rc.ma_id = #{t.maId}
|
||||||
|
</if>
|
||||||
|
<if test="t.maId == null">
|
||||||
|
AND rc.ma_id IS NULL
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
GROUP BY rc.task_id, rc.ma_id, rc.type_id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -197,11 +197,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id
|
LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id
|
||||||
LEFT JOIN slt_agreement_apply saa on saa.agreement_id = bai.agreement_id
|
LEFT JOIN slt_agreement_apply saa on saa.agreement_id = bai.agreement_id
|
||||||
where bai.status = '1' AND bui.type_id != '1731'
|
where bai.status = '1' AND bui.type_id != '1731'
|
||||||
<if test="unitIds != null">
|
<if test="unitIds != null and unitIds.size() > 0">
|
||||||
and bui.unit_id in
|
and bui.unit_id in
|
||||||
<foreach item="item" index="index" collection="unitIds" open="(" separator="," close=")">
|
<foreach item="item" index="index" collection="unitIds" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="projectId != null and projectId != ''">
|
<if test="projectId != null and projectId != ''">
|
||||||
and bp.pro_id = #{projectId}
|
and bp.pro_id = #{projectId}
|
||||||
|
|
@ -209,6 +209,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="sltStatus != null">
|
<if test="sltStatus != null">
|
||||||
and bai.is_slt = #{sltStatus}
|
and bai.is_slt = #{sltStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="agreementCode != null">
|
||||||
|
and bai.agreement_code like concat('%',#{agreementCode},'%')
|
||||||
|
</if>
|
||||||
GROUP BY bai.agreement_id
|
GROUP BY bai.agreement_id
|
||||||
ORDER BY bai.create_time desc
|
ORDER BY bai.create_time desc
|
||||||
<!-- <choose>-->
|
<!-- <choose>-->
|
||||||
|
|
@ -855,6 +858,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="sltStatus != null">
|
<if test="sltStatus != null">
|
||||||
and bai.is_slt = #{sltStatus}
|
and bai.is_slt = #{sltStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="agreementCode != null and agreementCode != ''">
|
||||||
|
and bai.agreement_code = #{agreementCode}
|
||||||
|
</if>
|
||||||
GROUP BY bai.agreement_id
|
GROUP BY bai.agreement_id
|
||||||
ORDER BY bai.create_time desc
|
ORDER BY bai.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue