退料单需求开发
This commit is contained in:
parent
a308207b26
commit
c5a3725edf
|
|
@ -67,6 +67,11 @@ public class LeaseOutDetails implements Serializable {
|
|||
*/
|
||||
@ApiModelProperty(value = "规格名称")
|
||||
private String typeName;
|
||||
/**
|
||||
* 规格名称
|
||||
*/
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
/**
|
||||
* maId
|
||||
|
|
@ -79,6 +84,16 @@ public class LeaseOutDetails implements Serializable {
|
|||
*/
|
||||
@ApiModelProperty(value = "机具编号")
|
||||
private String maCode;
|
||||
/**
|
||||
* 出库人
|
||||
*/
|
||||
@ApiModelProperty(value = "出库人")
|
||||
private String outPerson;
|
||||
/**
|
||||
* 领料人
|
||||
*/
|
||||
@ApiModelProperty(value = "领料人")
|
||||
private String leasePerson;
|
||||
|
||||
/**
|
||||
* 协议ID
|
||||
|
|
|
|||
|
|
@ -133,6 +133,18 @@ public class LeaseOutDetailsController extends BaseController {
|
|||
public AjaxResult submitOut(@RequestBody LeaseOutDetails record) {
|
||||
return leaseOutDetailsService.submitOut(record);
|
||||
}
|
||||
/**
|
||||
* 领料出库,出库单查询
|
||||
*
|
||||
* @param parentId
|
||||
*/
|
||||
@Log(title = "出库单查询", businessType = BusinessType.MATERIAL)
|
||||
@GetMapping("/getOutboundOrder")
|
||||
public AjaxResult getOutboundOrder(String parentId) {
|
||||
startPage();
|
||||
List<LeaseOutDetails> outboundOrder = leaseOutDetailsService.getOutboundOrder(parentId);
|
||||
return AjaxResult.success(getDataTable(outboundOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordList
|
||||
|
|
|
|||
|
|
@ -541,7 +541,7 @@ public class TmTaskController extends BaseController {
|
|||
@PostMapping("/outboundCompleted")
|
||||
public AjaxResult outboundCompleted(@RequestBody TmTask task) {
|
||||
int i = tmTaskService.updateLeaseAuditListByOne(task);
|
||||
if (i == 0) {
|
||||
if (i > 0) {
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
return AjaxResult.error();
|
||||
|
|
|
|||
|
|
@ -52,6 +52,12 @@ public class LeaseApplyDetails implements Serializable {
|
|||
@ApiModelProperty(value = "领料出库状态")
|
||||
private String statusName;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
@ApiModelProperty(value = "领料出库状态")
|
||||
private String carCode;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -107,4 +107,6 @@ public interface LeaseOutDetailsMapper {
|
|||
LeaseApplyDetails getLeaseApplyDetails(@Param("record") LeaseOutDetails record);
|
||||
|
||||
int updateLeaseApplyDetails(@Param("record") LeaseOutDetails record);
|
||||
|
||||
List<LeaseOutDetails> getOutboundOrder(String parentId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ public interface LeaseOutDetailsService {
|
|||
* @return 结果
|
||||
*/
|
||||
AjaxResult submitOut(LeaseOutDetails record);
|
||||
List<LeaseOutDetails> getOutboundOrder(String parentId);
|
||||
/**
|
||||
* 根据code编码查询设备信息
|
||||
* @param maCode 机具编码
|
||||
|
|
|
|||
|
|
@ -198,6 +198,11 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
|||
return AjaxResult.success("出库成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LeaseOutDetails> getOutboundOrder(String parentId) {
|
||||
return leaseOutDetailsMapper.getOutboundOrder(parentId);
|
||||
}
|
||||
|
||||
private int insertRecords(LeaseOutDetails record) {
|
||||
int res = 0;
|
||||
// 首先更新领料任务详情表的领料数及状态(lease_apply_details)
|
||||
|
|
|
|||
|
|
@ -7,10 +7,12 @@ import com.bonus.sgzb.app.domain.MachinePart;
|
|||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.app.mapper.LeaseApplyDetailsMapper;
|
||||
import com.bonus.sgzb.app.mapper.LeaseApplyInfoMapper;
|
||||
import com.bonus.sgzb.app.mapper.LeaseOutDetailsMapper;
|
||||
import com.bonus.sgzb.app.mapper.TmTaskMapper;
|
||||
import com.bonus.sgzb.app.service.*;
|
||||
import com.bonus.sgzb.base.api.domain.BmFlowRecord;
|
||||
import com.bonus.sgzb.base.api.domain.BmFlowRelation;
|
||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||
import com.bonus.sgzb.common.core.constant.Constants;
|
||||
import com.bonus.sgzb.common.core.domain.R;
|
||||
import com.bonus.sgzb.common.core.enums.TaskStatusEnum;
|
||||
|
|
@ -69,6 +71,8 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
|
||||
@Resource
|
||||
private LeaseUserBookService leaseUserBookService;
|
||||
@Resource
|
||||
private LeaseOutDetailsMapper leaseOutDetailsMapper;
|
||||
|
||||
@Resource
|
||||
private BmFlowRecordService bmFlowRecordService;
|
||||
|
|
@ -665,6 +669,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
@Override
|
||||
public int updateLeaseAuditListByOne(TmTask task) {
|
||||
int i = tmTaskMapper.updateLeaseAuditListByOne(task);
|
||||
int res = 0;
|
||||
if (i > 0) {
|
||||
int num = 0;
|
||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getleaseDetailsStatus(task);
|
||||
|
|
@ -680,9 +685,17 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
tmTaskMapper.updateTmTaskAuditStatus(task);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
LeaseOutDetails leaseOutDetails = new LeaseOutDetails();
|
||||
leaseOutDetails.setParentId(Integer.valueOf(task.getId()));
|
||||
leaseOutDetails.setTypeId(Integer.valueOf(task.getTypeId()));
|
||||
leaseOutDetails.setCreateBy(task.getCreateBy());
|
||||
leaseOutDetails.setCreateTime(new Date());
|
||||
leaseOutDetails.setUpdateTime(new Date());
|
||||
leaseOutDetails.setOutNum(0.0);
|
||||
res = leaseOutDetailsMapper.insertSelective(leaseOutDetails);
|
||||
return res;
|
||||
} else {
|
||||
return 1;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -450,4 +450,29 @@
|
|||
parennt_id = #{record.parentId}
|
||||
AND type_id = #{record.typeId}
|
||||
</select>
|
||||
<select id="getOutboundOrder" resultType="com.bonus.sgzb.base.api.domain.LeaseOutDetails">
|
||||
SELECT
|
||||
mt.type_name typeModelName,
|
||||
mt2.type_name typeName,
|
||||
lod.out_num outNum,
|
||||
lod.create_time,
|
||||
lad.pre_num,
|
||||
su.nick_name leasePerson,
|
||||
su2.nick_name outPerson,
|
||||
mm.ma_code,
|
||||
lod.car_code
|
||||
FROM
|
||||
lease_out_details lod
|
||||
LEFT JOIN lease_apply_details lad ON lod.parent_id = lad.parennt_id
|
||||
AND lod.type_id = lad.type_id
|
||||
LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id
|
||||
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
|
||||
LEFT JOIN sys_user su on su.user_id = lai.create_by
|
||||
LEFT JOIN sys_user su2 on su2.user_id = lod.create_by
|
||||
LEFT JOIN ma_type mt ON mt.type_id = lod.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
WHERE
|
||||
lod.parent_id = #{parentId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1039,7 +1039,7 @@
|
|||
bui.unit_name AS unitName,
|
||||
lai.lease_person AS leasePerson,
|
||||
lai.phone AS leasePhone,
|
||||
tt.create_by AS applyFor,
|
||||
su.nick_name AS applyFor,
|
||||
d.`name` AS taskName,
|
||||
lai.lease_type AS leaseType,
|
||||
d.id AS examineStatusId,
|
||||
|
|
@ -1051,6 +1051,7 @@
|
|||
from
|
||||
lease_apply_info lai
|
||||
LEFT JOIN tm_task tt on lai.task_id = tt.task_id
|
||||
LEFT JOIN sys_user su on lai.create_by = su.user_id
|
||||
LEFT JOIN sys_dic d ON d.id = tt.task_status
|
||||
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||
|
|
@ -1197,7 +1198,7 @@
|
|||
bui.unit_name AS unitName,
|
||||
lai.lease_person AS leasePerson,
|
||||
lai.phone AS leasePhone,
|
||||
tt.create_by AS applyFor,
|
||||
su.nick_name AS applyFor,
|
||||
d.`name` AS taskName,
|
||||
lai.lease_type AS leaseType,
|
||||
d.id AS examineStatusId,
|
||||
|
|
@ -1209,6 +1210,7 @@
|
|||
from
|
||||
lease_apply_info lai
|
||||
LEFT JOIN tm_task tt on lai.task_id = tt.task_id
|
||||
LEFT JOIN sys_user su on lai.create_by = su.user_id
|
||||
LEFT JOIN sys_dic d ON d.id = tt.task_status
|
||||
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||
|
|
@ -1302,7 +1304,7 @@
|
|||
bui.unit_name AS unitName,
|
||||
lai.lease_person AS leasePerson,
|
||||
lai.phone AS leasePhone,
|
||||
tt.create_by AS applyFor,
|
||||
su.nick_name AS applyFor,
|
||||
d.`name` AS taskName,
|
||||
lai.lease_type AS leaseType,
|
||||
d.id AS examineStatusId,
|
||||
|
|
@ -1314,6 +1316,7 @@
|
|||
from
|
||||
lease_apply_info lai
|
||||
LEFT JOIN tm_task tt on lai.task_id = tt.task_id
|
||||
LEFT JOIN sys_user su on lai.create_by = su.user_id
|
||||
LEFT JOIN sys_dic d ON d.id = tt.task_status
|
||||
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||
|
|
@ -1346,7 +1349,7 @@
|
|||
bui.unit_name AS unitName,
|
||||
lai.lease_person AS leasePerson,
|
||||
lai.phone AS leasePhone,
|
||||
tt.create_by AS applyFor,
|
||||
su.nick_name AS applyFor,
|
||||
d.`name` AS taskName,
|
||||
lai.lease_type AS leaseType,
|
||||
d.id AS examineStatusId,
|
||||
|
|
@ -1358,6 +1361,7 @@
|
|||
from
|
||||
lease_apply_info lai
|
||||
LEFT JOIN tm_task tt on lai.task_id = tt.task_id
|
||||
LEFT JOIN sys_user su on lai.create_by = su.user_id
|
||||
LEFT JOIN sys_dic d ON d.id = tt.task_status
|
||||
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue