Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx

This commit is contained in:
BianLzhaoMin 2024-07-03 17:51:18 +08:00
commit 187f1742b0
13 changed files with 114 additions and 17 deletions

View File

@ -67,6 +67,11 @@ public class LeaseOutDetails implements Serializable {
*/ */
@ApiModelProperty(value = "规格名称") @ApiModelProperty(value = "规格名称")
private String typeName; private String typeName;
/**
* 规格名称
*/
@ApiModelProperty(value = "规格型号")
private String typeModelName;
/** /**
* maId * maId
@ -79,6 +84,16 @@ public class LeaseOutDetails implements Serializable {
*/ */
@ApiModelProperty(value = "机具编号") @ApiModelProperty(value = "机具编号")
private String maCode; private String maCode;
/**
* 出库人
*/
@ApiModelProperty(value = "出库人")
private String outPerson;
/**
* 领料人
*/
@ApiModelProperty(value = "领料人")
private String leasePerson;
/** /**
* 协议ID * 协议ID

View File

@ -133,6 +133,18 @@ public class LeaseOutDetailsController extends BaseController {
public AjaxResult submitOut(@RequestBody LeaseOutDetails record) { public AjaxResult submitOut(@RequestBody LeaseOutDetails record) {
return leaseOutDetailsService.submitOut(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 * @param recordList

View File

@ -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());
@ -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());
@ -541,7 +541,7 @@ public class TmTaskController extends BaseController {
@PostMapping("/outboundCompleted") @PostMapping("/outboundCompleted")
public AjaxResult outboundCompleted(@RequestBody TmTask task) { public AjaxResult outboundCompleted(@RequestBody TmTask task) {
int i = tmTaskService.updateLeaseAuditListByOne(task); int i = tmTaskService.updateLeaseAuditListByOne(task);
if (i == 0) { if (i > 0) {
return AjaxResult.success(); return AjaxResult.success();
} else { } else {
return AjaxResult.error(); return AjaxResult.error();

View File

@ -52,6 +52,12 @@ public class LeaseApplyDetails implements Serializable {
@ApiModelProperty(value = "领料出库状态") @ApiModelProperty(value = "领料出库状态")
private String statusName; private String statusName;
/**
* 车牌号
*/
@ApiModelProperty(value = "领料出库状态")
private String carCode;
/** /**
* 规格型号 * 规格型号
*/ */

View File

@ -107,4 +107,6 @@ public interface LeaseOutDetailsMapper {
LeaseApplyDetails getLeaseApplyDetails(@Param("record") LeaseOutDetails record); LeaseApplyDetails getLeaseApplyDetails(@Param("record") LeaseOutDetails record);
int updateLeaseApplyDetails(@Param("record") LeaseOutDetails record); int updateLeaseApplyDetails(@Param("record") LeaseOutDetails record);
List<LeaseOutDetails> getOutboundOrder(String parentId);
} }

View File

@ -40,6 +40,7 @@ public interface LeaseOutDetailsService {
* @return 结果 * @return 结果
*/ */
AjaxResult submitOut(LeaseOutDetails record); AjaxResult submitOut(LeaseOutDetails record);
List<LeaseOutDetails> getOutboundOrder(String parentId);
/** /**
* 根据code编码查询设备信息 * 根据code编码查询设备信息
* @param maCode 机具编码 * @param maCode 机具编码

View File

@ -198,6 +198,11 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
return AjaxResult.success("出库成功"); return AjaxResult.success("出库成功");
} }
@Override
public List<LeaseOutDetails> getOutboundOrder(String parentId) {
return leaseOutDetailsMapper.getOutboundOrder(parentId);
}
private int insertRecords(LeaseOutDetails record) { private int insertRecords(LeaseOutDetails record) {
int res = 0; int res = 0;
// 首先更新领料任务详情表的领料数及状态lease_apply_details // 首先更新领料任务详情表的领料数及状态lease_apply_details

View File

@ -7,10 +7,12 @@ import com.bonus.sgzb.app.domain.MachinePart;
import com.bonus.sgzb.app.domain.TmTask; import com.bonus.sgzb.app.domain.TmTask;
import com.bonus.sgzb.app.mapper.LeaseApplyDetailsMapper; import com.bonus.sgzb.app.mapper.LeaseApplyDetailsMapper;
import com.bonus.sgzb.app.mapper.LeaseApplyInfoMapper; 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.mapper.TmTaskMapper;
import com.bonus.sgzb.app.service.*; import com.bonus.sgzb.app.service.*;
import com.bonus.sgzb.base.api.domain.BmFlowRecord; import com.bonus.sgzb.base.api.domain.BmFlowRecord;
import com.bonus.sgzb.base.api.domain.BmFlowRelation; 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.constant.Constants;
import com.bonus.sgzb.common.core.domain.R; import com.bonus.sgzb.common.core.domain.R;
import com.bonus.sgzb.common.core.enums.TaskStatusEnum; import com.bonus.sgzb.common.core.enums.TaskStatusEnum;
@ -69,6 +71,8 @@ public class TmTaskServiceImpl implements TmTaskService {
@Resource @Resource
private LeaseUserBookService leaseUserBookService; private LeaseUserBookService leaseUserBookService;
@Resource
private LeaseOutDetailsMapper leaseOutDetailsMapper;
@Resource @Resource
private BmFlowRecordService bmFlowRecordService; private BmFlowRecordService bmFlowRecordService;
@ -195,7 +199,7 @@ public class TmTaskServiceImpl implements TmTaskService {
} }
} }
} }
sendMessageToLeader(record); //sendMessageToLeader(record);
} else { } else {
// 先审核任务表 // 先审核任务表
result += tmTaskMapper.updateTmTaskAuditStatus(record); result += tmTaskMapper.updateTmTaskAuditStatus(record);
@ -219,7 +223,7 @@ public class TmTaskServiceImpl implements TmTaskService {
} }
} }
} }
sendMessageToLeader(record); //sendMessageToLeader(record);
} }
} else { } else {
return 0; return 0;
@ -665,6 +669,7 @@ public class TmTaskServiceImpl implements TmTaskService {
@Override @Override
public int updateLeaseAuditListByOne(TmTask task) { public int updateLeaseAuditListByOne(TmTask task) {
int i = tmTaskMapper.updateLeaseAuditListByOne(task); int i = tmTaskMapper.updateLeaseAuditListByOne(task);
int res = 0;
if (i > 0) { if (i > 0) {
int num = 0; int num = 0;
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getleaseDetailsStatus(task); List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getleaseDetailsStatus(task);
@ -680,9 +685,17 @@ public class TmTaskServiceImpl implements TmTaskService {
tmTaskMapper.updateTmTaskAuditStatus(task); 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 { } else {
return 1; return res;
} }
} }

View File

@ -1075,7 +1075,6 @@
mt.type_id AS typeId, mt.type_id AS typeId,
mm.ma_code AS maCode, mm.ma_code AS maCode,
mm.ma_id AS maId, mm.ma_id AS maId,
bad.remark AS remark,
sd.NAME AS maStatus sd.NAME AS maStatus
FROM FROM
ma_type mt ma_type mt

View File

@ -450,4 +450,29 @@
parennt_id = #{record.parentId} parennt_id = #{record.parentId}
AND type_id = #{record.typeId} AND type_id = #{record.typeId}
</select> </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> </mapper>

View File

@ -1039,7 +1039,7 @@
bui.unit_name AS unitName, bui.unit_name AS unitName,
lai.lease_person AS leasePerson, lai.lease_person AS leasePerson,
lai.phone AS leasePhone, lai.phone AS leasePhone,
tt.create_by AS applyFor, su.nick_name AS applyFor,
d.`name` AS taskName, d.`name` AS taskName,
lai.lease_type AS leaseType, lai.lease_type AS leaseType,
d.id AS examineStatusId, d.id AS examineStatusId,
@ -1051,6 +1051,7 @@
from from
lease_apply_info lai lease_apply_info lai
LEFT JOIN tm_task tt on lai.task_id = tt.task_id 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 sys_dic d ON d.id = tt.task_status
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id 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 LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
@ -1197,7 +1198,7 @@
bui.unit_name AS unitName, bui.unit_name AS unitName,
lai.lease_person AS leasePerson, lai.lease_person AS leasePerson,
lai.phone AS leasePhone, lai.phone AS leasePhone,
tt.create_by AS applyFor, su.nick_name AS applyFor,
d.`name` AS taskName, d.`name` AS taskName,
lai.lease_type AS leaseType, lai.lease_type AS leaseType,
d.id AS examineStatusId, d.id AS examineStatusId,
@ -1209,6 +1210,7 @@
from from
lease_apply_info lai lease_apply_info lai
LEFT JOIN tm_task tt on lai.task_id = tt.task_id 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 sys_dic d ON d.id = tt.task_status
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id 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 LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
@ -1302,7 +1304,7 @@
bui.unit_name AS unitName, bui.unit_name AS unitName,
lai.lease_person AS leasePerson, lai.lease_person AS leasePerson,
lai.phone AS leasePhone, lai.phone AS leasePhone,
tt.create_by AS applyFor, su.nick_name AS applyFor,
d.`name` AS taskName, d.`name` AS taskName,
lai.lease_type AS leaseType, lai.lease_type AS leaseType,
d.id AS examineStatusId, d.id AS examineStatusId,
@ -1314,6 +1316,7 @@
from from
lease_apply_info lai lease_apply_info lai
LEFT JOIN tm_task tt on lai.task_id = tt.task_id 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 sys_dic d ON d.id = tt.task_status
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id 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 LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
@ -1346,7 +1349,7 @@
bui.unit_name AS unitName, bui.unit_name AS unitName,
lai.lease_person AS leasePerson, lai.lease_person AS leasePerson,
lai.phone AS leasePhone, lai.phone AS leasePhone,
tt.create_by AS applyFor, su.nick_name AS applyFor,
d.`name` AS taskName, d.`name` AS taskName,
lai.lease_type AS leaseType, lai.lease_type AS leaseType,
d.id AS examineStatusId, d.id AS examineStatusId,
@ -1358,6 +1361,7 @@
from from
lease_apply_info lai lease_apply_info lai
LEFT JOIN tm_task tt on lai.task_id = tt.task_id 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 sys_dic d ON d.id = tt.task_status
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id 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 LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id

View File

@ -341,12 +341,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt2.type_name AS typeName, mt2.type_name AS typeName,
mt2.type_id AS typeId, mt2.type_id AS typeId,
mt.type_name AS typeModelName, mt.type_name AS typeModelName,
lod.out_num AS num, SUM( lod.out_num ) AS num,
lai.`code` AS materialCode, lai.`code` AS materialCode,
bui.unit_name AS unitName, bui.unit_name AS unitName,
bai.unit_id AS unitId, bai.unit_id AS unitId,
bpl.lot_id AS projectId, bpl.lot_id AS projectId,
su.user_name AS userName, mt_full.userName AS userName,
bpl.lot_name AS projectName, bpl.lot_name AS projectName,
sd.dept_name AS companyName sd.dept_name AS companyName
FROM FROM
@ -354,8 +354,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt ON lod.type_id = mt.type_id LEFT JOIN ma_type mt ON lod.type_id = mt.type_id
AND mt.`level` = '4' AND mt.`level` = '4'
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
LEFT JOIN (
SELECT
mt.type_id,
mt.type_name,
GROUP_CONCAT( su.user_name ) AS userName
FROM
ma_type mt
LEFT JOIN ma_type_keeper mtk ON mt.type_id = mtk.type_id LEFT JOIN ma_type_keeper mtk ON mt.type_id = mtk.type_id
LEFT JOIN sys_user su ON mtk.user_id = su.user_id LEFT JOIN sys_user su ON mtk.user_id = su.user_id
GROUP BY
mt.type_id,
mt.type_name
) mt_full ON mt.type_id = mt_full.type_id
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
LEFT JOIN lease_apply_info lai ON lod.parent_id = lai.id LEFT JOIN lease_apply_info lai ON lod.parent_id = lai.id
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
@ -379,6 +390,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeId!=null and typeId != ''"> <if test="typeId!=null and typeId != ''">
AND mt2.type_id = #{typeId} AND mt2.type_id = #{typeId}
</if> </if>
GROUP BY
mt.type_id,
mt.type_name,
lai.`code`
</select> </select>
<select id="getMaterialReturnDetailData" resultType="com.bonus.sgzb.largeScreen.domain.MaterialDetailVo"> <select id="getMaterialReturnDetailData" resultType="com.bonus.sgzb.largeScreen.domain.MaterialDetailVo">
SELECT SELECT
@ -582,7 +597,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN purchase_check_info pci ON pci.task_id = pcd.task_id LEFT JOIN purchase_check_info pci ON pci.task_id = pcd.task_id
where where
1 = 1 1 = 1
<if test="type == 1 and startDate != null "> <if test="startDate != '' and startDate != null ">
AND DATE_FORMAT(pci.arrival_time, '%Y-%m') = #{startDate} AND DATE_FORMAT(pci.arrival_time, '%Y-%m') = #{startDate}
</if> </if>
GROUP BY GROUP BY
@ -599,7 +614,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
where where
iad.input_type = '1' iad.input_type = '1'
<if test="type == 2 and startDate != null "> <if test="startDate != '' and startDate != null ">
AND DATE_FORMAT(iad.create_time, '%Y-%m') = #{startDate} AND DATE_FORMAT(iad.create_time, '%Y-%m') = #{startDate}
</if> </if>
GROUP BY GROUP BY

View File

@ -139,7 +139,7 @@ export default {
maType: this.maType, maType: this.maType,
typeId: this.formData.materialReqTypeValue, typeId: this.formData.materialReqTypeValue,
startDate: this.startDate, startDate: this.startDate,
type: this.type // type: this.type
} }
getAcceptanceStorage(params).then(({data}) => { getAcceptanceStorage(params).then(({data}) => {
this.tableData = data.rows this.tableData = data.rows