Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
c45b2bae11
|
|
@ -271,7 +271,7 @@ public class TmTaskController extends BaseController {
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error("创建任务失败");
|
return AjaxResult.error("创建任务失败");
|
||||||
}
|
}
|
||||||
UrgentProcessingUser urgentProcessingUser = new UrgentProcessingUser();
|
/* UrgentProcessingUser urgentProcessingUser = new UrgentProcessingUser();
|
||||||
urgentProcessingUser.setCompanyId(Long.valueOf(task.getCompanyId()));
|
urgentProcessingUser.setCompanyId(Long.valueOf(task.getCompanyId()));
|
||||||
urgentProcessingUser.setTaskTypeId(task.getTaskType());
|
urgentProcessingUser.setTaskTypeId(task.getTaskType());
|
||||||
urgentProcessingUser.setDeptId(SecurityUtils.getLoginUser().getSysUser().getDeptId());
|
urgentProcessingUser.setDeptId(SecurityUtils.getLoginUser().getSysUser().getDeptId());
|
||||||
|
|
@ -279,12 +279,12 @@ public class TmTaskController extends BaseController {
|
||||||
case 30:
|
case 30:
|
||||||
urgentProcessingUser.setTaskStatus(TaskStatusEnum.STAY_BRANCH_AUDIT.getInfo());
|
urgentProcessingUser.setTaskStatus(TaskStatusEnum.STAY_BRANCH_AUDIT.getInfo());
|
||||||
break;
|
break;
|
||||||
/* case 31:
|
case 31:
|
||||||
urgentProcessingUser.setTaskStatus(TaskStatusEnum.STAY_RESPONSIBLE_DEPARTMENT_AUDIT.getInfo());
|
urgentProcessingUser.setTaskStatus(TaskStatusEnum.STAY_RESPONSIBLE_DEPARTMENT_AUDIT.getInfo());
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
urgentProcessingUser.setTaskStatus(TaskStatusEnum.STAY_INTERNAL_AUDIT.getInfo());
|
urgentProcessingUser.setTaskStatus(TaskStatusEnum.STAY_INTERNAL_AUDIT.getInfo());
|
||||||
break;*/
|
break;
|
||||||
}
|
}
|
||||||
List<SysUser> userList = remoteUserService.processingUser(urgentProcessingUser).getData();
|
List<SysUser> userList = remoteUserService.processingUser(urgentProcessingUser).getData();
|
||||||
if (userList.size()>0) {
|
if (userList.size()>0) {
|
||||||
|
|
@ -300,7 +300,7 @@ public class TmTaskController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
return AjaxResult.success("任务创建成功");
|
return AjaxResult.success("任务创建成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return AjaxResult.error("创建任务失败," + e.getCause().toString() + "," + e.getMessage());
|
return AjaxResult.error("创建任务失败," + e.getCause().toString() + "," + e.getMessage());
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//短信通知人员进行出库
|
//短信通知人员进行出库
|
||||||
for (LeaseApplyDetails details : leaseApplyDetails) {
|
/* for (LeaseApplyDetails details : leaseApplyDetails) {
|
||||||
//内部审核以后通知机具管理人进行出库
|
//内部审核以后通知机具管理人进行出库
|
||||||
set = smsNotification(details, record.getCode(), set);
|
set = smsNotification(details, record.getCode(), set);
|
||||||
}
|
}
|
||||||
|
|
@ -163,7 +163,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("手机号为:{}发送短信失败", str);
|
log.info("手机号为:{}发送短信失败", str);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
} else if (record.getTaskStatus() == 32 && companyId != null) {
|
} else if (record.getTaskStatus() == 32 && companyId != null) {
|
||||||
// 再审核领料任务信息表
|
// 再审核领料任务信息表
|
||||||
List<LeaseApplyInfo> leaseApplyInfoList = record.getLeaseApplyInfoList();
|
List<LeaseApplyInfo> leaseApplyInfoList = record.getLeaseApplyInfoList();
|
||||||
|
|
@ -210,7 +210,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sendMessageToLeader(record);
|
// sendMessageToLeader(record);
|
||||||
} else {
|
} else {
|
||||||
// 先审核任务表
|
// 先审核任务表
|
||||||
result += tmTaskMapper.updateTmTaskAuditStatus(record);
|
result += tmTaskMapper.updateTmTaskAuditStatus(record);
|
||||||
|
|
@ -234,7 +234,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sendMessageToLeader(record);
|
// sendMessageToLeader(record);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -115,10 +115,15 @@ public class ScrapApplyDetailsController extends BaseController {
|
||||||
return AjaxResult.success(0);
|
return AjaxResult.success(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<ScrapApplyDetails> collect = list.stream().filter(t -> t.getBackStatus() == 3).collect(Collectors.toList());
|
for (ScrapApplyDetails applyDetails : list) {
|
||||||
if (collect.size() > 0) {
|
String[] split = applyDetails.getParentIds().split(",");
|
||||||
//全部退料,但存在报废机具
|
for (String parentId : split) {
|
||||||
return AjaxResult.success(1);
|
int count = scrapApplyDetailsService.getscrapCheckDetails(parentId);
|
||||||
|
if (count > 0){
|
||||||
|
//全部退料,但存在报废机具
|
||||||
|
return AjaxResult.success(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//全部退料,不存在报废机具
|
//全部退料,不存在报废机具
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class BackApplyInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 任务ID
|
* 任务ID
|
||||||
*/
|
*/
|
||||||
private Integer parentId;
|
private String parentId;
|
||||||
private String badId;
|
private String badId;
|
||||||
private String[] split;
|
private String[] split;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,9 @@ public class ScrapApplyDetails extends BaseEntity
|
||||||
/** 上级ID */
|
/** 上级ID */
|
||||||
@ApiModelProperty(value = "上级ID")
|
@ApiModelProperty(value = "上级ID")
|
||||||
private Long parentId;
|
private Long parentId;
|
||||||
|
/** 上级ID */
|
||||||
|
@ApiModelProperty(value = "上级ID")
|
||||||
|
private String parentIds;
|
||||||
|
|
||||||
/** 机具ID */
|
/** 机具ID */
|
||||||
@ApiModelProperty(value = "机具ID")
|
@ApiModelProperty(value = "机具ID")
|
||||||
|
|
@ -103,6 +106,8 @@ public class ScrapApplyDetails extends BaseEntity
|
||||||
private Integer preNum;
|
private Integer preNum;
|
||||||
@ApiModelProperty(value = "待退料数量")
|
@ApiModelProperty(value = "待退料数量")
|
||||||
private Integer num;
|
private Integer num;
|
||||||
|
@ApiModelProperty(value = "待退料数量")
|
||||||
|
private Integer codeNum;
|
||||||
|
|
||||||
@ApiModelProperty(value = "机具类型名称")
|
@ApiModelProperty(value = "机具类型名称")
|
||||||
private String machineTypeName;
|
private String machineTypeName;
|
||||||
|
|
@ -144,7 +149,7 @@ public class ScrapApplyDetails extends BaseEntity
|
||||||
private Integer pageNum;
|
private Integer pageNum;
|
||||||
|
|
||||||
/** 退料状态(1合格,2维修,3待报废) */
|
/** 退料状态(1合格,2维修,3待报废) */
|
||||||
private Integer backStatus;
|
private String backStatus;
|
||||||
|
|
||||||
/** 每页显示记录数 */
|
/** 每页显示记录数 */
|
||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ public interface ScrapApplyDetailsMapper {
|
||||||
|
|
||||||
int updateMaStatus(@Param("maId") int maId, @Param("maStatus") String maStatus);
|
int updateMaStatus(@Param("maId") int maId, @Param("maStatus") String maStatus);
|
||||||
|
|
||||||
int selectNumByTypeId(@Param("parentId") Integer parentId, @Param("typeId") String typeId);
|
int selectNumByTypeId(@Param("parentId") String parentId, @Param("typeId") String typeId);
|
||||||
|
|
||||||
int selectCodeByMaIdAndTaskId(@Param("maId") Integer maId, @Param("taskId") Integer taskId);
|
int selectCodeByMaIdAndTaskId(@Param("maId") Integer maId, @Param("taskId") Integer taskId);
|
||||||
|
|
||||||
|
|
@ -226,4 +226,6 @@ public interface ScrapApplyDetailsMapper {
|
||||||
int insertSad(BackApplyInfo bf);
|
int insertSad(BackApplyInfo bf);
|
||||||
|
|
||||||
Integer selectTaskNumByMonthWx(@Param("date") Date date, @Param("taskType") Integer taskType);
|
Integer selectTaskNumByMonthWx(@Param("date") Date date, @Param("taskType") Integer taskType);
|
||||||
|
|
||||||
|
int getscrapCheckDetails(String parentId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,4 +102,6 @@ public interface TaskMapper {
|
||||||
int insertTt(BackApplyInfo applyInfo);
|
int insertTt(BackApplyInfo applyInfo);
|
||||||
|
|
||||||
int updateTaskStatus(@Param("taskId") long taskId, @Param("status") int status);
|
int updateTaskStatus(@Param("taskId") long taskId, @Param("status") int status);
|
||||||
|
|
||||||
|
int updateTaskCommit(Long taskId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -168,4 +168,6 @@ public interface IScrapApplyDetailsService
|
||||||
List<ScrapApplyDetails> getScrapRefuseIsSuc(ScrapApplyDetails scrapApplyDetails);
|
List<ScrapApplyDetails> getScrapRefuseIsSuc(ScrapApplyDetails scrapApplyDetails);
|
||||||
|
|
||||||
int endback(ScrapAudit scrapAudit);
|
int endback(ScrapAudit scrapAudit);
|
||||||
|
|
||||||
|
int getscrapCheckDetails(String parentId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -546,11 +546,10 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BackApplyInfo> backReceiveRecordWebPt(BackApplyInfo record) {
|
public List<BackApplyInfo> backReceiveRecordWebPt(BackApplyInfo record) {
|
||||||
String typeId = record.getTypeId();
|
String[] split = record.getParentId().split(",");
|
||||||
String[] split = typeId.split(",");
|
|
||||||
List<BackApplyInfo> backApplyInfoList = new ArrayList<>();
|
List<BackApplyInfo> backApplyInfoList = new ArrayList<>();
|
||||||
for (String s : split) {
|
for (String s : split) {
|
||||||
record.setTypeId(s);
|
record.setParentId(s);
|
||||||
BackApplyInfo backApplyInfo = scrapApplyDetailsMapper.scrapReceiveRecordWebPt(record);
|
BackApplyInfo backApplyInfo = scrapApplyDetailsMapper.scrapReceiveRecordWebPt(record);
|
||||||
if (backApplyInfo != null) {
|
if (backApplyInfo != null) {
|
||||||
backApplyInfoList.add(backApplyInfo);
|
backApplyInfoList.add(backApplyInfo);
|
||||||
|
|
@ -565,9 +564,9 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
public int endback(ScrapAudit scrapAudit) {
|
public int endback(ScrapAudit scrapAudit) {
|
||||||
int res;
|
int res = 0;
|
||||||
//参数校验 后期可以考虑写一个校验的工具类
|
//参数校验 后期可以考虑写一个校验的工具类
|
||||||
List<Integer> deptIds = scrapAudit.getDeptIds();
|
List<Integer> deptIds = scrapAudit.getDeptIds();
|
||||||
Long taskId = scrapAudit.getTaskId();
|
Long taskId = scrapAudit.getTaskId();
|
||||||
|
|
@ -580,10 +579,11 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
||||||
if (taskStatus == 0) {
|
if (taskStatus == 0) {
|
||||||
throw new RuntimeException("该退料单已完成退料");
|
throw new RuntimeException("该退料单已完成退料");
|
||||||
}
|
}
|
||||||
//修改任务状态为报废审核进行中
|
//修改任务为已提交 但是任务状态不变
|
||||||
res = updateTaskStatus(taskId, 59);
|
res = updateTaskCommit(taskId);
|
||||||
|
// res = updateTaskStatus(taskId, 59);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
throw new RuntimeException("tm_task修改状态");
|
throw new RuntimeException("tm_task修改提交状态");
|
||||||
}
|
}
|
||||||
//更加退料接收的数据创建下一步流程
|
//更加退料接收的数据创建下一步流程
|
||||||
//合格的插入入库记录input_apply_details,修改库存ma_type,修改机具状态
|
//合格的插入入库记录input_apply_details,修改库存ma_type,修改机具状态
|
||||||
|
|
@ -644,6 +644,18 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getscrapCheckDetails(String parentId) {
|
||||||
|
int i = scrapApplyDetailsMapper.getscrapCheckDetails(parentId);
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int updateTaskCommit(Long taskId) {
|
||||||
|
int res;
|
||||||
|
res = taskMapper.updateTaskCommit(taskId);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
private int insertSad(int taskId, List<BackApplyInfo> list) {
|
private int insertSad(int taskId, List<BackApplyInfo> list) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
|
|
@ -724,8 +736,8 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
||||||
code = TaskTypeConstants.WX;
|
code = TaskTypeConstants.WX;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TaskTypeEnum.RETURNED_MATERIALS_TO_BE_SCRAPPED.getCode().equals(taskType)) {
|
if (TaskTypeEnum.SCRAP_TASK.getCode().equals(taskType)) {
|
||||||
code = TaskTypeConstants.YBF;
|
code = TaskTypeConstants.BF;
|
||||||
}
|
}
|
||||||
code = code + format + "-" + taskNumStr;
|
code = code + format + "-" + taskNumStr;
|
||||||
return code;
|
return code;
|
||||||
|
|
@ -785,17 +797,20 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
if (record != null) {
|
if (record != null) {
|
||||||
String manageType = record.getManageType();
|
String manageType = record.getManageType();
|
||||||
if ("0".equals(manageType)) {
|
String parentId = record.getParentId();
|
||||||
List<Integer> maId = scrapApplyDetailsMapper.getMaId(record);
|
for (String pid : parentId.split(",")) {
|
||||||
for (Integer s : maId) {
|
record.setParentId(pid);
|
||||||
//机具状态变为在用
|
if ("0".equals(manageType)) {
|
||||||
scrapApplyDetailsMapper.updateMaStatus(s, "16");
|
List<Integer> maId = scrapApplyDetailsMapper.getMaId(record);
|
||||||
|
for (Integer a : maId) {
|
||||||
|
//机具状态变为退料待报废
|
||||||
|
scrapApplyDetailsMapper.updateMaStatus(a, "20");
|
||||||
|
}
|
||||||
|
res = scrapApplyDetailsMapper.deleteCheckDetails(record);
|
||||||
|
} else {
|
||||||
|
res = scrapApplyDetailsMapper.deleteCheckDetails(record);
|
||||||
}
|
}
|
||||||
res = scrapApplyDetailsMapper.deleteCheckDetails(record);
|
|
||||||
} else {
|
|
||||||
res = scrapApplyDetailsMapper.deleteCheckDetails(record);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
@ -820,8 +835,8 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
||||||
scrapApplyDetailsMapper.updateMaStatus(maId, "17");
|
scrapApplyDetailsMapper.updateMaStatus(maId, "17");
|
||||||
}
|
}
|
||||||
if ("3".equals(backStatus)) {
|
if ("3".equals(backStatus)) {
|
||||||
//退料待报废状态变为退料待报废20
|
//退料待报废状态变为报废待审核
|
||||||
scrapApplyDetailsMapper.updateMaStatus(maId, "20");
|
scrapApplyDetailsMapper.updateMaStatus(maId, "124");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -412,7 +412,7 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
|
||||||
BackApplyInfo backCheckDetails = new BackApplyInfo();
|
BackApplyInfo backCheckDetails = new BackApplyInfo();
|
||||||
for (BackApplyInfo backApplyInfo2 : backApplyInfoList) {
|
for (BackApplyInfo backApplyInfo2 : backApplyInfoList) {
|
||||||
if (backApplyInfo1.getCompanyId().equals(backApplyInfo2.getCompanyId())) {
|
if (backApplyInfo1.getCompanyId().equals(backApplyInfo2.getCompanyId())) {
|
||||||
backCheckDetails.setParentId(backApplyInfo2.getId().intValue());
|
backCheckDetails.setParentId(backApplyInfo2.getId().toString());
|
||||||
backCheckDetails.setTypeId(backApplyInfo1.getTypeId());
|
backCheckDetails.setTypeId(backApplyInfo1.getTypeId());
|
||||||
backCheckDetails.setMaId(backApplyInfo1.getMaId());
|
backCheckDetails.setMaId(backApplyInfo1.getMaId());
|
||||||
backCheckDetails.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
backCheckDetails.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,10 @@ public class ScrapApplyDetailsVO {
|
||||||
* 报废来源
|
* 报废来源
|
||||||
*/
|
*/
|
||||||
private Integer scrapSource;
|
private Integer scrapSource;
|
||||||
|
/**
|
||||||
|
* 是否提交
|
||||||
|
*/
|
||||||
|
private Integer commit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*退料单号
|
*退料单号
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
sad.scrap_num as scrapNum2,
|
sad.scrap_num as scrapNum2,
|
||||||
sad.scrap_source as scrapSource,
|
sad.scrap_source as scrapSource,
|
||||||
sad.file_url as fileUrl,
|
sad.file_url as fileUrl,
|
||||||
|
tk.is_commit as commit,
|
||||||
tk.task_id taskId
|
tk.task_id taskId
|
||||||
FROM
|
FROM
|
||||||
tm_task tk
|
tm_task tk
|
||||||
|
|
@ -271,7 +272,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="scrapReason != null and scrapReason != ''">
|
<if test="scrapReason != null and scrapReason != ''">
|
||||||
scrap_reason,
|
scrap_reason,
|
||||||
</if>
|
</if>
|
||||||
<if test="scrapType != null and scrapType != ''">
|
<if test="scrapType != null">
|
||||||
scrap_type,
|
scrap_type,
|
||||||
</if>
|
</if>
|
||||||
<if test="fileUrl != null and fileUrl != ''">
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
|
|
@ -311,7 +312,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="scrapReason != null and scrapReason != ''">
|
<if test="scrapReason != null and scrapReason != ''">
|
||||||
#{scrapReason},
|
#{scrapReason},
|
||||||
</if>
|
</if>
|
||||||
<if test="scrapType != null and scrapType != ''">
|
<if test="scrapType != null">
|
||||||
#{scrapType},
|
#{scrapType},
|
||||||
</if>
|
</if>
|
||||||
<if test="fileUrl != null and fileUrl != ''">
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
|
|
@ -512,7 +513,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="scrapReason != null and scrapReason != ''">
|
<if test="scrapReason != null and scrapReason != ''">
|
||||||
remark,
|
remark,
|
||||||
</if>
|
</if>
|
||||||
<if test="scrapType != null and scrapType != ''">
|
<if test="scrapType != null">
|
||||||
scrap_type,
|
scrap_type,
|
||||||
</if>
|
</if>
|
||||||
<if test="fileUrl != null and fileUrl != ''">
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
|
|
@ -547,7 +548,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="scrapReason != null and scrapReason != ''">
|
<if test="scrapReason != null and scrapReason != ''">
|
||||||
#{scrapReason},
|
#{scrapReason},
|
||||||
</if>
|
</if>
|
||||||
<if test="scrapType != null and scrapType != ''">
|
<if test="scrapType != null">
|
||||||
#{scrapType},
|
#{scrapType},
|
||||||
</if>
|
</if>
|
||||||
<if test="fileUrl != null and fileUrl != ''">
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
|
|
@ -917,17 +918,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getScrapRefuseList" resultType="com.bonus.sgzb.material.domain.ScrapApplyDetails">
|
<select id="getScrapRefuseList" resultType="com.bonus.sgzb.material.domain.ScrapApplyDetails">
|
||||||
SELECT
|
SELECT
|
||||||
sum( sad.scrap_num ) AS preNum,
|
sum( sad.scrap_num ) AS preNum,
|
||||||
sum( sad.scrap_num ) - IFNULL(sum( scd.back_num ),0) AS num,
|
sum( sad.scrap_num ) - IFNULL( sum( aa.back_num ), 0 ) AS num,
|
||||||
mt.type_name specificationType,
|
mt.type_name specificationType,
|
||||||
mt1.type_name machineTypeName,
|
mt1.type_name machineTypeName,
|
||||||
mt.manage_type,
|
mt.manage_type,
|
||||||
sad.parent_id,
|
sad.parent_id,
|
||||||
|
GROUP_CONCAT( sad.parent_id ) parentIds,
|
||||||
mt.type_id
|
mt.type_id
|
||||||
FROM
|
FROM
|
||||||
scrap_apply_details sad
|
scrap_apply_details sad
|
||||||
LEFT JOIN scrap_check_details scd on sad.parent_id = scd.parent_id and sad.type_id = scd.type_id
|
LEFT JOIN (
|
||||||
LEFT JOIN ma_type mt ON sad.type_id = mt.type_id
|
SELECT
|
||||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
sum( scd1.back_num ) back_num,
|
||||||
|
scd1.parent_id,
|
||||||
|
sad1.type_id
|
||||||
|
FROM
|
||||||
|
scrap_check_details scd1
|
||||||
|
LEFT JOIN scrap_apply_details sad1 ON scd1.parent_id = sad1.parent_id
|
||||||
|
AND scd1.type_id = sad1.type_id
|
||||||
|
GROUP BY
|
||||||
|
scd1.parent_id, sad1.type_id
|
||||||
|
) aa ON sad.parent_id = aa.parent_id AND sad.type_id = aa.type_id
|
||||||
|
LEFT JOIN ma_type mt ON sad.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
WHERE
|
WHERE
|
||||||
sad.task_id = #{taskId}
|
sad.task_id = #{taskId}
|
||||||
GROUP BY
|
GROUP BY
|
||||||
|
|
@ -942,6 +955,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mma.ma_code maCode,
|
mma.ma_code maCode,
|
||||||
mma.ma_id,
|
mma.ma_id,
|
||||||
sad.type_id,
|
sad.type_id,
|
||||||
|
sad.parent_id,
|
||||||
sd.`name` maStatus
|
sd.`name` maStatus
|
||||||
FROM
|
FROM
|
||||||
scrap_apply_details sad
|
scrap_apply_details sad
|
||||||
|
|
@ -952,6 +966,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE
|
WHERE
|
||||||
sad.task_id = #{taskId}
|
sad.task_id = #{taskId}
|
||||||
AND sad.type_id = #{typeId}
|
AND sad.type_id = #{typeId}
|
||||||
|
AND mma.ma_status = 20
|
||||||
ORDER BY
|
ORDER BY
|
||||||
sad.create_time DESC
|
sad.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -1044,23 +1059,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getScrapRefuseIsSuc" resultType="com.bonus.sgzb.material.domain.ScrapApplyDetails">
|
<select id="getScrapRefuseIsSuc" resultType="com.bonus.sgzb.material.domain.ScrapApplyDetails">
|
||||||
SELECT
|
SELECT
|
||||||
sum( sad.scrap_num ) AS preNum,
|
sum( sad.scrap_num ) AS preNum,
|
||||||
sum( sad.scrap_num ) - IFNULL( sum( scd.back_num ), 0 ) AS num,
|
sum( sad.scrap_num ) - IFNULL( sum( aa.back_num ), 0 ) AS num,
|
||||||
mt.type_name specificationType,
|
mt.type_name specificationType,
|
||||||
mt1.type_name machineTypeName,
|
mt1.type_name machineTypeName,
|
||||||
mt.manage_type,
|
mt.manage_type,
|
||||||
sad.parent_id,
|
sad.parent_id,
|
||||||
mma.ma_code maCode,
|
GROUP_CONCAT( sad.parent_id ) parentIds,
|
||||||
mma.ma_id,
|
|
||||||
scd.back_status,
|
|
||||||
mt.type_id
|
mt.type_id
|
||||||
FROM
|
FROM
|
||||||
scrap_apply_details sad
|
scrap_apply_details sad
|
||||||
LEFT JOIN scrap_check_details scd ON sad.parent_id = scd.parent_id
|
LEFT JOIN (
|
||||||
AND sad.type_id = scd.type_id
|
SELECT
|
||||||
|
sum( scd1.back_num ) back_num,
|
||||||
|
scd1.parent_id,
|
||||||
|
sad1.type_id
|
||||||
|
FROM
|
||||||
|
scrap_check_details scd1
|
||||||
|
LEFT JOIN scrap_apply_details sad1 ON scd1.parent_id = sad1.parent_id
|
||||||
|
AND scd1.type_id = sad1.type_id
|
||||||
|
GROUP BY
|
||||||
|
scd1.parent_id,
|
||||||
|
sad1.type_id
|
||||||
|
) aa ON sad.parent_id = aa.parent_id
|
||||||
|
AND sad.type_id = aa.type_id
|
||||||
LEFT JOIN ma_type mt ON sad.type_id = mt.type_id
|
LEFT JOIN ma_type mt ON sad.type_id = mt.type_id
|
||||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
LEFT JOIN ma_machine mma ON sad.ma_id = mma.ma_id
|
|
||||||
LEFT JOIN sys_dic sd ON mma.ma_status = sd.id
|
|
||||||
WHERE
|
WHERE
|
||||||
sad.task_id = #{taskId}
|
sad.task_id = #{taskId}
|
||||||
GROUP BY
|
GROUP BY
|
||||||
|
|
@ -1118,8 +1141,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
bai.task_id AS taskId,
|
bai.task_id AS taskId,
|
||||||
bcd.type_id AS typeId,
|
bcd.type_id AS typeId,
|
||||||
bcd.back_num AS backNum,
|
bcd.back_num AS backNum,
|
||||||
|
bcd.file_url AS fileUrl,
|
||||||
bcd.parent_id AS parentId,
|
bcd.parent_id AS parentId,
|
||||||
bcd.create_by AS createBy,
|
bcd.create_by AS createBy,
|
||||||
|
bcd.scrap_type AS scrapType,
|
||||||
bcd.ma_id AS maId,
|
bcd.ma_id AS maId,
|
||||||
bai.company_id AS companyId
|
bai.company_id AS companyId
|
||||||
FROM
|
FROM
|
||||||
|
|
@ -1134,4 +1159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectTaskNumByMonthWx" resultType="java.lang.Integer">
|
<select id="selectTaskNumByMonthWx" resultType="java.lang.Integer">
|
||||||
select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') and task_type = #{taskType}
|
select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') and task_type = #{taskType}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getscrapCheckDetails" resultType="java.lang.Integer">
|
||||||
|
select count(*) from scrap_check_details where parent_id = #{parentId} and back_status = '3'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -272,6 +272,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
set task_status=#{status}
|
set task_status=#{status}
|
||||||
where task_id = #{taskId}
|
where task_id = #{taskId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateTaskCommit">
|
||||||
|
update tm_task
|
||||||
|
set is_commit = 1
|
||||||
|
where task_id = #{taskId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteTmTaskByTaskId" parameterType="Long">
|
<delete id="deleteTmTaskByTaskId" parameterType="Long">
|
||||||
delete from tm_task where task_id = #{taskId}
|
delete from tm_task where task_id = #{taskId}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue