Merge branch 'master' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management
This commit is contained in:
commit
46482617c5
@ -3,6 +3,7 @@ package com.lz.modules.app.controller;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.lz.common.utils.NumberUtil;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.modules.app.dto.ApprovalDto;
|
||||
import com.lz.modules.app.dto.RecordDetailDto;
|
||||
@ -15,6 +16,8 @@ import com.lz.modules.app.resp.Step;
|
||||
import com.lz.modules.app.service.DepartmentsService;
|
||||
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||
import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.equipment.entity.EquipmentInfo;
|
||||
import com.lz.modules.equipment.service.IEquipmentInfoService;
|
||||
import com.lz.modules.flow.dao.StaffRoleMapper;
|
||||
import com.lz.modules.flow.entity.StaffRole;
|
||||
import com.lz.modules.flow.model.FlowModel;
|
||||
@ -65,6 +68,10 @@ public class TestController {
|
||||
@Autowired
|
||||
private RecordAuthService recordAuthService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private IEquipmentInfoService equipmentInfoService;
|
||||
|
||||
@RequestMapping("/test/xx")
|
||||
public void test(){
|
||||
ResultRecord resultRecord = new ResultRecord();
|
||||
@ -325,7 +332,15 @@ public class TestController {
|
||||
//http://localhost:8080/lz_management/test/equpinfo
|
||||
@RequestMapping("/test/equpinfo")
|
||||
public R equpinfo() {
|
||||
List<EquipmentInfo> equipmentInfos = equipmentInfoService.selectAll();
|
||||
|
||||
for(EquipmentInfo equipmentInfo : equipmentInfos){
|
||||
DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateService.selectByStaffId(equipmentInfo.getUserId());
|
||||
if(departmentsStaffRelateEntity !=null){
|
||||
equipmentInfo.setDepartId(NumberUtil.objToLongDefault(departmentsStaffRelateEntity.getDepartmentId(),-1));
|
||||
}
|
||||
equipmentInfoService.updateCoverEquipmentInfoById(equipmentInfo);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -58,4 +58,6 @@ public interface EquipmentInfoMapper extends BaseMapper<EquipmentInfo> {
|
||||
int updateCoverEquipmentInfoByTypeId(@Param("id") Long id, @Param("type") String type);
|
||||
int updateCoverEquipmentInfoByBrandId(@Param("id") Long id, @Param("brand") String brand);
|
||||
int updateCoverEquipmentInfoBySpecsId(@Param("id") Long id, @Param("specs") String specs);
|
||||
|
||||
List<EquipmentInfo> selectAll();
|
||||
}
|
||||
@ -67,4 +67,6 @@ public interface IEquipmentInfoService extends IService<EquipmentInfo> {
|
||||
int updateCoverEquipmentInfoByBrandId(Long id, String brand);
|
||||
|
||||
int updateCoverEquipmentInfoBySpecsId(Long id, String specs);
|
||||
|
||||
List<EquipmentInfo> selectAll();
|
||||
}
|
||||
@ -332,4 +332,9 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E
|
||||
public int updateCoverEquipmentInfoBySpecsId(Long id, String specs){
|
||||
return equipmentInfoMapper.updateCoverEquipmentInfoBySpecsId(id, specs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EquipmentInfo> selectAll() {
|
||||
return equipmentInfoMapper.selectAll();
|
||||
}
|
||||
}
|
||||
|
||||
@ -309,5 +309,12 @@
|
||||
update equipment_info set spec_type = #{specs} where specs_id=#{id} and is_delete=0
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectAll" resultType="com.lz.modules.equipment.entity.EquipmentInfo">
|
||||
select * from equipment_info
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user