diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java index 7d72ab42..d40171db 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java @@ -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; + + } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/vo/TreeSelect.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/vo/TreeSelect.java index 5a969d6b..19d785f9 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/vo/TreeSelect.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/vo/TreeSelect.java @@ -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()); } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java index 779ccd2a..d39b0227 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java @@ -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); } diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml index b32675e9..0772a381 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml @@ -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 AND ma_id = #{maId} @@ -252,12 +253,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseMacodeInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseMacodeInfo.java index f6140716..f7331948 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseMacodeInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseMacodeInfo.java @@ -39,8 +39,8 @@ public class PurchaseMacodeInfo extends BaseEntity @ApiModelProperty(value = "二维码") private String qrCode; - /** 固定资产编号 */ - @ApiModelProperty(value = "固定资产编号") + /** 是否是固定资产编号 */ + @ApiModelProperty(value = "是否是固定资产编号 0,是 1,否") private String fixCode; /** 编号类型 */