设备新增修改
This commit is contained in:
parent
bca4e13ada
commit
d04607ff31
|
|
@ -33,7 +33,7 @@ public class BookCarInfoDto {
|
||||||
@ApiModelProperty(value = "供应商id")
|
@ApiModelProperty(value = "供应商id")
|
||||||
private Integer supplier;
|
private Integer supplier;
|
||||||
|
|
||||||
@ApiModelProperty(value = "订单状态 (0:未下单 1:已下单 2:待发货 3:已发货)")
|
@ApiModelProperty(value = "订单状态 (0:未下单 1:已下单)")
|
||||||
private String orderStatus;
|
private String orderStatus;
|
||||||
|
|
||||||
@ApiModelProperty(value = "下单用户id")
|
@ApiModelProperty(value = "下单用户id")
|
||||||
|
|
|
||||||
|
|
@ -212,12 +212,12 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
devInfoMapper.insertDevInfo(devInfo);
|
devInfoMapper.insertDevInfo(devInfo);
|
||||||
|
|
||||||
//把文件保存到附件中
|
//把文件保存到附件中
|
||||||
List<SysFileInfo> fileInfoList = devInfo.getFileList();
|
List<BmFileInfo> fileInfoList = devInfo.getBmFileInfoList();
|
||||||
if (CollectionUtil.isNotEmpty(fileInfoList)){
|
if (CollectionUtil.isNotEmpty(fileInfoList)){
|
||||||
for (SysFileInfo sysFileInfo: fileInfoList) {
|
for (BmFileInfo sysFileInfo: fileInfoList) {
|
||||||
sysFileInfo.setModelId(Math.toIntExact(devInfo.getMaId()));
|
sysFileInfo.setModelId(devInfo.getMaId());
|
||||||
sysFileInfo.setCreator(String.valueOf(userId));
|
sysFileInfo.setCreateBy(String.valueOf(userId));
|
||||||
sysFileInfoMapper.insertFileInfo(sysFileInfo);
|
bmFileInfoMapper.insertBmFileInfo(sysFileInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="isOperator" column="is_operator" />
|
<result property="isOperator" column="is_operator" />
|
||||||
<result property="isActive" column="is_active" />
|
<result property="isActive" column="is_active" />
|
||||||
<result property="deviceName" column="device_name" />
|
<result property="deviceName" column="device_name" />
|
||||||
|
<result property="deviceWeight" column="device_weight" />
|
||||||
<result property="groupName" column="group_name" />
|
<result property="groupName" column="group_name" />
|
||||||
<result property="companyName" column="company_name" />
|
<result property="companyName" column="company_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
@ -50,9 +51,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectDevInfoList" parameterType="com.bonus.material.device.domain.vo.DevInfoVo" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
|
<select id="selectDevInfoList" parameterType="com.bonus.material.device.domain.vo.DevInfoVo" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
|
||||||
select d.*,mt1.type_name as device_name, mt2.type_name as group_name, mt3.type_name as type_name,c.company_name
|
select d.*,mt1.type_name as device_name, mt2.type_name as group_name, mt3.type_name as type_name,c.company_name
|
||||||
from ma_dev_info d
|
from ma_dev_info d
|
||||||
left join ma_type_info mt1 on d.type_id = mt1.type_id
|
left join ma_type mt1 on d.type_id = mt1.type_id
|
||||||
left join ma_type_info mt2 on mt1.parent_id = mt2.type_id
|
left join ma_type mt2 on mt1.parent_id = mt2.type_id
|
||||||
left join ma_type_info mt3 on mt2.parent_id = mt3.type_id
|
left join ma_type mt3 on mt2.parent_id = mt3.type_id
|
||||||
left join bm_company_info c on d.own_co = c.company_id
|
left join bm_company_info c on d.own_co = c.company_id
|
||||||
<where>
|
<where>
|
||||||
<if test="maId != null "> and d.ma_id = #{maId}</if>
|
<if test="maId != null "> and d.ma_id = #{maId}</if>
|
||||||
|
|
@ -168,10 +169,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join bm_company_info c on d.own_co = c.company_id
|
left join bm_company_info c on d.own_co = c.company_id
|
||||||
left join ma_user_collect col on d.ma_id = col.ma_id
|
left join ma_user_collect col on d.ma_id = col.ma_id
|
||||||
left join ma_hot_search h on d.ma_id = h.ma_id
|
left join ma_hot_search h on d.ma_id = h.ma_id
|
||||||
left join ma_type_info t on d.type_id = t.type_id
|
left join ma_type t on d.type_id = t.type_id
|
||||||
left join ma_type_info mt1 on d.type_id = mt1.type_id
|
left join ma_type mt1 on d.type_id = mt1.type_id
|
||||||
left join ma_type_info mt2 on mt1.parent_id = mt2.type_id
|
left join ma_type mt2 on mt1.parent_id = mt2.type_id
|
||||||
left join ma_type_info mt3 on mt2.parent_id = mt3.type_id
|
left join ma_type mt3 on mt2.parent_id = mt3.type_id
|
||||||
where d.ma_id = #{maId} and d.is_active='1'
|
where d.ma_id = #{maId} and d.is_active='1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -194,6 +195,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="maId != null and maId != '' ">ma_id,</if>
|
<if test="maId != null and maId != '' ">ma_id,</if>
|
||||||
<if test="code != null and code != '' ">code,</if>
|
<if test="code != null and code != '' ">code,</if>
|
||||||
|
<if test="deviceName != null and deviceName != '' ">device_name,</if>
|
||||||
|
<if test="deviceWeight != null and deviceWeight != '' ">device_weight,</if>
|
||||||
<if test="typeId != null and typeId != ''">type_id,</if>
|
<if test="typeId != null and typeId != ''">type_id,</if>
|
||||||
<if test="maStatus != null and maStatus != ''">ma_status,</if>
|
<if test="maStatus != null and maStatus != ''">ma_status,</if>
|
||||||
<if test="leaseScope != null and leaseScope != ''">lease_scope,</if>
|
<if test="leaseScope != null and leaseScope != ''">lease_scope,</if>
|
||||||
|
|
@ -369,9 +372,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select d.*,t.type_name as device_name,t.parent_name as group_name,c.company_name,u.type as type,t.group_name as type_name,t.p_id as group_id,t.group_id as company_id
|
select d.*,t.type_name as device_name,t.parent_name as group_name,c.company_name,u.type as type,t.group_name as type_name,t.p_id as group_id,t.group_id as company_id
|
||||||
from ma_dev_info d
|
from ma_dev_info d
|
||||||
left join (select t.*, p.type_name as parent_name, p.type_id as p_id,mt.type_name as group_name, mt.type_id as group_id
|
left join (select t.*, p.type_name as parent_name, p.type_id as p_id,mt.type_name as group_name, mt.type_id as group_id
|
||||||
from ma_type_info t
|
from ma_type t
|
||||||
left join ma_type_info p on t.parent_id=p.type_id
|
left join ma_type p on t.parent_id=p.type_id
|
||||||
left join ma_type_info mt on p.parent_id = mt.type_id
|
left join ma_type mt on p.parent_id = mt.type_id
|
||||||
) t on d.type_id = t.type_id
|
) t on d.type_id = t.type_id
|
||||||
left join bm_company_info c on d.own_co = c.company_id
|
left join bm_company_info c on d.own_co = c.company_id
|
||||||
left join ma_up_off u on d.ma_id = u.ma_id ORDER BY d.create_time desc
|
left join ma_up_off u on d.ma_id = u.ma_id ORDER BY d.create_time desc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue