Merge branch 'dev' of http://192.168.0.56:3000/bonus/devicesmgt into dev
This commit is contained in:
commit
910e64ea51
|
|
@ -8,6 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
|
|
@ -58,6 +59,8 @@ public class LeaseApplyDetails implements Serializable {
|
|||
@ApiModelProperty(value = "预领料数")
|
||||
private Double preNum;
|
||||
|
||||
private List<MachinePart> maTypeDetails;
|
||||
|
||||
/**
|
||||
* 已领数量
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
package com.bonus.sgzb.app.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author:梁超
|
||||
* @date:2024/4/17 - 9:04
|
||||
*/
|
||||
@Data
|
||||
public class MachinePart {
|
||||
private String typeModelName;
|
||||
private String unitName;
|
||||
private String typeName;
|
||||
private Integer partNum;
|
||||
}
|
||||
|
|
@ -257,6 +257,7 @@ public class TmTask implements Serializable {
|
|||
private String maId;
|
||||
private String maStatus;
|
||||
private String typeId;
|
||||
private Integer partNum;
|
||||
@ApiModelProperty(value = "预计领料时间(重庆)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.sgzb.app.mapper;
|
|||
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.MachinePart;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.base.domain.MaintenanceGang;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
@ -115,5 +116,7 @@ public interface TmTaskMapper {
|
|||
|
||||
List<TmTask> getLeaseDetailByParentId(TmTask record);
|
||||
|
||||
List<TmTask> getMaTypeDetails(List<LeaseApplyDetails> leaseApplyDetails);
|
||||
List<TmTask> getMaTypeDetails(LeaseApplyDetails leaseApplyDetails);
|
||||
|
||||
MachinePart getMachineParts(TmTask typeId);
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package com.bonus.sgzb.app.service.impl;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyInfo;
|
||||
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;
|
||||
|
|
@ -618,13 +619,13 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
// 去查询任务分单表
|
||||
List<LeaseApplyInfo> collect = tmTaskMapper.getAuditManageListByLeaseInfo(tmTask);
|
||||
//没有companyId的用户可以看到所有数据
|
||||
if (companyId == null) {
|
||||
if (companyId == null || roles.contains("fgs")) {
|
||||
// 对领料任务集合查询具体详情
|
||||
for (LeaseApplyInfo leaseApplyInfo : collect) {
|
||||
if (leaseApplyInfo != null) {
|
||||
// 去查询领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
||||
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||
if (leaseApplyDetails.size() > 0) {
|
||||
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||
if (leaseApplyDetail != null && leaseApplyDetail.getPreNum() != null) {
|
||||
// 统计预领数量
|
||||
|
|
@ -633,12 +634,12 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
}
|
||||
// 塞入领料任务详情的集合中
|
||||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||
// 存入领料任务实体集合
|
||||
tmTask.setLeaseApplyInfoList(collect);
|
||||
tmTask.setRemark(collect.get(0).getRemark());
|
||||
}
|
||||
}
|
||||
}
|
||||
// 存入领料任务实体集合
|
||||
tmTask.setLeaseApplyInfoList(collect);
|
||||
tmTask.setRemark(collect.get(0).getRemark());
|
||||
}
|
||||
//施管部只能看到机具分公司(101)的数据
|
||||
if ((roles.contains("jjfgs") || roles.contains("sgb")) && companyId != null) {
|
||||
|
|
@ -649,7 +650,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
if (leaseApplyInfo != null) {
|
||||
// 去查询领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
||||
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||
if (leaseApplyDetails.size() > 0) {
|
||||
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||
if (leaseApplyDetail != null && leaseApplyDetail.getPreNum() != null) {
|
||||
// 统计预领数量
|
||||
|
|
@ -658,12 +659,12 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
}
|
||||
// 塞入领料任务详情的集合中
|
||||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||
// 存入领料任务实体集合
|
||||
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
||||
tmTask.setRemark(collect.get(0).getRemark());
|
||||
}
|
||||
}
|
||||
}
|
||||
// 存入领料任务实体集合
|
||||
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
||||
tmTask.setRemark(collect.get(0).getRemark());
|
||||
}
|
||||
}
|
||||
//安监部只能看到设备分公司(102)的数据
|
||||
|
|
@ -675,7 +676,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
if (leaseApplyInfo != null) {
|
||||
// 去查询领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
||||
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||
if (leaseApplyDetails.size() > 0) {
|
||||
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||
if (leaseApplyDetail != null) {
|
||||
// 统计预领数量
|
||||
|
|
@ -684,12 +685,12 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
}
|
||||
// 塞入领料任务详情的集合中
|
||||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||
// 存入领料任务实体集合
|
||||
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
||||
tmTask.setRemark(collect.get(0).getRemark());
|
||||
}
|
||||
}
|
||||
}
|
||||
// 存入领料任务实体集合
|
||||
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
||||
tmTask.setRemark(collect.get(0).getRemark());
|
||||
}
|
||||
}
|
||||
// 塞入预领的合计数量
|
||||
|
|
|
|||
|
|
@ -968,9 +968,24 @@
|
|||
</if>
|
||||
</select>
|
||||
<select id="getMaTypeDetails" resultType="com.bonus.sgzb.app.domain.TmTask">
|
||||
select mt2.type_name as typeName,
|
||||
mt.type_name as typeModelName
|
||||
from ma_type mt on lad.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||
SELECT
|
||||
mws2.type_id AS typeId,
|
||||
mws2.part_num AS partNum
|
||||
FROM
|
||||
ma_type mt1
|
||||
LEFT JOIN ma_whole_set mws2 ON mt1.type_id = mws2.parent_id
|
||||
WHERE
|
||||
mt1.type_id = #{typeId}
|
||||
</select>
|
||||
<select id="getMachineParts" resultType="com.bonus.sgzb.app.domain.MachinePart">
|
||||
SELECT
|
||||
mt.type_name AS typeModelName,
|
||||
mt.unit_name as unitName,
|
||||
m2.type_name As typeName
|
||||
FROM
|
||||
ma_type mt
|
||||
LEFT JOIN ma_type m2 ON mt.parent_id = m2.type_id
|
||||
WHERE
|
||||
mt.type_id = #{typeId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="typeName != null and typeName != ''">
|
||||
AND a.type_name = #{typeName}
|
||||
</if>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
<select id="getUserAll" resultMap="UsersResult">
|
||||
select user_id id,nick_name name
|
||||
|
|
@ -173,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectByName" resultType="java.lang.Integer">
|
||||
select count(*) from bm_unit_info
|
||||
where
|
||||
<if test="unitName != null and unitName != '' ">and unit_name = #{unitName}</if>
|
||||
<if test="unitName != null and unitName != '' ">unit_name = #{unitName}</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@
|
|||
</select>
|
||||
<select id="selectByName" resultType="java.lang.Integer">
|
||||
select count(*) from sys_dic
|
||||
where
|
||||
<if test="name != null and name != ''">and name = #{name}</if>
|
||||
where
|
||||
<if test="name != null and name != ''">name = #{name}</if>
|
||||
</select>
|
||||
<insert id="insertSysDic" parameterType="com.bonus.sgzb.base.api.domain.SysDic">
|
||||
insert into sys_dic
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
|||
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.sgzb.common.log.annotation.Log;
|
||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.service.BackApplyService;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -168,6 +169,7 @@ public class BackApplyController extends BaseController {
|
|||
bean.setCode(code);
|
||||
bean.setTaskType(36);
|
||||
bean.setTaskStatus("37");
|
||||
bean.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
// 创建任务
|
||||
boolean addTaskResult = backApplyService.insertSelective(bean) > 0;
|
||||
if (addTaskResult && bean.getTaskId() != null) {
|
||||
|
|
@ -255,6 +257,7 @@ public class BackApplyController extends BaseController {
|
|||
bean.setCode(code);
|
||||
bean.setTaskType(36);
|
||||
bean.setTaskStatus("38");
|
||||
bean.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
// 创建任务
|
||||
boolean addTaskResult = backApplyService.insertSelective(bean) > 0;
|
||||
if (addTaskResult && bean.getTaskId() != null) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
REMARKS,
|
||||
</if>
|
||||
<if test="maCode != null and maCode != ''">
|
||||
MA_CODE,
|
||||
MACODE,
|
||||
</if>
|
||||
</trim>
|
||||
)
|
||||
|
|
@ -131,7 +131,6 @@
|
|||
<insert id="insertMachineLabel">
|
||||
insert into ma_machine_label
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="maId != null">label_id,</if>
|
||||
<if test="code != null">label_code,</if>
|
||||
<if test="maId != null">ma_id,</if>
|
||||
is_bind,
|
||||
|
|
@ -139,7 +138,6 @@
|
|||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="maId != null">#{maId},</if>
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="maId != null">#{maId},</if>
|
||||
1,
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ export default {
|
|||
// 查询
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
const keyWord = this.formData.keyWord?.trim()
|
||||
const keyWord = this.formData.keyWord?.trim() || ''
|
||||
this.getList({ keyWord })
|
||||
},
|
||||
handleSearch() {
|
||||
|
|
@ -243,6 +243,7 @@ export default {
|
|||
this.open = true
|
||||
this.isDetail = true
|
||||
this.title = '抱杆配套明细'
|
||||
this.dialogForm.keyWord = ''
|
||||
this.getDetail({ id: row.id })
|
||||
},
|
||||
// 获取详情
|
||||
|
|
|
|||
|
|
@ -150,9 +150,6 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 编码盘点弹出层 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
|
|
@ -536,16 +533,6 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="codeForm.pageNum"
|
||||
:limit.sync="codeForm.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancelCode">取 消</el-button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue