增加设备信息相关字段并优化查询功能- 在 DevInfo 模型中添加了购置费用来源、专业、主工序、子工序、检验有效状态等字段
- 更新了 DevInfoMapper.xml 中的 SQL 查询语句,支持新增字段的查询- 修改了 DevInfoServiceImpl 中的设备信息查询方法,移除了根据公司 ID 的查询条件 - 在 DevInfoVo 中添加了设备类型级别字段,用于展示设备类型等级 - 优化了任务编号生成逻辑,增加了对非数字任务编号的处理
This commit is contained in:
parent
68932e1039
commit
2a4f714d9c
|
|
@ -366,6 +366,20 @@ public class DevInfo extends BaseEntity {
|
||||||
|
|
||||||
@ApiModelProperty(value = "资产原值", required = true)
|
@ApiModelProperty(value = "资产原值", required = true)
|
||||||
private BigDecimal assetValue;
|
private BigDecimal assetValue;
|
||||||
|
|
||||||
@ApiModelProperty(value = "购置费用来源", required = true)
|
@ApiModelProperty(value = "购置费用来源", required = true)
|
||||||
private String purchaseSource;
|
private String purchaseSource;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "专业")
|
||||||
|
private String profession;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主工序")
|
||||||
|
private String mainProcess;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "子工序")
|
||||||
|
private String subProcess;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "检验有效状态")
|
||||||
|
private String verifyStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -174,11 +174,13 @@ public class DevInfoVo extends DevInfo {
|
||||||
@ApiModelProperty(value = "订单金额")
|
@ApiModelProperty(value = "订单金额")
|
||||||
private BigDecimal cost;
|
private BigDecimal cost;
|
||||||
|
|
||||||
private String devicenewName;
|
private String devicenewName;
|
||||||
|
|
||||||
private String deviceId;
|
private String deviceId;
|
||||||
|
|
||||||
private String deviceTypeName;
|
private String deviceTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设备类型级别")
|
||||||
|
private Integer typeLevel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.material.device.service.impl;
|
package com.bonus.material.device.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.PhoneUtil;
|
import cn.hutool.core.util.PhoneUtil;
|
||||||
import com.bonus.common.biz.constant.MaterialConstants;
|
import com.bonus.common.biz.constant.MaterialConstants;
|
||||||
|
|
@ -712,7 +713,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<DevInfoVo> selectDevInfoLists(DevInfoVo devInfo) {
|
public List<DevInfoVo> selectDevInfoLists(DevInfoVo devInfo) {
|
||||||
devInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString());
|
//devInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString());
|
||||||
List<DevInfoVo> list = devInfoMapper.selectDevInfoLists(devInfo);
|
List<DevInfoVo> list = devInfoMapper.selectDevInfoLists(devInfo);
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
for (DevInfoVo infoVo : list) {
|
for (DevInfoVo infoVo : list) {
|
||||||
|
|
@ -1336,6 +1337,9 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
String taskNum = devInfoMapper.selectTaskNumByMonth(nowDate);
|
String taskNum = devInfoMapper.selectTaskNumByMonth(nowDate);
|
||||||
if (StringUtils.isNotBlank(taskNum)) {
|
if (StringUtils.isNotBlank(taskNum)) {
|
||||||
// 将字符串转换为整数
|
// 将字符串转换为整数
|
||||||
|
if (!NumberUtil.isNumber(taskNum)) {
|
||||||
|
return nowDate + "0001";
|
||||||
|
}
|
||||||
int num = Integer.parseInt(taskNum);
|
int num = Integer.parseInt(taskNum);
|
||||||
// 执行加一操作
|
// 执行加一操作
|
||||||
num++;
|
num++;
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
d.ma_id as maId,
|
d.ma_id as maId,
|
||||||
d.code as code,
|
d.code as code,
|
||||||
d.identify_code as identifyCode,
|
d.identify_code as identifyCode,
|
||||||
|
d.day_lease_price as dayLeasePrice,
|
||||||
d.device_name as deviceName,
|
d.device_name as deviceName,
|
||||||
d.device_weight as deviceWeight,
|
d.device_weight as deviceWeight,
|
||||||
d.device_count as deviceCount,
|
d.device_count as deviceCount,
|
||||||
|
|
@ -67,7 +68,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
d.production_date as productionDate,
|
d.production_date as productionDate,
|
||||||
d.working_hours as workingHours,
|
d.working_hours as workingHours,
|
||||||
d.serial_number as serialNumber,
|
d.serial_number as serialNumber,
|
||||||
mt4.lease_price as dayLeasePrice,
|
|
||||||
d.person as person,
|
d.person as person,
|
||||||
d.person_phone as personPhone,
|
d.person_phone as personPhone,
|
||||||
d.create_time as createTime,
|
d.create_time as createTime,
|
||||||
|
|
@ -263,6 +263,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
d.update_time as updateTime,
|
d.update_time as updateTime,
|
||||||
d.is_zone as isZone,
|
d.is_zone as isZone,
|
||||||
d.zone_id as zoneId,
|
d.zone_id as zoneId,
|
||||||
|
d.profession as profession,
|
||||||
|
d.main_process as mainProcess,
|
||||||
|
d.sub_process as subProcess,
|
||||||
|
mt4.level as typeLevel,
|
||||||
CASE
|
CASE
|
||||||
WHEN check_date IS NULL THEN '未设置检验日期'
|
WHEN check_date IS NULL THEN '未设置检验日期'
|
||||||
WHEN check_date > CURDATE() THEN '已过期'
|
WHEN check_date > CURDATE() THEN '已过期'
|
||||||
|
|
@ -331,6 +335,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="checkCycle != null">check_cycle,</if>
|
<if test="checkCycle != null">check_cycle,</if>
|
||||||
<if test="isZone != null">is_zone,</if>
|
<if test="isZone != null">is_zone,</if>
|
||||||
<if test="zoneId != null">zone_id,</if>
|
<if test="zoneId != null">zone_id,</if>
|
||||||
|
<if test="dayLeasePrice != null">day_lease_price,</if>
|
||||||
|
<if test="profession != null and profession != ''">profession,</if>
|
||||||
|
<if test="mainProcess != null and mainProcess != ''">main_process,</if>
|
||||||
|
<if test="subProcess != null and subProcess != ''">sub_process,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||||
|
|
@ -374,6 +382,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="checkCycle != null">#{checkCycle},</if>
|
<if test="checkCycle != null">#{checkCycle},</if>
|
||||||
<if test="isZone != null">#{isZone},</if>
|
<if test="isZone != null">#{isZone},</if>
|
||||||
<if test="zoneId != null">#{zoneId},</if>
|
<if test="zoneId != null">#{zoneId},</if>
|
||||||
|
<if test="dayLeasePrice != null">#{dayLeasePrice},</if>
|
||||||
|
<if test="profession != null and profession != ''">#{profession},</if>
|
||||||
|
<if test="mainProcess != null and mainProcess != ''">#{mainProcess},</if>
|
||||||
|
<if test="subProcess != null and subProcess != ''">#{subProcess},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -491,12 +503,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="upMaStatus">
|
<update id="upMaStatus">
|
||||||
update ma_dev_info set ma_status = #{maStatus} where ma_id = #{maId} and is_active = 1
|
update ma_dev_info set ma_status = #{maStatus} where ma_id = #{maId} and is_active = 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateDevInfoIsQc">
|
<update id="updateDevInfoIsQc">
|
||||||
update ma_dev_info set is_qc = 1 where ma_id = #{maId} and is_active = 1
|
update ma_dev_info set is_qc = 1 where ma_id = #{maId} and is_active = 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateDevInfoIsSafeBook">
|
<update id="updateDevInfoIsSafeBook">
|
||||||
update ma_dev_info set is_safe_book = 1 where ma_id = #{maId} and is_active = 1
|
update ma_dev_info set is_safe_book = 1 where ma_id = #{maId} and is_active = 1
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -555,7 +570,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="areaId != null and areaId != ''">and d.area_id = #{areaId}</if>
|
<if test="areaId != null and areaId != ''">and d.area_id = #{areaId}</if>
|
||||||
<if test="brand != null and brand != ''">and d.brand = #{brand}</if>
|
<if test="brand != null and brand != ''">and d.brand = #{brand}</if>
|
||||||
<if test="modelName != null and modelName != ''">and d.model_name like concat('%', #{modelName}, '%')</if>
|
<if test="modelName != null and modelName != ''">and d.model_name like concat('%', #{modelName}, '%')</if>
|
||||||
<if test="companyId != null and companyId !=''">and d.own_co = #{companyId}</if>
|
|
||||||
<if test="startTime != null and endTime !='' and endTime != null and endTime !=''">
|
<if test="startTime != null and endTime !='' and endTime != null and endTime !=''">
|
||||||
and d.update_time between #{startTime} and #{endTime}
|
and d.update_time between #{startTime} and #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -569,7 +583,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
or locate(#{keyWord},d.description) > 0
|
or locate(#{keyWord},d.description) > 0
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
and d.own_co = #{companyId}
|
|
||||||
and d.is_active = '1'
|
and d.is_active = '1'
|
||||||
</where>
|
</where>
|
||||||
ORDER BY d.create_time desc
|
ORDER BY d.create_time desc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue