| | |
| | | @ApiModelProperty(value = "购买金额") |
| | | private BigDecimal buyMoney; |
| | | |
| | | @Column(name = "`affiliated_company`",nullable = false) |
| | | @Column(name = "`affiliated_company_id`",nullable = false) |
| | | @NotBlank |
| | | @ApiModelProperty(value = "所属公司") |
| | | private String affiliatedCompany; |
| | | @ApiModelProperty(value = "所属公司id") |
| | | private Long affiliatedCompanyId; |
| | | |
| | | @Column(name = "`state`") |
| | | @ApiModelProperty(value = "使用状态") |
| | |
| | | private BigDecimal buyMoney; |
| | | |
| | | /** 所属公司 */ |
| | | private String affiliatedCompany; |
| | | private Long affiliatedCompanyId; |
| | | |
| | | /** 使用状态 */ |
| | | private String state; |
| | |
| | | private String name; |
| | | |
| | | @Query |
| | | private String affiliatedCompany; |
| | | private Long affiliatedCompanyId; |
| | | |
| | | @Query |
| | | private String state; |
| | |
| | | import me.zhengjie.modules.assetManagement.domain.AssetUseManagement; |
| | | import me.zhengjie.modules.assetManagement.repository.AssetUseManagementRepository; |
| | | import me.zhengjie.modules.constant.Constant; |
| | | import me.zhengjie.modules.system.domain.SysUserCompany; |
| | | import me.zhengjie.modules.system.repository.DictDetailRepository; |
| | | import me.zhengjie.modules.system.repository.SysUserCompanyRepository; |
| | | import me.zhengjie.utils.ValidationUtil; |
| | |
| | | map.put("资产类型", assetManagement.getAssetsType()); |
| | | map.put("购买日期", assetManagement.getBuyDate()); |
| | | map.put("购买金额", assetManagement.getBuyMoney()); |
| | | map.put("所属公司", sysUserCompanyRepository.findByValue(assetManagement.getAffiliatedCompany()).getLabel()); |
| | | map.put("所属公司", sysUserCompanyRepository.findById(assetManagement.getAffiliatedCompanyId()).orElseGet(SysUserCompany::new).getLabel()); |
| | | map.put("使用状态", results); |
| | | map.put("备注", assetManagement.getRemarks()); |
| | | map.put("创建者", assetManagement.getCreateBy()); |
| | |
| | | @ApiModelProperty(value = "标签") |
| | | private String label; |
| | | |
| | | @Column(name = "`value`") |
| | | @ApiModelProperty(value = "值") |
| | | private String value; |
| | | |
| | | public void copy(SysUserCompany source){ |
| | | BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
| | | } |
| | |
| | | private Timestamp birthday; |
| | | |
| | | // 魏传栋 - 始 |
| | | @Column(name = "company") |
| | | @ApiModelProperty(value = "所属公司") |
| | | private String company; |
| | | @Column(name = "company_id") |
| | | @ApiModelProperty(value = "所属公司Id") |
| | | private Long companyId; |
| | | // 魏传栋 - 终 |
| | | |
| | | @Email |
| | |
| | | * 根据value查询公司(导出用) |
| | | * @return |
| | | */ |
| | | @Query |
| | | SysUserCompany findByValue(String value); |
| | | // @Query |
| | | // SysUserCompany findByValue(String value); |
| | | } |
| | |
| | | /** 标签 */ |
| | | private String label; |
| | | |
| | | /** 值 */ |
| | | private String value; |
| | | |
| | | /** 用户id */ |
| | | private Long userId; |
| | | } |
| | |
| | | private Date pwdResetTime; |
| | | |
| | | // 魏传栋 - 始 |
| | | private String company; |
| | | private Long companyId; |
| | | // 魏传栋 - 终 |
| | | } |
| | |
| | | for (SysUserCompanyDto systemSetting : all) { |
| | | Map<String,Object> map = new LinkedHashMap<>(); |
| | | map.put("标签", systemSetting.getLabel()); |
| | | map.put("值", systemSetting.getValue()); |
| | | map.put("描述", systemSetting.getDescription()); |
| | | list.add(map); |
| | | } |
| | |
| | | // 查询用户表 |
| | | User user = userRepository.findById(Long.valueOf(resources.getUserId())).orElseGet(User::new); |
| | | // 查询公司表 |
| | | SysUserCompany sysUserCompany = sysUserCompanyRepository.findByValue(user.getCompany()); |
| | | SysUserCompany sysUserCompany = sysUserCompanyRepository.findById(user.getId()).orElseGet(SysUserCompany::new); |
| | | return sysUserCompany; |
| | | } |
| | | } |
| | |
| | | user.setJobs(resources.getJobs()); |
| | | user.setPhone(resources.getPhone()); |
| | | user.setNickName(resources.getNickName()); |
| | | user.setCompany(resources.getCompany()); |
| | | user.setCompanyId(resources.getCompanyId()); |
| | | user.setGender(resources.getGender()); |
| | | user.setBirthday(resources.getBirthday()); |
| | | user.setAddress(resources.getAddress()); |
| | |
| | | for (UserDto userDTO : queryAll) { |
| | | List<String> roles = userDTO.getRoles().stream().map(RoleSmallDto::getName).collect(Collectors.toList()); |
| | | String levelName = userDTO.getLevelId() != null ? sysLevelRepository.findById(userDTO.getLevelId()).orElseGet(SysLevel::new).getName() : ""; |
| | | SysUserCompany sysUserCompany = sysUserCompanyRepository.findByValue(userDTO.getCompany()); |
| | | SysUserCompany sysUserCompany = sysUserCompanyRepository.findById(userDTO.getCompanyId()).orElseGet(SysUserCompany::new); |
| | | Map<String, Object> map = new LinkedHashMap<>(); |
| | | map.put("用户名", userDTO.getUsername()); |
| | | map.put("角色", roles); |
| | |
| | | class="filter-item" |
| | | @keyup.enter.native="crud.toQuery" |
| | | /> |
| | | <el-select v-model="query.affiliatedCompany" filterable clearable placeholder="所属公司" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery"> |
| | | <el-select v-model="query.affiliatedCompanyId" filterable clearable placeholder="所属公司" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery"> |
| | | <el-option |
| | | v-for="item in companyList" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | <el-select v-model="query.state" filterable clearable placeholder="使用状态" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery"> |
| | |
| | | <el-form-item label="购买金额" prop="buyMoney"> |
| | | <money-input :key="random" v-model="form.buyMoney" :width="370" /> |
| | | </el-form-item> |
| | | <el-form-item label="所属公司" prop="affiliatedCompany"> |
| | | <el-select v-model="form.affiliatedCompany" style="width: 370px" clearable> |
| | | <el-option v-for="item in companyList" :key="item.id" :label="item.label" :value="item.value" /> |
| | | <el-form-item label="所属公司" prop="affiliatedCompanyId"> |
| | | <el-select v-model="form.affiliatedCompanyId" style="width: 370px" clearable> |
| | | <el-option v-for="item in companyList" :key="item.id" :label="item.label" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="使用状态" prop="state"> |
| | |
| | | {{ crud.toMoney(scope.row.buyMoney) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="affiliatedCompany" label="所属公司" show-overflow-tooltip> |
| | | <el-table-column prop="affiliatedCompanyId" label="所属公司" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <template v-for="item in companyList"> |
| | | <span v-if="scope.row.affiliatedCompany == item.value" :key="item.id">{{ item.label }}</span> |
| | | <span v-if="scope.row.affiliatedCompanyId == item.id" :key="item.id">{{ item.label }}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | import constant from '@/utils/constant' |
| | | import moneyInput from '../../assembly/moneyInput/index.vue' |
| | | |
| | | const defaultForm = { id: null, number: null, name: null, typeNumber: null, assetsType: null, buyDate: null, buyMoney: null, affiliatedCompany: null, state: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null } |
| | | const defaultForm = { id: null, number: null, name: null, typeNumber: null, assetsType: null, buyDate: null, buyMoney: null, affiliatedCompanyId: null, state: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null } |
| | | export default { |
| | | name: 'AssetManagement', |
| | | components: { pagination, crudOperation, rrOperation, udOperation, moneyInput }, |
| | |
| | | assetsType: [ |
| | | { required: true, message: '资产类型不能为空', trigger: 'change' } |
| | | ], |
| | | affiliatedCompany: [ |
| | | affiliatedCompanyId: [ |
| | | { required: true, message: '所属公司不能为空', trigger: 'change' } |
| | | ], |
| | | state: [ |
| | |
| | | >{{ item.label }}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="公司" prop="company"> |
| | | <el-select v-model="form.company" style="width: 437px" clearable> |
| | | <el-option v-for="item in companyList" :key="item.id" :label="item.label" :value="item.value" /> |
| | | <el-form-item label="公司" prop="companyId"> |
| | | <el-select v-model="form.companyId" style="width: 437px" clearable> |
| | | <el-option v-for="item in companyList" :key="item.id" :label="item.label" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item style="margin-bottom: 0;" label="角色" prop="roles"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <!-- 魏传栋 - 始 --> |
| | | <el-table-column :show-overflow-tooltip="true" prop="company" label="公司" width="150"> |
| | | <el-table-column :show-overflow-tooltip="true" prop="companyId" label="公司" width="150"> |
| | | <template slot-scope="scope"> |
| | | <template v-for="item in companyList"> |
| | | <span v-if="scope.row.company == item.value" :key="item.id">{{ item.label }}</span> |
| | | <span v-if="scope.row.companyId == item.id" :key="item.id">{{ item.label }}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | { min: 2, max: 100, message: '长度在 2 到 100 个字符', trigger: 'blur' } |
| | | ], |
| | | // 魏传栋 - 始 |
| | | company: [ |
| | | companyId: [ |
| | | { required: true, message: '请选择公司', trigger: 'blur' } |
| | | ] |
| | | // 魏传栋 - 终 |
| | |
| | | <el-form-item label="标签" prop="label"> |
| | | <el-input v-model="form.label" style="width: 370px;" /> |
| | | </el-form-item> |
| | | <el-form-item label="值" prop="value"> |
| | | <el-input v-model="form.value" style="width: 370px;" /> |
| | | </el-form-item> |
| | | <el-form-item label="描述"> |
| | | <el-input v-model="form.description" style="width: 370px;" /> |
| | | </el-form-item> |
| | |
| | | <el-table-column prop="label" label="标签"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.label }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="value" label="值"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.value }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="description" label="描述" /> |
| | |
| | | import udOperation from '@crud/UD.operation' |
| | | import pagination from '@crud/Pagination' |
| | | |
| | | const defaultForm = { id: null, name: null, description: null, label: null, value: null, createBy: null, updateBy: null, createTime: null, updateTime: null } |
| | | const defaultForm = { id: null, name: null, description: null, label: null, createBy: null, updateBy: null, createTime: null, updateTime: null } |
| | | export default { |
| | | name: 'SysUserCompany', |
| | | components: { pagination, crudOperation, rrOperation, udOperation }, |
| | |
| | | rules: { |
| | | label: [ |
| | | { required: true, message: '标签不能为空', trigger: 'blur' } |
| | | ], |
| | | value: [ |
| | | { required: true, message: '值不能为空', trigger: 'blur' } |
| | | ] |
| | | }} |
| | | }, |