Compare commits
7 Commits
15448488d8
...
38de5ca3fd
| Author | SHA1 | Date |
|---|---|---|
|
|
38de5ca3fd | |
|
|
07ab9b64f1 | |
|
|
b7f2c3ba4c | |
|
|
96020c4510 | |
|
|
24c927baa2 | |
|
|
bff877e19b | |
|
|
f8e8651894 |
|
|
@ -41,6 +41,7 @@ public class TokenController {
|
||||||
@Resource
|
@Resource
|
||||||
private RemoteUserService remoteUserService;
|
private RemoteUserService remoteUserService;
|
||||||
|
|
||||||
|
//web端登录
|
||||||
@PostMapping("login")
|
@PostMapping("login")
|
||||||
public R<?> login(@RequestBody LoginBody form) {
|
public R<?> login(@RequestBody LoginBody form) {
|
||||||
// 用户登录
|
// 用户登录
|
||||||
|
|
@ -55,6 +56,14 @@ public class TokenController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//App端登录
|
||||||
|
@PostMapping("loginApp")
|
||||||
|
public R<?> loginApp(@RequestBody LoginBody form) {
|
||||||
|
// 用户登录
|
||||||
|
LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
|
||||||
|
return R.ok(tokenService.createToken(userInfo));
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("sendCode")
|
@PostMapping("sendCode")
|
||||||
public R<?> sendCode(@RequestBody LoginBody form) {
|
public R<?> sendCode(@RequestBody LoginBody form) {
|
||||||
R<Boolean> sendState = remoteUserService.sendCode(form.getPhone());
|
R<Boolean> sendState = remoteUserService.sendCode(form.getPhone());
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,17 @@ public class BackReceiveController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "退料接收-rfid编码查询", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("rfidCodeQuery")
|
||||||
|
public AjaxResult rfidCodeQuery(@RequestBody BackApplyInfo record) {
|
||||||
|
try {
|
||||||
|
List<BackApplyInfo> list =backReceiveService.rfidCodeQuery(record);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Log(title = "退料接收记录", businessType = BusinessType.INSERT)
|
@Log(title = "退料接收记录", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("backReceiveRecord")
|
@PostMapping("backReceiveRecord")
|
||||||
public AjaxResult backReceiveRecord(@RequestBody BackApplyInfo record) {
|
public AjaxResult backReceiveRecord(@RequestBody BackApplyInfo record) {
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,14 @@ public class BackApplyInfo {
|
||||||
private List<BackApplyInfo> backApplyDetails;
|
private List<BackApplyInfo> backApplyDetails;
|
||||||
private Integer parentId;
|
private Integer parentId;
|
||||||
private String sdStatus;
|
private String sdStatus;
|
||||||
|
/**
|
||||||
|
* 二维码编码
|
||||||
|
*/
|
||||||
private String qrCode;
|
private String qrCode;
|
||||||
|
/**
|
||||||
|
* rfid编码
|
||||||
|
*/
|
||||||
|
private String rfidCode;
|
||||||
private String repairedNum;
|
private String repairedNum;
|
||||||
private String backId;
|
private String backId;
|
||||||
private String repairer;
|
private String repairer;
|
||||||
|
|
|
||||||
|
|
@ -57,4 +57,11 @@ public interface BackReceiveMapper {
|
||||||
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
|
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
|
||||||
|
|
||||||
int selectCodeByMaIdAndTaskId(@Param("maId") Integer maId,@Param("taskId") Integer taskId);
|
int selectCodeByMaIdAndTaskId(@Param("maId") Integer maId,@Param("taskId") Integer taskId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收-rfid编码查询
|
||||||
|
* @param record
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
|
List<BackApplyInfo> rfidCodeQuery(BackApplyInfo record);
|
||||||
}
|
}
|
||||||
|
|
@ -21,4 +21,11 @@ public interface BackReceiveService {
|
||||||
List<BackApplyInfo> qrcodeQuery(BackApplyInfo record);
|
List<BackApplyInfo> qrcodeQuery(BackApplyInfo record);
|
||||||
|
|
||||||
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
|
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收-rfid编码查询
|
||||||
|
* @param record
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
|
List<BackApplyInfo> rfidCodeQuery(BackApplyInfo record);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,11 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
return backReceiveMapper.backReceiveRecord(record);
|
return backReceiveMapper.backReceiveRecord(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BackApplyInfo> rfidCodeQuery(BackApplyInfo record) {
|
||||||
|
return backReceiveMapper.rfidCodeQuery(record);
|
||||||
|
}
|
||||||
|
|
||||||
private int insertRad(int taskId, List<BackApplyInfo> wxList) {
|
private int insertRad(int taskId, List<BackApplyInfo> wxList) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if(wxList !=null){
|
if(wxList !=null){
|
||||||
|
|
|
||||||
|
|
@ -340,6 +340,20 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
List<LeaseApplyDetails> listLeaseDetails = new ArrayList<>();
|
List<LeaseApplyDetails> listLeaseDetails = new ArrayList<>();
|
||||||
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
||||||
if (leaseApplyInfo != null) {
|
if (leaseApplyInfo != null) {
|
||||||
|
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||||
|
//获取当前用户所属公司id
|
||||||
|
Long companyId = sysUser.getCompanyId();
|
||||||
|
//获取当前用户的角色
|
||||||
|
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (String s : roles) {
|
||||||
|
sb.append(s);
|
||||||
|
}
|
||||||
|
String rolesStr = sb.toString();
|
||||||
|
//如果是内部人员,加上所属公司
|
||||||
|
if ((rolesStr.contains("jjfgs") && !rolesStr.contains("admin")) || (rolesStr.contains("tsfgs") && !rolesStr.contains("admin"))) {
|
||||||
|
leaseApplyInfo.setCompanyId(Integer.parseInt(companyId.toString()));
|
||||||
|
}
|
||||||
// 去查询领料任务详情表
|
// 去查询领料任务详情表
|
||||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
|
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
|
||||||
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package com.bonus.sgzb.base.controller;
|
package com.bonus.sgzb.base.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.bonus.sgzb.base.api.domain.RepairTaskDetails;
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import com.bonus.sgzb.base.domain.*;
|
import com.bonus.sgzb.base.domain.*;
|
||||||
import com.bonus.sgzb.base.domain.vo.DictVo;
|
import com.bonus.sgzb.base.domain.vo.DictVo;
|
||||||
import com.bonus.sgzb.base.service.RepairService;
|
import com.bonus.sgzb.base.service.RepairService;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.bonus.sgzb.base.api.domain;
|
package com.bonus.sgzb.base.domain;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
@ -3,7 +3,7 @@ package com.bonus.sgzb.base.mapper;
|
||||||
import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
||||||
import com.bonus.sgzb.base.domain.RepairPartDetails;
|
import com.bonus.sgzb.base.domain.RepairPartDetails;
|
||||||
import com.bonus.sgzb.base.domain.RepairTask;
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
import com.bonus.sgzb.base.api.domain.RepairTaskDetails;
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import com.bonus.sgzb.base.domain.vo.DictVo;
|
import com.bonus.sgzb.base.domain.vo.DictVo;
|
||||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package com.bonus.sgzb.base.service;
|
||||||
|
|
||||||
import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
||||||
import com.bonus.sgzb.base.domain.RepairTask;
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
import com.bonus.sgzb.base.api.domain.RepairTaskDetails;
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import com.bonus.sgzb.base.domain.vo.DictVo;
|
import com.bonus.sgzb.base.domain.vo.DictVo;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package com.bonus.sgzb.base.service.impl;
|
||||||
import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
||||||
import com.bonus.sgzb.base.domain.RepairPartDetails;
|
import com.bonus.sgzb.base.domain.RepairPartDetails;
|
||||||
import com.bonus.sgzb.base.domain.RepairTask;
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
import com.bonus.sgzb.base.api.domain.RepairTaskDetails;
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import com.bonus.sgzb.base.domain.vo.DictVo;
|
import com.bonus.sgzb.base.domain.vo.DictVo;
|
||||||
import com.bonus.sgzb.base.mapper.RepairMapper;
|
import com.bonus.sgzb.base.mapper.RepairMapper;
|
||||||
import com.bonus.sgzb.base.service.RepairService;
|
import com.bonus.sgzb.base.service.RepairService;
|
||||||
|
|
@ -175,7 +175,6 @@ public class RepairServiceImpl implements RepairService {
|
||||||
for (RepairTaskDetails details : detailsList){
|
for (RepairTaskDetails details : detailsList){
|
||||||
details.setCreateBy(loginUser.getUserid());
|
details.setCreateBy(loginUser.getUserid());
|
||||||
details.setTaskId(task.getTaskId());
|
details.setTaskId(task.getTaskId());
|
||||||
details.setCompanyId(task.getCompanyId());
|
|
||||||
mapper.addAuditDetails(details);
|
mapper.addAuditDetails(details);
|
||||||
}
|
}
|
||||||
task.setAgreementId(agreementId);
|
task.setAgreementId(agreementId);
|
||||||
|
|
|
||||||
|
|
@ -749,5 +749,22 @@
|
||||||
AND bai.task_id = #{taskId}
|
AND bai.task_id = #{taskId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="rfidCodeQuery" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||||
|
SELECT
|
||||||
|
mt.type_id as typeId,
|
||||||
|
mm.ma_id as maId,
|
||||||
|
mm.ma_code as maCode,
|
||||||
|
mt.type_name as typeCode,
|
||||||
|
mt2.type_name as typeName,
|
||||||
|
sd.`name` as sdStatus
|
||||||
|
FROM
|
||||||
|
ma_machine mm
|
||||||
|
LEFT JOIN ma_type mt on mt.type_id=mm.type_id
|
||||||
|
LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id
|
||||||
|
LEFT JOIN sys_dic sd on mm.ma_status=sd.id
|
||||||
|
WHERE
|
||||||
|
rfid_code =#{rfidCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -603,6 +603,7 @@
|
||||||
direct_audit_by = #{record.companyAuditBy},
|
direct_audit_by = #{record.companyAuditBy},
|
||||||
direct_audit_time = now(),
|
direct_audit_time = now(),
|
||||||
direct_audit_remark = #{record.companyAuditRemark},
|
direct_audit_remark = #{record.companyAuditRemark},
|
||||||
|
status = #{record.status},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.examineStatusId == 33 and record.examineStatusId == '33'">
|
<if test="record.examineStatusId == 33 and record.examineStatusId == '33'">
|
||||||
update_by = #{record.companyAuditBy},
|
update_by = #{record.companyAuditBy},
|
||||||
|
|
@ -640,6 +641,7 @@
|
||||||
direct_audit_by = #{record.companyAuditBy},
|
direct_audit_by = #{record.companyAuditBy},
|
||||||
direct_audit_time = now(),
|
direct_audit_time = now(),
|
||||||
direct_audit_remark = #{record.companyAuditRemark},
|
direct_audit_remark = #{record.companyAuditRemark},
|
||||||
|
status = #{record.status},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
WHERE
|
WHERE
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@
|
||||||
tt.create_time DESC
|
tt.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRepairMaTypeList" resultType="com.bonus.sgzb.base.api.domain.RepairTaskDetails">
|
<select id="getRepairMaTypeList" resultType="com.bonus.sgzb.base.domain.RepairTaskDetails">
|
||||||
select rad.id as id,
|
select rad.id as id,
|
||||||
rad.task_id as taskId,
|
rad.task_id as taskId,
|
||||||
rad.ma_id as maId,
|
rad.ma_id as maId,
|
||||||
|
|
@ -213,7 +213,7 @@
|
||||||
order by rad.create_time desc
|
order by rad.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getById" resultType="com.bonus.sgzb.base.api.domain.RepairTaskDetails">
|
<select id="getById" resultType="com.bonus.sgzb.base.domain.RepairTaskDetails">
|
||||||
select rad.id as id,
|
select rad.id as id,
|
||||||
rad.repair_num as repairNum,
|
rad.repair_num as repairNum,
|
||||||
rad.repaired_num as repairedNum,
|
rad.repaired_num as repairedNum,
|
||||||
|
|
@ -248,13 +248,14 @@
|
||||||
left join sys_dic s2 on s2.p_id = s1.id
|
left join sys_dic s2 on s2.p_id = s1.id
|
||||||
where s1.value = #{value} and s2.status = 0
|
where s1.value = #{value} and s2.status = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="getDetailsListByTaskId" resultType="com.bonus.sgzb.base.api.domain.RepairTaskDetails">
|
<select id="getDetailsListByTaskId" resultType="com.bonus.sgzb.base.domain.RepairTaskDetails">
|
||||||
select id,
|
select id,
|
||||||
ma_id as maId,
|
ma_id as maId,
|
||||||
type_id as typeId,
|
type_id as typeId,
|
||||||
repair_num as repairNum,
|
repair_num as repairNum,
|
||||||
repaired_num as repairedNum,
|
repaired_num as repairedNum,
|
||||||
scrap_num as scrapNum
|
scrap_num as scrapNum,
|
||||||
|
company_id as companyId
|
||||||
from repair_apply_details
|
from repair_apply_details
|
||||||
where task_id = #{taskId}
|
where task_id = #{taskId}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,11 @@ public class PurchasePartDetails extends BaseEntity
|
||||||
@ApiModelProperty(value = "关键字筛选")
|
@ApiModelProperty(value = "关键字筛选")
|
||||||
private String keyWord;
|
private String keyWord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交入库时间
|
||||||
|
*/
|
||||||
|
private String submitStorageTime;
|
||||||
|
|
||||||
public void setTaskId(Long taskId)
|
public void setTaskId(Long taskId)
|
||||||
{
|
{
|
||||||
this.taskId = taskId;
|
this.taskId = taskId;
|
||||||
|
|
@ -447,6 +452,14 @@ public class PurchasePartDetails extends BaseEntity
|
||||||
this.createTime = createTime;
|
this.createTime = createTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getSubmitStorageTime() {
|
||||||
|
return submitStorageTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubmitStorageTime(String submitStorageTime) {
|
||||||
|
this.submitStorageTime = submitStorageTime;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ public class RepairTaskDetails {
|
||||||
* 机具ID
|
* 机具ID
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "机具ID")
|
@ApiModelProperty(value = "机具ID")
|
||||||
private String maId;
|
private Long maId;
|
||||||
/**
|
/**
|
||||||
* 类型名称
|
* 类型名称
|
||||||
*/
|
*/
|
||||||
|
|
@ -77,12 +77,14 @@ public class RepairTaskDetails {
|
||||||
@ApiModelProperty(value = "维修人")
|
@ApiModelProperty(value = "维修人")
|
||||||
private String repairer;
|
private String repairer;
|
||||||
private String keyword;
|
private String keyword;
|
||||||
private String typeId;
|
private Long typeId;
|
||||||
private Long companyId;
|
private Long companyId;
|
||||||
|
private String remark;
|
||||||
/**
|
/**
|
||||||
* 任务创建人
|
* 任务创建人
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "任务创建人")
|
@ApiModelProperty(value = "任务创建人")
|
||||||
private Long createBy;
|
private Long createBy;
|
||||||
|
private Long backId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,4 +80,6 @@ public interface RepairAuditDetailsMapper
|
||||||
int updateStatus(RepairAuditDetails bean);
|
int updateStatus(RepairAuditDetails bean);
|
||||||
|
|
||||||
int insertRepairDetails(RepairTaskDetails repairTaskDetails);
|
int insertRepairDetails(RepairTaskDetails repairTaskDetails);
|
||||||
|
|
||||||
|
Long getBackId(Long repairId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,10 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
}
|
}
|
||||||
|
|
||||||
if(repairInputList != null && repairInputList.size() > 0){
|
if(repairInputList != null && repairInputList.size() > 0){
|
||||||
companyId = repairInputList.get(0).getCompanyId();
|
if(repairInputList.get(0).getCompanyId() != null){
|
||||||
|
companyId = repairInputList.get(0).getCompanyId();
|
||||||
|
}
|
||||||
|
|
||||||
taskCode = purchaseCodeRule("R",50);
|
taskCode = purchaseCodeRule("R",50);
|
||||||
taskStatus = 53;
|
taskStatus = 53;
|
||||||
taskType = 50;
|
taskType = 50;
|
||||||
|
|
@ -225,7 +228,9 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(scrapNumList != null && scrapNumList.size() > 0){
|
if(scrapNumList != null && scrapNumList.size() > 0){
|
||||||
companyId = scrapNumList.get(0).getCompanyId();
|
if(scrapNumList.get(0).getCompanyId() != null){
|
||||||
|
companyId = scrapNumList.get(0).getCompanyId();
|
||||||
|
}
|
||||||
taskCode = purchaseCodeRule("BF",57);
|
taskCode = purchaseCodeRule("BF",57);
|
||||||
taskStatus = 58;
|
taskStatus = 58;
|
||||||
taskType = 57;
|
taskType = 57;
|
||||||
|
|
@ -276,23 +281,27 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
repairDetailList.addAll(auditAllList);
|
repairDetailList.addAll(auditAllList);
|
||||||
}
|
}
|
||||||
if(repairDetailList != null && repairDetailList.size() > 0){
|
if(repairDetailList != null && repairDetailList.size() > 0){
|
||||||
companyId = repairDetailList.get(0).getCompanyId();
|
if (repairDetailList.get(0).getCompanyId() != null){
|
||||||
|
companyId = repairDetailList.get(0).getCompanyId();
|
||||||
|
}
|
||||||
taskCode = purchaseCodeRule("WX",41);
|
taskCode = purchaseCodeRule("WX",41);
|
||||||
taskStatus = 42;
|
taskStatus = 42;
|
||||||
taskType = 41;
|
taskType = 41;
|
||||||
long inputTaskId = genTask(taskCode,taskType,taskStatus,tmTaskAgreement,companyId);
|
long inputTaskId = genTask(taskCode,taskType,taskStatus,tmTaskAgreement,companyId);
|
||||||
for (RepairAuditDetails inputDetails : repairDetailList) {
|
for (RepairAuditDetails inputDetails : repairDetailList) {
|
||||||
|
Long backId = repairAuditDetailsMapper.getBackId(inputDetails.getRepairId());
|
||||||
// 添加驳回后维修详细表数据
|
// 添加驳回后维修详细表数据
|
||||||
RepairTaskDetails repairTaskDetails = new RepairTaskDetails();
|
RepairTaskDetails repairTaskDetails = new RepairTaskDetails();
|
||||||
repairTaskDetails.setTaskId(String.valueOf(inputTaskId));
|
repairTaskDetails.setTaskId(String.valueOf(inputTaskId));
|
||||||
repairTaskDetails.setMaId(String.valueOf(inputDetails.getMaId()));
|
repairTaskDetails.setMaId(inputDetails.getMaId());
|
||||||
repairTaskDetails.setTypeId(String.valueOf(inputDetails.getTypeId()));
|
repairTaskDetails.setTypeId(inputDetails.getTypeId());
|
||||||
BigDecimal repairNum = inputDetails.getRepairNum();
|
BigDecimal repairNum = inputDetails.getRepairNum();
|
||||||
int i = repairNum.intValue(); // 直接转换
|
int i = repairNum.intValue(); // 直接转换
|
||||||
repairTaskDetails.setRepairNum(i);
|
repairTaskDetails.setRepairNum(i);
|
||||||
repairTaskDetails.setStatus("0");
|
repairTaskDetails.setStatus("0");
|
||||||
repairTaskDetails.setCreateBy(SecurityUtils.getUserId());
|
repairTaskDetails.setCreateBy(SecurityUtils.getUserId());
|
||||||
repairTaskDetails.setCompanyId((long) companyId);
|
repairTaskDetails.setCompanyId((long) companyId);
|
||||||
|
repairTaskDetails.setBackId(backId);
|
||||||
repairAuditDetailsMapper.insertRepairDetails(repairTaskDetails);
|
repairAuditDetailsMapper.insertRepairDetails(repairTaskDetails);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -309,7 +318,15 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
taskMapper.updateTmTask(tmTask);
|
taskMapper.updateTmTask(tmTask);
|
||||||
}
|
}
|
||||||
if (scrapAudit.getAuditDetailList() != null && scrapAudit.getAuditDetailList().size() > 0){
|
if (scrapAudit.getAuditDetailList() != null && scrapAudit.getAuditDetailList().size() > 0){
|
||||||
for (RepairAuditDetails bean : auditDetailList){
|
if (auditDetailList != null) {
|
||||||
|
for (RepairAuditDetails bean : auditDetailList){
|
||||||
|
bean.setAuditBy(SecurityUtils.getUserId());
|
||||||
|
bean.setStatus(status);
|
||||||
|
repairAuditDetailsMapper.updateStatus(bean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
for (RepairAuditDetails bean : auditAllList){
|
||||||
bean.setAuditBy(SecurityUtils.getUserId());
|
bean.setAuditBy(SecurityUtils.getUserId());
|
||||||
bean.setStatus(status);
|
bean.setStatus(status);
|
||||||
repairAuditDetailsMapper.updateStatus(bean);
|
repairAuditDetailsMapper.updateStatus(bean);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ public class ScrapAudit {
|
||||||
@ApiModelProperty(value = "不通过原因")
|
@ApiModelProperty(value = "不通过原因")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@ApiModelProperty(value = "审核任务明细id")
|
@ApiModelProperty(value = "审核任务明细")
|
||||||
private List<RepairAuditDetails> auditDetailList;
|
private List<RepairAuditDetails> auditDetailList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="typeId != null">
|
<if test="typeId != null">
|
||||||
type_id,
|
type_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="backNum != null">
|
<if test="repairNum != null">
|
||||||
repair_num,
|
repair_num,
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
|
|
@ -144,13 +144,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update_by,
|
update_by,
|
||||||
</if>
|
</if>
|
||||||
update_time,
|
update_time,
|
||||||
<if test="remark != null and remark != ''">
|
|
||||||
remark,
|
|
||||||
</if>
|
|
||||||
<if test="companyId != null">
|
<if test="companyId != null">
|
||||||
company_id,
|
company_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="id != null">
|
<if test="backId != null">
|
||||||
back_id,
|
back_id,
|
||||||
</if>
|
</if>
|
||||||
create_time
|
create_time
|
||||||
|
|
@ -165,8 +162,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="typeId != null">
|
<if test="typeId != null">
|
||||||
#{typeId},
|
#{typeId},
|
||||||
</if>
|
</if>
|
||||||
<if test="backNum != null">
|
<if test="repairNum != null">
|
||||||
#{backNum},
|
#{repairNum},
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
#{status},
|
#{status},
|
||||||
|
|
@ -178,14 +175,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{createBy},
|
#{createBy},
|
||||||
</if>
|
</if>
|
||||||
NOW(),
|
NOW(),
|
||||||
<if test="remark != null and remark != ''">
|
|
||||||
#{remark},
|
|
||||||
</if>
|
|
||||||
<if test="companyId != null">
|
<if test="companyId != null">
|
||||||
#{companyId},
|
#{companyId},
|
||||||
</if>
|
</if>
|
||||||
<if test="id != null">
|
<if test="backId != null">
|
||||||
#{id},
|
#{backId},
|
||||||
</if>
|
</if>
|
||||||
NOW()
|
NOW()
|
||||||
)
|
)
|
||||||
|
|
@ -383,5 +377,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectRepairAuditDetailsVo"/>
|
<include refid="selectRepairAuditDetailsVo"/>
|
||||||
where task_id = #{taskId} and scrap_num > 0
|
where task_id = #{taskId} and scrap_num > 0
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getBackId" resultType="java.lang.Long">
|
||||||
|
select back_id
|
||||||
|
from repair_apply_details
|
||||||
|
where id = #{repairId}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue