Compare commits

..

2 Commits

Author SHA1 Message Date
dingjie a47c83e0aa Merge remote-tracking branch 'origin/dev' into dev 2023-12-23 18:50:28 +08:00
dingjie 83ac831e0a 机具修改 2023-12-23 18:50:18 +08:00
5 changed files with 39 additions and 9 deletions

View File

@ -169,4 +169,16 @@ public class MaMachine extends BaseEntity {
@ApiModelProperty(value = "结束时间")
private String endTime;
@ApiModelProperty(value = "仓库名称")
private String ownHouseName;
@ApiModelProperty(value = "仓库id")
private Long houseId;
@ApiModelProperty(value = "厂家名称")
private String supplier;
}

View File

@ -40,7 +40,7 @@ public class TreeSelect implements Serializable
public TreeSelect(MaHouse maHouse)
{
this.level = maHouse.getLevel();
this.id = maHouse.getDeptId();
this.id = maHouse.getHouseId();
this.label = maHouse.getHouseName();
this.children = maHouse.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}

View File

@ -93,7 +93,19 @@ public class MaMachineServiceImpl implements MaMachineService {
}
@Override
@Transactional
public int updateMaMachine(MaMachine maMachine) {
// 删除类型和资产属性绑定关系
maPropInfoMapper.deleteMaPropSetByPropIds(maMachine.getTypeId());
// 新增机具和资产属性绑定关系
MaPropSet maPropSet = new MaPropSet();
maPropSet.setTypeId(maMachine.getTypeId());
maPropSet.setPropId(maMachine.getPropId());
maPropSet.setCreateTime(new Date());
maPropSet.setCreateBy(SecurityUtils.getUsername());
maPropSet.setCompanyId(maMachine.getCompanyId());
maPropInfoMapper.insertMaPropSet(maPropSet);
return maMachineMapper.updateMaMachine(maMachine);
}

View File

@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
m.ma_vender, m.out_fac_time, m.out_fac_code, m.assets_code, m.check_man, m.this_check_time, m.next_check_time,
m.gps_code, m.rfid_code, m.erp_code, m.transfer_code,m.create_time ,m.in_out_num, m.buy_task, m.own_house ,
m.company_id ,mt.type_name specificationType,mt1.type_name deviceType, mt2.type_name itemType,
mmb.label_code labelCode
mmb.label_code labelCode,mhi.house_name ownHouseName
from ma_machine m
left join (select id,p_id,name from sys_dic where p_id in (select id from sys_dic where value = 'ma_status')) dic on m.ma_status = dic.id
left join ma_type mt on m.type_id = mt.type_id
@ -50,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_type mt2 on mt1.parent_id = mt2.type_id
left join ma_label_bind mmb on m.ma_id = mmb.ma_id and m.type_id = mmb.type_id
left join ma_prop_set mps on mt.type_id = mps.type_id
left join ma_house_info mhi on m.own_house = mhi.house_id
<where>
<if test="maId != null and maId != ''">
AND ma_id = #{maId}
@ -252,12 +253,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectMaMachineByMaId" parameterType="Long" resultMap="MaMachineResult">
select m.ma_id, m.type_id, m.ma_code, m.pre_code, m.ma_status, m.qr_code, m.buy_price, m.ma_vender, m.out_fac_time, m.out_fac_code,
m.assets_code, m.check_man, m.this_check_time, m.next_check_time, m.gps_code, m.rfid_code, m.erp_code, m.transfer_code,
m.in_out_num, m.buy_task, m.own_house ,m.company_id ,mt.type_name specificationType,mt1.type_name deviceType, mt2.type_name itemType
m.in_out_num, m.buy_task, m.own_house ,m.company_id ,mt.type_name specificationType,mt1.type_name deviceType, mt2.type_name itemType,
dic.name maStatusName ,mhi.house_name ownHouseName,mps.prop_id propId, msi.supplier,msi.supplier_id supplierId
from ma_machine m
left join ma_type mt on m.type_id = mt.type_id
left join ma_type mt1 on mt.parent_id = mt1.type_id
left join ma_type mt2 on mt1.parent_id = mt2.type_id
left join (select id,p_id,name from sys_dic where p_id in (select id from sys_dic where value = 'ma_status')) dic on m.ma_status = dic.id
left join ma_house_info mhi on m.own_house = mhi.house_id
left join ma_prop_set mps on mt.type_id = mps.type_id
left join ma_supplier_info msi on m.ma_vender = msi.supplier_id
where ma_id = #{maId}
where m.ma_id = #{maId}
</select>
</mapper>

View File

@ -39,8 +39,8 @@ public class PurchaseMacodeInfo extends BaseEntity
@ApiModelProperty(value = "二维码")
private String qrCode;
/** 固定资产编号 */
@ApiModelProperty(value = "固定资产编号")
/** 是否是固定资产编号 */
@ApiModelProperty(value = "是否是固定资产编号 0,是 1,否")
private String fixCode;
/** 编号类型 */