| | |
| | | .doWrite(studentList); |
| | | } |
| | | |
| | | @ValueClassify(value = "é弿º¯æºè®¡å导å
¥") |
| | | @ApiOperation(value = "importOfValueTraceabilityPlan") |
| | | @ValueClassify(value = "é弿º¯æºè®¡å") |
| | | @ApiOperation(value = "é弿º¯æºè®¡å导å
¥") |
| | | @PostMapping("/importOfValueTraceabilityPlan") |
| | | public void importOfValueTraceabilityPlan(MultipartFile file) throws IOException { |
| | | if (file.isEmpty()) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesContents; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesContentsService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = "æå¡åä¾åºåéè´å
¬å¸å表") |
| | | @RestController |
| | | @RequestMapping("/procurementSuppliesContents") |
| | | //@CustomClazzName(name = "èµæºè¦æ±",index = 8) |
| | | @AllArgsConstructor |
| | | public class ProcurementSuppliesContentsController { |
| | | |
| | | private ProcurementSuppliesContentsService procurementSuppliesService; |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥è¯¢ç®å½å表") |
| | | @GetMapping("/directoryListing") |
| | | public Result directoryListing() { |
| | | return Result.success(procurementSuppliesService.directoryListing()); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ ¹æ®idæ¥è¯¢") |
| | | @GetMapping("/selectProcurementSuppliesContentById") |
| | | public Result selectProcurementSuppliesContentById(Integer id) { |
| | | return Result.success(procurementSuppliesService.getById(id)); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "æ·»å åèç¹") |
| | | @PostMapping("/addProcurementSuppliesContents") |
| | | public Result addProcurementSuppliesContents(@RequestBody ProcurementSuppliesContents procurementSupplies) { |
| | | procurementSupplies.setUpdateTime(LocalDateTime.now()); |
| | | procurementSuppliesService.save(procurementSupplies); |
| | | return Result.success(procurementSupplies.getId()); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "æ´æ°åèç¹") |
| | | @PostMapping("/updateProcurementSuppliesContents") |
| | | public Result updateProcurementSuppliesContents(@RequestBody ProcurementSuppliesContents procurementSupplies) { |
| | | return Result.success(procurementSuppliesService.updateById(procurementSupplies)); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "å é¤åèç¹") |
| | | @GetMapping("/deleteProcurementSuppliesContentById") |
| | | public Result deleteProcurementSuppliesContentById(Integer id) { |
| | | List<ProcurementSuppliesContents> list = procurementSuppliesService.list(new LambdaQueryWrapper<ProcurementSuppliesContents>() |
| | | .eq(ProcurementSuppliesContents::getParentId, id)); |
| | | if(list.size() > 0) { |
| | | throw new ErrorException("该èç¹å«æåèç¹,请å
å é¤åèç¹"); |
| | | } |
| | | procurementSuppliesService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥è¯¢ææèç¹") |
| | | @GetMapping("/getNodeNames") |
| | | public Result getNodeNames() { |
| | | return Result.success(procurementSuppliesService.getNodeNames()); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "è·åææäººå") |
| | | @GetMapping("/getUserList") |
| | | public Result getUserList() { |
| | | return Result.success(procurementSuppliesService.getUserList()); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.google.protobuf.ServiceException; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.ProcurementSuppliesExpendDto; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesExpendsService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 03:47:19 |
| | | */ |
| | | @Api(tags = "æå¡åä¾åºåéè´èææ¶è") |
| | | @RestController |
| | | @RequestMapping("/procurementSuppliesExpends") |
| | | //@CustomClazzName(name = "èµæºè¦æ±",index = 8) |
| | | public class ProcurementSuppliesExpendsController { |
| | | @Autowired |
| | | private ProcurementSuppliesExpendsService procurementSuppliesExpendsService; |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "æ¥è¯¢ææè®°å½") |
| | | @GetMapping("/procurementSuppliesExpendlist/{procurementSuppliesListId}") |
| | | public Result procurementSuppliesExpendlist(@PathVariable Long procurementSuppliesListId) { |
| | | return Result.success(procurementSuppliesExpendsService.selectAll(procurementSuppliesListId)); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "æ°å¢æ¶èè®°å½") |
| | | @PostMapping("/addProcurementSuppliesExpends") |
| | | public Result addProcurementSuppliesExpends(@RequestBody ProcurementSuppliesExpendDto dto) throws ServiceException { |
| | | Integer added = procurementSuppliesExpendsService.addExpends(dto); |
| | | |
| | | if ( added == 0) { |
| | | return Result.fail("å½ååºåä¸è¶³"); |
| | | } |
| | | return Result.success(added); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "å 餿¶èè®°å½") |
| | | @PostMapping("/deleteProcurementSuppliesExpends") |
| | | public Result deleteProcurementSuppliesExpends(@RequestBody ProcurementSuppliesExpendDto dto) throws ServiceException { |
| | | return Result.success(procurementSuppliesExpendsService.deleteExpends(dto.getExpendId())); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.ProcurementSuppliesListDto; |
| | | import com.yuanchu.mom.mapper.ProcurementSuppliesListMapper; |
| | | import com.yuanchu.mom.mapper.SupplierManagementMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesList; |
| | | import com.yuanchu.mom.pojo.SupplierManagement; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesListService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ä¸ä¾åºå èæå表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 04:04:32 |
| | | */ |
| | | @Api(tags = "æå¡åä¾åºåéè´èæ") |
| | | @RestController |
| | | @RequestMapping("/procurementSuppliesList") |
| | | //@CustomClazzName(name = "èµæºè¦æ±",index = 8) |
| | | public class ProcurementSuppliesListController { |
| | | @Autowired |
| | | private ProcurementSuppliesListService procurementSuppliesListService; |
| | | |
| | | @Autowired |
| | | private ProcurementSuppliesListMapper listMapper; |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private SupplierManagementMapper supplierManagementMapper; |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "å页æ¥è¯¢") |
| | | @GetMapping("/procurementSuppliesList") |
| | | public Result<IPage<ProcurementSuppliesListDto>> procurementSuppliesList(Page page, ProcurementSuppliesListDto list) { |
| | | return Result.success(procurementSuppliesListService.selectList(page, list)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ ¹æ®idæ¥è¯¢èæ") |
| | | @GetMapping("/selectProcurementSuppliesListById") |
| | | public Result selectProcurementSuppliesListById(Integer id) { |
| | | ProcurementSuppliesList procurementSuppliesStore = listMapper.selectById(id); |
| | | ProcurementSuppliesListDto dto = new ProcurementSuppliesListDto(); |
| | | BeanUtils.copyProperties(procurementSuppliesStore, dto); |
| | | |
| | | User user = userMapper.selectById(procurementSuppliesStore.getPersonInCharge()); |
| | | User updateUser = userMapper.selectById(procurementSuppliesStore.getUpdateUser()); |
| | | SupplierManagement supplierManagement = supplierManagementMapper.selectById(procurementSuppliesStore.getSupplier()); |
| | | |
| | | dto.setPersonInChargeName(user.getName()); |
| | | dto.setUpdateUserName(updateUser.getName()); |
| | | dto.setSupplierName(supplierManagement.getSupplierName()); |
| | | return Result.success(dto); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "æ°å¢èæ") |
| | | @PostMapping("/addProcurementSuppliesList") |
| | | public Result addProcurementSuppliesList(@RequestBody ProcurementSuppliesListDto dto) { |
| | | return Result.success(procurementSuppliesListService.addProcurementSuppliesList(dto)); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "ç¼è¾èæ") |
| | | @PostMapping("/updateProcurementSuppliesList") |
| | | public Result updateProcurementSuppliesList(@RequestBody ProcurementSuppliesListDto dto) { |
| | | return Result.success(procurementSuppliesListService.updateProcurementSuppliesList(dto)); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "å é¤èæ") |
| | | @PostMapping("/deleteProcurementSuppliesList") |
| | | public Result deleteProcurementSuppliesList(@RequestBody ProcurementSuppliesListDto dto) { |
| | | return Result.success(listMapper.deleteById(dto.getId())); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "导åºèæå表") |
| | | @PostMapping("/exportProcurementSuppliesList/{parentId}") |
| | | public void exportProcurementSuppliesList( @PathVariable Integer parentId ,HttpServletResponse response) throws Exception { |
| | | procurementSuppliesListService.exportProcurementSuppliesList(parentId,response); |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.StoreDto; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesConsumables; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesStore; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesConsumablesService; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesStoreService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Api(tags = "æå¡åä¾åºåéè´èæå
¥åº") |
| | | @RestController |
| | | @RequestMapping("/procurementSuppliesStore") |
| | | //@CustomClazzName(name = "èµæºè¦æ±",index = 8) |
| | | @AllArgsConstructor |
| | | public class ProcurementSuppliesStoreController { |
| | | |
| | | private ProcurementSuppliesStoreService storeService; |
| | | |
| | | private ProcurementSuppliesConsumablesService consumablesService; |
| | | |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "èæå
¥åºå页æ¥è¯¢") |
| | | @PostMapping("/storeList") |
| | | public Result storeList(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | StoreDto storeDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), StoreDto.class); |
| | | return Result.success(storeService.selectStoreList(page, storeDto)); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "æ·»å èæå
¥åºå表") |
| | | @PostMapping("/addStore") |
| | | public Result addStore(@RequestBody Map<String,Object> map) { |
| | | storeService.addStore(map); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "å é¤èæå
¥åº") |
| | | @GetMapping("/deleteStore") |
| | | public Result deleteStore(@RequestParam("id") Integer id,@RequestParam("consumablesId") Integer consumablesId) { |
| | | storeService.deleteStore(id,consumablesId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "æ´æ°èæå
¥åº") |
| | | @PostMapping("/updateStore") |
| | | public Result updateStore(@RequestBody Map<String,Object> map) { |
| | | storeService.updateStore(map); |
| | | return Result.success(); |
| | | } |
| | | |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ ¹æ®idæ¥è¯¢èæå
¥åº") |
| | | @GetMapping("/selectStoreById") |
| | | public Result selectStore(Integer id) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | ProcurementSuppliesStore procurementSuppliesStore = storeService.getById(id); |
| | | List<ProcurementSuppliesConsumables> list = consumablesService.list(new LambdaQueryWrapper<ProcurementSuppliesConsumables>() |
| | | .eq(ProcurementSuppliesConsumables::getStoreId, id)); |
| | | map.put("store", procurementSuppliesStore); |
| | | map.put("consumables", list); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel/{parentId}") |
| | | public void exportExcel(@PathVariable Integer parentId, HttpServletResponse response) throws IOException { |
| | | storeService.exportExcel(parentId, response); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.CustomClazzName; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.pojo.SupplierManagement; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesContentsService; |
| | | import com.yuanchu.mom.service.SupplierManagementService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:46:45 |
| | | */ |
| | | @Api(tags = "ä¾åºå管ç") |
| | | @RestController |
| | | @RequestMapping("/supplierManagement") |
| | | @AllArgsConstructor |
| | | //@CustomClazzName(name = "ä¾åºå管ç", index = 10) |
| | | public class SupplierManagementController { |
| | | |
| | | @Autowired |
| | | private SupplierManagementService supplierManagementService; |
| | | |
| | | @Autowired |
| | | private ProcurementSuppliesContentsService procurementSuppliesContentsService; |
| | | |
| | | private GetLook getLook; |
| | | |
| | | @ValueAuth |
| | | @ApiOperation("æ¥è¯¢ä¾æ¹åå½") |
| | | @GetMapping("/selectSupplierManagementByParentId/{parentId}") |
| | | public Result<List<SupplierManagement>> selectSupplierManagementByParentId(@PathVariable Integer parentId) throws Exception { |
| | | return Result.success(supplierManagementService.selectSupplierManagementByParentId(parentId)); |
| | | } |
| | | |
| | | |
| | | @ValueClassify(value = "ä¾åºå管ç") |
| | | @ApiOperation("å页æ¥è¯¢åæ ¼ä¾æ¹åå½") |
| | | @GetMapping("/selectQualifiedSupplierManagementPage") |
| | | public Result<IPage<SupplierManagement>> selectQualifiedSupplierManagement(SupplierManagement supplierManagement, Page page) throws Exception { |
| | | return Result.success(supplierManagementService.selectQualifiedSupplierManagement(page, supplierManagement)); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢ä¾åºå") |
| | | @GetMapping("/selectQualifiedSupplierManagementById/{supplierManagementId}") |
| | | public Result<List<SupplierManagement>> selectQualifiedSupplierManagementById(@PathVariable Integer supplierManagementId) throws Exception { |
| | | return Result.success(supplierManagementService.selectQualifiedSupplierManagementById(supplierManagementId)); |
| | | } |
| | | |
| | | @ValueClassify(value = "ä¾åºå管ç") |
| | | @ApiOperation("æ°å¢ä¾åºå") |
| | | @PostMapping("/addSupplierManagement") |
| | | public Result addSupplierManagement(@RequestBody SupplierManagement supplierManagement) { |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectRoleLists"); |
| | | supplierManagement.setCreateUser(map1.get("userId")); |
| | | return Result.success(supplierManagementService.save(supplierManagement)); |
| | | } |
| | | |
| | | @ValueClassify(value = "ä¾åºå管ç") |
| | | @ApiOperation("ä¿®æ¹ä¾åºå") |
| | | @PostMapping("/updateSupplierManagement") |
| | | public Result updateSupplierManagement(@RequestBody SupplierManagement supplierManagement) { |
| | | return Result.success(supplierManagementService.updateById(supplierManagement)); |
| | | } |
| | | |
| | | @ValueClassify(value = "ä¾åºå管ç") |
| | | @ApiOperation("å é¤ä¾åºå") |
| | | @PostMapping("/delSupplierManagement/{id}") |
| | | public Result delSupplierManagement(@PathVariable Integer id) { |
| | | return Result.success(supplierManagementService.removeById(id)); |
| | | } |
| | | |
| | | @ValueClassify(value = "ä¾åºå管ç") |
| | | @ApiOperation("导åºä¾åºå") |
| | | @PostMapping("/exportSupplierManagement/{parentId}") |
| | | public void exportSupplierManagement(@PathVariable Integer parentId, HttpServletResponse response) throws Exception { |
| | | supplierManagementService.exportSupplierManagement(parentId, response); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation("æ¥è¯¢å
¨é¨ä¾æ¹åå½") |
| | | @GetMapping("/selectSupplierManagementAll") |
| | | public Result<List<SupplierManagement>> selectSupplierManagementAll() throws Exception { |
| | | return Result.success(supplierManagementService.selectSupplierManagementAll()); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.pojo.SuppliersDirectoryContents; |
| | | import com.yuanchu.mom.service.SuppliersDirectoryContentsService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡åä¾åºåéè´ç®å½ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-17 06:14:51 |
| | | */ |
| | | @Api(tags = "ä¾åºåç®¡çæ ") |
| | | @RestController |
| | | @RequestMapping("/suppliersDirectoryContents") |
| | | //@CustomClazzName(name = "ä¾åºå管ç", index = 10) |
| | | public class SuppliersDirectoryContentsController { |
| | | |
| | | @Autowired |
| | | private SuppliersDirectoryContentsService suppliersDirectoryContentsService; |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥è¯¢ç®å½å表") |
| | | @GetMapping("/suppliersDirectoryContentsListing") |
| | | public Result suppliersDirectoryContentsListing() { |
| | | return Result.success(suppliersDirectoryContentsService.directoryListing()); |
| | | |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ ¹æ®idæ¥è¯¢") |
| | | @GetMapping("/selectSuppliersDirectoryContentsById") |
| | | public Result selectSuppliersDirectoryContentsById(Integer id) { |
| | | return Result.success(suppliersDirectoryContentsService.getById(id)); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "æ·»å åèç¹") |
| | | @PostMapping("/addSuppliersDirectoryContents") |
| | | public Result addSuppliersDirectoryContents(@RequestBody SuppliersDirectoryContents suppliersDirectoryContents ) { |
| | | suppliersDirectoryContents.setUpdateTime(LocalDateTime.now()); |
| | | suppliersDirectoryContentsService.save(suppliersDirectoryContents); |
| | | return Result.success(suppliersDirectoryContents.getId()); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "æ´æ°åèç¹") |
| | | @PostMapping("/updateSuppliersDirectoryContents") |
| | | public Result updateSuppliersDirectoryContents(@RequestBody SuppliersDirectoryContents suppliersDirectoryContents) { |
| | | return Result.success(suppliersDirectoryContentsService.updateById(suppliersDirectoryContents)); |
| | | } |
| | | |
| | | @ValueClassify("æå¡åä¾åºåéè´") |
| | | @ApiOperation(value = "å é¤åèç¹") |
| | | @GetMapping("/deleteSuppliersDirectoryContentsById") |
| | | public Result deleteSuppliersDirectoryContentsById(Integer id) { |
| | | List<SuppliersDirectoryContents> list = suppliersDirectoryContentsService.list(new LambdaQueryWrapper<SuppliersDirectoryContents>() |
| | | .eq(SuppliersDirectoryContents::getParentId, id)); |
| | | if(list.size() > 0) { |
| | | throw new ErrorException("该èç¹å«æåèç¹,请å
å é¤åèç¹"); |
| | | } |
| | | suppliersDirectoryContentsService.removeById(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "æ¥è¯¢ææèç¹") |
| | | @GetMapping("/getSuppliersDirectoryContentsNodeNames") |
| | | public Result getSuppliersDirectoryContentsNodeNames() { |
| | | return Result.success(suppliersDirectoryContentsService.getSuppliersDirectoryContentsNodeNames()); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesExpends; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ProcurementSuppliesExpendDto extends ProcurementSuppliesExpends { |
| | | private String listName; // 项ç®èæåç§° |
| | | private String enterUserName; // å½å
¥äººåç§° |
| | | private String updateUserName; // æ´æ°äººåç§° |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesList; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class ProcurementSuppliesListDto extends ProcurementSuppliesList { |
| | | @ExcelProperty("åèä¾åºå") |
| | | private String supplierName; // ä¾åºååç§° |
| | | @ExcelProperty("æ´æ°äºº") |
| | | private String updateUserName; // æ´æ°äººåç§° |
| | | @ExcelProperty("è´è´£äºº") |
| | | private String personInChargeName; // è´è´£äººåç§° |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class ProcurementSuppliesListEDto { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty("ç¼å·") |
| | | @ExcelProperty("ç¼å·") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("èæç±»å") |
| | | @ExcelProperty("ç±»å«") |
| | | private String consumablesType; |
| | | |
| | | @ApiModelProperty("è´§å·") |
| | | @ExcelProperty("è´§å·") |
| | | private String itemNumber; |
| | | |
| | | @ApiModelProperty("èæåç§°") |
| | | @ExcelProperty("åç§°") |
| | | private String consumablesName; |
| | | |
| | | @ApiModelProperty("è§æ ¼") |
| | | @ExcelProperty("è§æ ¼") |
| | | private String specifications; |
| | | |
| | | @ApiModelProperty("计éåä½") |
| | | @ExcelProperty("计éåä½") |
| | | private String unit; |
| | | |
| | | |
| | | |
| | | |
| | | @ApiModelProperty("åºåä¸é") |
| | | @ExcelProperty("åºåä¸é") |
| | | private Integer lowerLimit; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ExcelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | |
| | | @ApiModelProperty("å½ååºåæ°é") |
| | | @ExcelProperty("å½ååºå") |
| | | private Integer currentAmount; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesStore; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class StoreDto extends ProcurementSuppliesStore { |
| | | |
| | | |
| | | @ValueTableShow(value = 2,name = "èæåç§°") |
| | | private String consumablesName; |
| | | |
| | | @ValueTableShow(value = 3,name = "å
¥åºæ°é") |
| | | private Integer storeNumber; |
| | | |
| | | @ValueTableShow(value = 4,name = "å
¥åºæ»ä»·") |
| | | private Double totalPrice; |
| | | |
| | | @ValueTableShow(value = 8,name = "ç»è®°äºº") |
| | | private String registrantName; |
| | | |
| | | @ValueTableShow(value = 5,name = "å
¥åºäºº") |
| | | private String storageUserName; |
| | | |
| | | private Integer consumablesId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.dto; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | public class SupplierManagementDto { |
| | | |
| | | @ApiModelProperty("ä¾åºå") |
| | | @ExcelProperty("ä¾åºå") |
| | | @ValueTableShow(1) |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty("ç¼å·") |
| | | @ExcelProperty("ç¼å·") |
| | | @ValueTableShow(2) |
| | | private String supplierRef; |
| | | |
| | | @ApiModelProperty("ä¾åºåç©åæå¡åç§°") |
| | | @ExcelProperty("ä¾åºåç©åæå¡åç§°") |
| | | @ValueTableShow(3) |
| | | private String supplierItemServiceName; |
| | | |
| | | @ApiModelProperty("é®ç¼") |
| | | @ExcelProperty("é®ç¼") |
| | | @ValueTableShow(4) |
| | | private String postalCode; |
| | | |
| | | @ApiModelProperty("å°å") |
| | | @ExcelProperty("å°å") |
| | | @ValueTableShow(4) |
| | | private String adress; |
| | | |
| | | @ApiModelProperty("è系人") |
| | | @ExcelProperty("è系人") |
| | | @ValueTableShow(5) |
| | | private String contacts; |
| | | |
| | | @ApiModelProperty("èç³»çµè¯") |
| | | @ExcelProperty("èç³»çµè¯") |
| | | @ValueTableShow(6) |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("æ·å") |
| | | @ExcelProperty("æ·å") |
| | | @ValueTableShow(6) |
| | | private String householdName; |
| | | |
| | | @ApiModelProperty("ä¼ ç") |
| | | @ExcelProperty("ä¼ ç") |
| | | @ValueTableShow(7) |
| | | private String fax; |
| | | |
| | | @ApiModelProperty("弿·è¡") |
| | | @ExcelProperty("弿·è¡") |
| | | @ValueTableShow(8) |
| | | private String openingName; |
| | | |
| | | @ApiModelProperty("ç½å") |
| | | @ExcelProperty("ç½å") |
| | | @ValueTableShow(9) |
| | | private String website; |
| | | |
| | | @ApiModelProperty("è´¦å·") |
| | | @ExcelProperty("è´¦å·") |
| | | @ValueTableShow(10) |
| | | private String accountName; |
| | | |
| | | @ApiModelProperty("email") |
| | | @ExcelProperty("email") |
| | | @ValueTableShow(11) |
| | | private String email; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ExcelProperty("夿³¨") |
| | | @ValueTableShow(12) |
| | | private String remarks; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class StoreExcel { |
| | | @ExcelProperty("å
¥åºåå·") |
| | | private String oddNumbers; |
| | | |
| | | @ExcelProperty("èæåç§°") |
| | | private String consumablesName; |
| | | |
| | | @ExcelProperty("å
¥åºæ°é") |
| | | private Integer storeNumber; |
| | | |
| | | @ExcelProperty("å
¥åºæ»ä»·") |
| | | private Double totalPrice; |
| | | |
| | | @ExcelProperty("å
¥åºäºº") |
| | | private String storageUserName; |
| | | |
| | | @ExcelProperty("å
¥åºæ¥æ") |
| | | private LocalDate storageTime; |
| | | |
| | | @ExcelProperty("说æ") |
| | | private String remark; |
| | | |
| | | @ExcelProperty("ç»è®°äºº") |
| | | private String registrantName; |
| | | |
| | | @ExcelProperty("ç»è®°æ¥æ") |
| | | private LocalDate registrantTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesConsumables; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ProcurementSuppliesConsumablesMapper extends BaseMapper<ProcurementSuppliesConsumables> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesContents; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ProcurementSuppliesContentsMapper extends BaseMapper<ProcurementSuppliesContents> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesExpends; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 03:47:19 |
| | | */ |
| | | public interface ProcurementSuppliesExpendsMapper extends BaseMapper<ProcurementSuppliesExpends> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.ProcurementSuppliesListDto; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesList; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ä¸ä¾åºå èæå表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 04:04:32 |
| | | */ |
| | | public interface ProcurementSuppliesListMapper extends BaseMapper<ProcurementSuppliesList> { |
| | | IPage<ProcurementSuppliesList> selectProcurementSuppliesList(Page page, @Param("ew") ProcurementSuppliesListDto ew); |
| | | |
| | | ProcurementSuppliesList selectProcurementSuppliesListForUpdate(@Param("id") Long id); |
| | | |
| | | List<ProcurementSuppliesList> selectProcurementSuppliesListAll(@Param("ew") ProcurementSuppliesListDto ew); |
| | | |
| | | List<ProcurementSuppliesList> selectProcurementSuppliesListByContentsId(@Param("id") Integer contentsId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.dto.StoreDto; |
| | | import com.yuanchu.mom.excel.StoreExcel; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesStore; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface ProcurementSuppliesStoreMapper extends BaseMapper<ProcurementSuppliesStore> { |
| | | |
| | | IPage<StoreDto> selectStoreList(Page page, @Param("ew") QueryWrapper<StoreDto> ew); |
| | | |
| | | /** |
| | | * åæ å
³èçæ¡ä»¶ï¼ï¼ï¼ç®å没æå
³èå
³ç³» WHERE s.contents_id = #{contentsId} |
| | | * @param contentsId |
| | | * @return |
| | | */ |
| | | List<StoreExcel> exportExcel(Integer contentsId); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.pojo.SupplierManagement; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:46:45 |
| | | */ |
| | | @Mapper |
| | | public interface SupplierManagementMapper extends BaseMapper<SupplierManagement> { |
| | | |
| | | IPage<SupplierManagement> pageSupplierManagement(Page page, @Param("ew") QueryWrapper<SupplierManagement> supplierManagementQueryWrapper); |
| | | |
| | | IPage<SupplierManagement> selectQualifiedSupplierManagement(Page page, @Param("ew") QueryWrapper<SupplierManagement> supplierManagementQueryWrapper); |
| | | |
| | | List<SupplierManagement> selectSupplierManagementAll(@Param("parentId") Integer parentId); |
| | | |
| | | List<SupplierManagement> selectSupplierManagement(@Param("parentId")Integer parentId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.yuanchu.mom.pojo.SuppliersDirectoryContents; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡åä¾åºåéè´ç®å½ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-17 06:14:51 |
| | | */ |
| | | public interface SuppliersDirectoryContentsMapper extends BaseMapper<SuppliersDirectoryContents> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @TableName("procurement_supplies_consumables") |
| | | @ApiModel("èæéè´æç»è¡¨") |
| | | @JsonIgnoreProperties(ignoreUnknown = true) |
| | | public class ProcurementSuppliesConsumables { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("èæä¸»è¡¨id") |
| | | private Integer storeId; |
| | | |
| | | @ApiModelProperty("èæåç§°") |
| | | private String consumablesName; |
| | | |
| | | @ApiModelProperty("åä»·") |
| | | private Double unitPrice; |
| | | |
| | | @ApiModelProperty("å
¥åºæ°é") |
| | | private Integer storeNumber; |
| | | |
| | | @ApiModelProperty("æ»ä»·") |
| | | private Double totalPrice; |
| | | |
| | | @ApiModelProperty("è´§å·") |
| | | private String itemNumber; |
| | | |
| | | @ApiModelProperty("ç±»å«") |
| | | private String type; |
| | | |
| | | @ApiModelProperty("è§æ ¼") |
| | | private String specifications; |
| | | |
| | | @ApiModelProperty("åèä¾åºå") |
| | | private String supplier; |
| | | |
| | | @ApiModelProperty("计éåä½") |
| | | private String unit; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @TableName("procurement_supplies_contents") |
| | | @ApiModel("æå¡åä¾åºåéè´è¡¨") |
| | | public class ProcurementSuppliesContents { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("èç¹åç§°") |
| | | private String nodeName; |
| | | |
| | | @ApiModelProperty("代å·") |
| | | private String code; |
| | | |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ç¶èç¹") |
| | | private Integer parentId; |
| | | |
| | | @TableField(exist = false) |
| | | private List<ProcurementSuppliesContents> children; |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 03:47:19 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("procurement_supplies_expends") |
| | | @ApiModel(value = "ProcurementSuppliesExpends对象", description = "") |
| | | public class ProcurementSuppliesExpends implements Serializable { |
| | | |
| | | |
| | | @ApiModelProperty("主表Id") |
| | | @TableId(value = "expend_id", type = IdType.AUTO) |
| | | private Long expendId; |
| | | |
| | | @ApiModelProperty("èæId") |
| | | private Long listId; |
| | | |
| | | @ApiModelProperty("æ¶èæ°é") |
| | | private Integer amount; |
| | | |
| | | @ApiModelProperty("å½å
¥äººid") |
| | | private Integer enterUserId; |
| | | |
| | | @ApiModelProperty("æ´æ°äººid") |
| | | private Integer updateUserId; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ä¸ä¾åºå èæå表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 04:04:32 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("procurement_supplies_list") |
| | | @ApiModel(value = "ProcurementSuppliesList对象", description = "æå¡ä¸ä¾åºå èæå表") |
| | | public class ProcurementSuppliesList implements Serializable { |
| | | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty("ç¼å·") |
| | | @ExcelProperty("ç¼å·") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("ç®å½id") |
| | | private Long contentsId; |
| | | |
| | | @ApiModelProperty("èæç±»å") |
| | | @ExcelProperty("ç±»å«") |
| | | private String consumablesType; |
| | | |
| | | @ApiModelProperty("è´§å·") |
| | | @ExcelProperty("è´§å·") |
| | | private String itemNumber; |
| | | |
| | | @ApiModelProperty("èæåç§°") |
| | | @ExcelProperty("åç§°") |
| | | private String consumablesName; |
| | | |
| | | @ApiModelProperty("è§æ ¼") |
| | | @ExcelProperty("è§æ ¼") |
| | | private String specifications; |
| | | |
| | | @ApiModelProperty("计éåä½") |
| | | @ExcelProperty("计éåä½") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty("åèä»·æ ¼") |
| | | private BigDecimal referencePrice; |
| | | |
| | | @ApiModelProperty("åæ¾ä½ç½®") |
| | | private Integer contentId; |
| | | |
| | | @ApiModelProperty("è´è´£äºº") |
| | | private Integer personInCharge; |
| | | |
| | | @ApiModelProperty("åºåä¸é") |
| | | private Integer upperLimit; |
| | | |
| | | @ApiModelProperty("åºåä¸é") |
| | | @ExcelProperty("åºåä¸é") |
| | | private Integer lowerLimit; |
| | | |
| | | @ApiModelProperty("ä¾åºå") |
| | | private Integer supplier; |
| | | |
| | | @ApiModelProperty("èæå¾æ ") |
| | | private String consumablesIcon; |
| | | |
| | | @ApiModelProperty("èæéä»¶") |
| | | private String attachment; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ExcelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("å½ååºåæ°é") |
| | | @ExcelProperty("å½ååºå") |
| | | private Integer currentAmount; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | @TableName("procurement_supplies_store") |
| | | @ApiModel("èæå
¥åºè¡¨") |
| | | @JsonIgnoreProperties(ignoreUnknown = true) |
| | | public class ProcurementSuppliesStore implements Serializable { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("ç®å½id") |
| | | private Integer contentsId; |
| | | |
| | | @ApiModelProperty("å
¥åºåå·") |
| | | @ValueTableShow(value = 1,name = "å
¥åºåå·") |
| | | private String oddNumbers; |
| | | |
| | | @ApiModelProperty("å
¥åºåºå") |
| | | private String inventory; |
| | | |
| | | @ApiModelProperty("å
¥åºæ»éé¢") |
| | | private Double totalAmount; |
| | | |
| | | @ApiModelProperty("å
¥åºäºº") |
| | | private Integer storageUser; |
| | | |
| | | @ApiModelProperty("å
¥åºæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @ValueTableShow(value = 6,name = "å
¥åºæ¥æ") |
| | | private LocalDate storageTime; |
| | | |
| | | @ApiModelProperty("å
¥åºè¯´æ") |
| | | @ValueTableShow(value = 7,name = "说æ") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("ç»è®°äºº") |
| | | private Integer registrant; |
| | | |
| | | @ApiModelProperty("ç»è®°æ¶é´") |
| | | @ValueTableShow(value = 9,name = "ç»è®°æ¥æ") |
| | | private LocalDate registrantTime; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.yuanchu.mom.annotation.ValueTableShow; |
| | | import com.yuanchu.mom.common.OrderBy; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:46:45 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("cnas_supplier_management") |
| | | @ApiModel(value = "SupplierManagement对象", description = "") |
| | | public class SupplierManagement extends OrderBy implements Serializable { |
| | | |
| | | |
| | | @ApiModelProperty("主表Id") |
| | | @TableId(value = "supplier_management_id", type = IdType.AUTO) |
| | | private Integer supplierManagementId; |
| | | |
| | | @ApiModelProperty("ä¾åºå") |
| | | @ExcelProperty("ä¾åºå") |
| | | @ValueTableShow(1) |
| | | private String supplierName; |
| | | |
| | | @ApiModelProperty("ç¼å·") |
| | | @ExcelProperty("ç¼å·") |
| | | @ValueTableShow(2) |
| | | private String supplierRef; |
| | | |
| | | @ApiModelProperty("ä¾åºåç©åæå¡åç§°") |
| | | @ExcelProperty("ä¾åºåç©åæå¡åç§°") |
| | | @ValueTableShow(3) |
| | | private String supplierItemServiceName; |
| | | |
| | | @ApiModelProperty("é®ç¼") |
| | | @ExcelProperty("é®ç¼") |
| | | @ValueTableShow(4) |
| | | private String postalCode; |
| | | |
| | | @ApiModelProperty("å°å") |
| | | @ExcelProperty("å°å") |
| | | @ValueTableShow(4) |
| | | private String adress; |
| | | |
| | | @ApiModelProperty("logo") |
| | | private String logo; |
| | | |
| | | @ApiModelProperty("è系人") |
| | | @ExcelProperty("è系人") |
| | | @ValueTableShow(5) |
| | | private String contacts; |
| | | |
| | | @ApiModelProperty("èç³»çµè¯") |
| | | @ExcelProperty("èç³»çµè¯") |
| | | @ValueTableShow(6) |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("æ·å") |
| | | @ExcelProperty("æ·å") |
| | | @ValueTableShow(6) |
| | | private String householdName; |
| | | |
| | | @ApiModelProperty("ä¼ ç") |
| | | @ExcelProperty("ä¼ ç") |
| | | @ValueTableShow(7) |
| | | private String fax; |
| | | |
| | | @ApiModelProperty("弿·è¡") |
| | | @ExcelProperty("弿·è¡") |
| | | @ValueTableShow(8) |
| | | private String openingName; |
| | | |
| | | @ApiModelProperty("ç½å") |
| | | @ExcelProperty("ç½å") |
| | | @ValueTableShow(9) |
| | | private String website; |
| | | |
| | | @ApiModelProperty("è´¦å·") |
| | | @ExcelProperty("è´¦å·") |
| | | @ValueTableShow(10) |
| | | private String accountName; |
| | | |
| | | @ApiModelProperty("email") |
| | | @ExcelProperty("email") |
| | | @ValueTableShow(11) |
| | | private String email; |
| | | |
| | | @ApiModelProperty("夿³¨") |
| | | @ExcelProperty("夿³¨") |
| | | @ValueTableShow() |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty("éä»¶") |
| | | private String enclosure; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | private String status; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("ç¶id") |
| | | private Integer parentId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡åä¾åºåéè´ç®å½ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-17 06:14:51 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("suppliers_directory_contents") |
| | | @ApiModel(value = "SuppliersDirectoryContents对象", description = "æå¡åä¾åºåéè´ç®å½") |
| | | public class SuppliersDirectoryContents implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("èç¹åç§°") |
| | | private String nodeName; |
| | | |
| | | @ApiModelProperty("代å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty("æ´æ°äºº") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty("æ´æ°æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ç¶èç¹") |
| | | private Integer parentId; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | private List<SuppliersDirectoryContents> children; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesConsumables; |
| | | |
| | | public interface ProcurementSuppliesConsumablesService extends IService<ProcurementSuppliesConsumables> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesContents; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface ProcurementSuppliesContentsService extends IService<ProcurementSuppliesContents> { |
| | | |
| | | List<ProcurementSuppliesContents> directoryListing(); |
| | | |
| | | List<Map<String,Object>> getNodeNames(); |
| | | |
| | | List<Map<String,Object>> getUserList(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.google.protobuf.ServiceException; |
| | | import com.yuanchu.mom.dto.ProcurementSuppliesExpendDto; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesExpends; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 03:47:19 |
| | | */ |
| | | public interface ProcurementSuppliesExpendsService extends IService<ProcurementSuppliesExpends> { |
| | | public List<ProcurementSuppliesExpendDto> selectAll(Long procurementSuppliesListId); |
| | | public Integer addExpends(ProcurementSuppliesExpendDto expendDto) throws ServiceException; |
| | | public Integer deleteExpends(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.ProcurementSuppliesListDto; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesList; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ä¸ä¾åºå èæå表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 04:04:32 |
| | | */ |
| | | public interface ProcurementSuppliesListService extends IService<ProcurementSuppliesList> { |
| | | IPage<ProcurementSuppliesListDto> selectList(Page page, ProcurementSuppliesListDto list); |
| | | |
| | | public Integer addProcurementSuppliesList(ProcurementSuppliesListDto dto); |
| | | |
| | | public Integer updateProcurementSuppliesList(ProcurementSuppliesListDto dto); |
| | | |
| | | void exportProcurementSuppliesList(Integer contentsId,HttpServletResponse response); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.dto.StoreDto; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesStore; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Map; |
| | | |
| | | public interface ProcurementSuppliesStoreService extends IService<ProcurementSuppliesStore> { |
| | | void addStore(Map<String,Object> map); |
| | | void updateStore(Map<String,Object> map); |
| | | |
| | | void deleteStore(Integer id, Integer consumablesId); |
| | | Map<String,Object> selectStoreList(Page page, StoreDto storeDto); |
| | | |
| | | void exportExcel(Integer contentsId, HttpServletResponse response) throws IOException; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.SupplierManagement; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:46:45 |
| | | */ |
| | | public interface SupplierManagementService extends IService<SupplierManagement> { |
| | | |
| | | List<SupplierManagement> selectSupplierManagement(SupplierManagement supplierManagement); |
| | | |
| | | void exportSupplierManagement(Integer parentId, HttpServletResponse response); |
| | | |
| | | IPage<SupplierManagement> selectQualifiedSupplierManagement(Page page, SupplierManagement supplierManagement); |
| | | |
| | | List<SupplierManagement> selectQualifiedSupplierManagementById(Integer supplierManagementId); |
| | | |
| | | List<SupplierManagement> selectSupplierManagementByParentId(Integer parentId); |
| | | |
| | | List<SupplierManagement> selectSupplierManagementAll(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.yuanchu.mom.pojo.SuppliersDirectoryContents; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡åä¾åºåéè´ç®å½ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-17 06:14:51 |
| | | */ |
| | | public interface SuppliersDirectoryContentsService extends IService<SuppliersDirectoryContents> { |
| | | |
| | | ArrayList<SuppliersDirectoryContents> directoryListing(); |
| | | List<Map<String, Object>> getSuppliersDirectoryContentsNodeNames(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.ProcurementSuppliesConsumablesMapper; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesConsumables; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesConsumablesService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ProcurementSuppliesConsumablesServiceImpl extends ServiceImpl<ProcurementSuppliesConsumablesMapper, ProcurementSuppliesConsumables> |
| | | implements ProcurementSuppliesConsumablesService { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.ProcurementSuppliesContentsMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesContents; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesContentsService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ProcurementSuppliesContentsServiceImpl extends ServiceImpl<ProcurementSuppliesContentsMapper, ProcurementSuppliesContents> |
| | | implements ProcurementSuppliesContentsService { |
| | | |
| | | private UserMapper userMapper; |
| | | |
| | | @Override |
| | | public List<ProcurementSuppliesContents> directoryListing() { |
| | | ArrayList<ProcurementSuppliesContents> list = new ArrayList<>(); |
| | | // æ¥åºä¸çº§ç®å½ |
| | | List<ProcurementSuppliesContents> firstLevel = baseMapper.selectList(new LambdaQueryWrapper<ProcurementSuppliesContents>() |
| | | .isNull(ProcurementSuppliesContents::getParentId)); |
| | | |
| | | // æ¥åºå«æç¶èç¹ç å¹¶éè¿ç¶èç¹åç» |
| | | List<ProcurementSuppliesContents> seconds = baseMapper.selectList(new LambdaQueryWrapper<ProcurementSuppliesContents>() |
| | | .isNotNull(ProcurementSuppliesContents::getParentId)); |
| | | if(firstLevel.size() > 0){ |
| | | Map<Integer, List<ProcurementSuppliesContents>> collect = seconds.stream() |
| | | .collect(Collectors.groupingBy(ProcurementSuppliesContents::getParentId)); |
| | | // æ ¹æ®åç»çkey èµå¼å¯¹åºçchildren |
| | | for (int i = 0; i < firstLevel.size(); i++) { |
| | | recursion(firstLevel.get(i),collect); |
| | | list.add(firstLevel.get(i)); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | // éå½èµå¼children |
| | | public ProcurementSuppliesContents recursion(ProcurementSuppliesContents firstLevel, Map<Integer, List<ProcurementSuppliesContents>> collect) { |
| | | // å°ç¶èç¹çchildrenèµå¼ |
| | | if(collect.containsKey(firstLevel.getId())) { |
| | | List<ProcurementSuppliesContents> procurementSupplies = collect.get(firstLevel.getId()); |
| | | firstLevel.setChildren(procurementSupplies); |
| | | for (int i = 0; i < procurementSupplies.size(); i++) { |
| | | recursion(procurementSupplies.get(i),collect); |
| | | } |
| | | } |
| | | return firstLevel; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getNodeNames() { |
| | | List<ProcurementSuppliesContents> procurementSuppliesContents = baseMapper.selectList(null); |
| | | List<Map<String, Object>> collect = new ArrayList<>(); |
| | | if(procurementSuppliesContents.size() > 0) { |
| | | collect = procurementSuppliesContents.stream().map(item -> { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("id", item.getId()); |
| | | map.put("nodeName", item.getNodeName()); |
| | | return map; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | return collect; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getUserList() { |
| | | // 0 åç¨ |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getState, 1)); |
| | | List<Map<String, Object>> collect = new ArrayList<>(); |
| | | if(users.size() > 0) { |
| | | collect = users.stream().map(item -> { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("id", item.getId()); |
| | | map.put("nodeName", item.getName()); |
| | | return map; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | return collect; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.protobuf.ServiceException; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.dto.ProcurementSuppliesExpendDto; |
| | | import com.yuanchu.mom.mapper.ProcurementSuppliesExpendsMapper; |
| | | import com.yuanchu.mom.mapper.ProcurementSuppliesListMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesExpends; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesList; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesExpendsService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 03:47:19 |
| | | */ |
| | | @Service |
| | | public class ProcurementSuppliesExpendsServiceImpl extends ServiceImpl<ProcurementSuppliesExpendsMapper, ProcurementSuppliesExpends> implements ProcurementSuppliesExpendsService { |
| | | @Autowired |
| | | private ProcurementSuppliesExpendsMapper expendsMapper; |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private ProcurementSuppliesListMapper listMapper; |
| | | |
| | | @Autowired |
| | | private GetLook getLook; |
| | | |
| | | @Override |
| | | public List<ProcurementSuppliesExpendDto> selectAll(Long procurementSuppliesListId) { |
| | | List<ProcurementSuppliesExpendDto> res = new ArrayList<>(); |
| | | List<ProcurementSuppliesExpends> list = expendsMapper.selectList(new QueryWrapper<ProcurementSuppliesExpends>().lambda().eq(ProcurementSuppliesExpends::getListId, procurementSuppliesListId)); |
| | | for (ProcurementSuppliesExpends procurementSuppliesExpend : list) { |
| | | ProcurementSuppliesExpendDto dto = new ProcurementSuppliesExpendDto(); |
| | | BeanUtils.copyProperties(procurementSuppliesExpend, dto); |
| | | |
| | | User enterUser = userMapper.selectById(procurementSuppliesExpend.getEnterUserId()); |
| | | User updateUser = userMapper.selectById(procurementSuppliesExpend.getUpdateUserId()); |
| | | dto.setEnterUserName(enterUser.getName()); |
| | | dto.setUpdateUserName(updateUser.getName()); |
| | | res.add(dto); |
| | | } |
| | | |
| | | return res; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public Integer addExpends(ProcurementSuppliesExpendDto expendDto) throws ServiceException { |
| | | ProcurementSuppliesList list = listMapper.selectProcurementSuppliesListForUpdate(expendDto.getListId()); |
| | | |
| | | ProcurementSuppliesExpends expends = new ProcurementSuppliesExpends(); |
| | | BeanUtils.copyProperties(expendDto, expends); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId(null); |
| | | expends.setEnterUserId(map1.get("userId")); |
| | | expends.setUpdateUserId(map1.get("userId")); |
| | | if (list.getCurrentAmount() < expendDto.getAmount()) { |
| | | return 0; |
| | | } |
| | | |
| | | list.setCurrentAmount(list.getCurrentAmount() - expendDto.getAmount()); |
| | | |
| | | listMapper.updateById(list); |
| | | return expendsMapper.insert(expends); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public Integer deleteExpends(Long id) { |
| | | ProcurementSuppliesExpends expend = expendsMapper.selectById(id); |
| | | ProcurementSuppliesList list = listMapper.selectProcurementSuppliesListForUpdate(expend.getListId()); |
| | | list.setCurrentAmount(list.getCurrentAmount() + expend.getAmount()); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId(null); |
| | | list.setUpdateUser(map1.get("userId")); |
| | | listMapper.updateById(list); |
| | | return expendsMapper.deleteById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.dto.ProcurementSuppliesListDto; |
| | | import com.yuanchu.mom.dto.ProcurementSuppliesListEDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.mapper.ProcurementSuppliesListMapper; |
| | | import com.yuanchu.mom.mapper.SupplierManagementMapper; |
| | | import com.yuanchu.mom.mapper.UserMapper; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesList; |
| | | import com.yuanchu.mom.pojo.SupplierManagement; |
| | | import com.yuanchu.mom.pojo.User; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesListService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ä¸ä¾åºå èæå表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 04:04:32 |
| | | */ |
| | | @Service |
| | | public class ProcurementSuppliesListServiceImpl extends ServiceImpl<ProcurementSuppliesListMapper, ProcurementSuppliesList> implements ProcurementSuppliesListService { |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private SupplierManagementMapper supplierManagementMapper; |
| | | |
| | | @Autowired |
| | | private ProcurementSuppliesListMapper procurementSuppliesListMapper; |
| | | |
| | | @Override |
| | | public IPage<ProcurementSuppliesListDto> selectList(Page page, ProcurementSuppliesListDto list) { |
| | | IPage<ProcurementSuppliesList> iPage = baseMapper.selectProcurementSuppliesList(page, list); |
| | | IPage<ProcurementSuppliesListDto> result = new Page<>(); |
| | | List<ProcurementSuppliesListDto> dtos = new ArrayList<>(); |
| | | BeanUtils.copyProperties(iPage, result); |
| | | for (int i = 0; i < iPage.getRecords().size(); i++) { |
| | | ProcurementSuppliesList record = iPage.getRecords().get(i); |
| | | ProcurementSuppliesListDto dto = new ProcurementSuppliesListDto(); |
| | | BeanUtils.copyProperties(record, dto); |
| | | if (record.getPersonInCharge() != 0) { |
| | | User user = userMapper.selectById(record.getPersonInCharge()); |
| | | dto.setPersonInChargeName(user.getName()); |
| | | } |
| | | if (record.getUpdateUser() != 0) { |
| | | User updateUser = userMapper.selectById(record.getUpdateUser()); |
| | | dto.setUpdateUserName(updateUser.getName()); |
| | | } |
| | | |
| | | if (record.getSupplier() != 0) { |
| | | SupplierManagement supplierManagement = supplierManagementMapper.selectById(record.getSupplier()); |
| | | dto.setSupplierName(supplierManagement.getSupplierName()); |
| | | } |
| | | |
| | | dtos.add(dto); |
| | | } |
| | | result.setRecords(dtos); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public Integer addProcurementSuppliesList(ProcurementSuppliesListDto dto) { |
| | | ProcurementSuppliesList list = new ProcurementSuppliesList(); |
| | | BeanUtils.copyProperties(dto, list); |
| | | return baseMapper.insert(list); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateProcurementSuppliesList(ProcurementSuppliesListDto dto) { |
| | | ProcurementSuppliesList list = new ProcurementSuppliesList(); |
| | | BeanUtils.copyProperties(dto, list); |
| | | return baseMapper.updateById(list); |
| | | } |
| | | |
| | | @Override |
| | | public void exportProcurementSuppliesList(Integer contentsId,HttpServletResponse response) { |
| | | List<ProcurementSuppliesList> data = procurementSuppliesListMapper.selectProcurementSuppliesListByContentsId(contentsId); |
| | | if (contentsId==0){ |
| | | data = procurementSuppliesListMapper.selectList(null); |
| | | } |
| | | if (data.size()==0) { |
| | | throw new ErrorException("æ æ°æ®"); |
| | | } |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | // è¿éURLEncoder.encodeå¯ä»¥é²æ¢ä¸æä¹±ç å½ç¶åeasyexcel没æå
³ç³» |
| | | try { |
| | | String fileName = URLEncoder.encode("èæå表", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | // æ°å»ºExcelWriter |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet(0, "èæå表").head(ProcurementSuppliesListEDto.class).build(); |
| | | excelWriter.write(data, writeSheet); |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | throw new ErrorException("导åºå¤±è´¥"); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | throw new ErrorException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.StoreDto; |
| | | import com.yuanchu.mom.excel.StoreExcel; |
| | | import com.yuanchu.mom.mapper.ProcurementSuppliesConsumablesMapper; |
| | | import com.yuanchu.mom.mapper.ProcurementSuppliesStoreMapper; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesConsumables; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesList; |
| | | import com.yuanchu.mom.pojo.ProcurementSuppliesStore; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesListService; |
| | | import com.yuanchu.mom.service.ProcurementSuppliesStoreService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ProcurementSuppliesStoreServiceImpl extends ServiceImpl<ProcurementSuppliesStoreMapper, ProcurementSuppliesStore> |
| | | implements ProcurementSuppliesStoreService { |
| | | private GetLook getLook; |
| | | |
| | | private ProcurementSuppliesConsumablesMapper consumablesMapper; |
| | | |
| | | @Autowired |
| | | private ProcurementSuppliesListService procurementSuppliesListService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void addStore(Map<String,Object> map) { |
| | | ProcurementSuppliesStore procurementSuppliesStore = JSONObject.parseObject(JSONObject.toJSONString(map.get("store")), ProcurementSuppliesStore.class); |
| | | procurementSuppliesStore.setRegistrant(getLook.selectPowerByMethodAndUserId(null).get("userId")); |
| | | procurementSuppliesStore.setRegistrantTime(LocalDate.now()); |
| | | if (Objects.isNull(procurementSuppliesStore.getId())) { |
| | | baseMapper.insert(procurementSuppliesStore); |
| | | } else { |
| | | baseMapper.updateById(procurementSuppliesStore); |
| | | } |
| | | |
| | | List<ProcurementSuppliesConsumables> list = JSON.parseArray(JSONObject.toJSONString(map.get("consumables")), ProcurementSuppliesConsumables.class); |
| | | for (ProcurementSuppliesConsumables consumables : list) { |
| | | ProcurementSuppliesList one = procurementSuppliesListService.getOne(new QueryWrapper<ProcurementSuppliesList>().lambda() |
| | | .eq(ProcurementSuppliesList::getConsumablesName, consumables.getConsumablesName())); |
| | | one.setCurrentAmount(one.getCurrentAmount() + consumables.getStoreNumber()); |
| | | procurementSuppliesListService.updateById(one); |
| | | } |
| | | // çæè´§å· |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | if(!Objects.isNull(list) && list.size() > 0) { |
| | | for (int i = 0; i < list.size(); i++) { |
| | | list.get(i).setStoreId(procurementSuppliesStore.getId()); |
| | | String itemNumber ="HCRK" + LocalDate.now().format(dateTimeFormatter) + String.format("%03d", i); |
| | | list.get(i).setItemNumber(itemNumber); |
| | | consumablesMapper.insert(list.get(i)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateStore(Map<String,Object> map) { |
| | | ProcurementSuppliesStore procurementSuppliesStore = JSONObject.parseObject(JSONObject.toJSONString(map.get("store")), ProcurementSuppliesStore.class); |
| | | baseMapper.updateById(procurementSuppliesStore); |
| | | List<ProcurementSuppliesConsumables> list = JSON.parseArray(JSONObject.toJSONString(map.get("consumables")), ProcurementSuppliesConsumables.class); |
| | | consumablesMapper.delete(new LambdaQueryWrapper<ProcurementSuppliesConsumables>() |
| | | .eq(ProcurementSuppliesConsumables::getStoreId, procurementSuppliesStore.getId())); |
| | | if(!Objects.isNull(list) && list.size() > 0) { |
| | | for (int i = 0; i < list.size(); i++) { |
| | | list.get(i).setId(null); |
| | | list.get(i).setStoreId(procurementSuppliesStore.getId()); |
| | | consumablesMapper.insert(list.get(i)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void deleteStore(Integer id, Integer consumablesId) { |
| | | consumablesMapper.deleteById(consumablesId); |
| | | List<ProcurementSuppliesConsumables> consumables = consumablesMapper.selectList(new LambdaQueryWrapper<ProcurementSuppliesConsumables>() |
| | | .eq(ProcurementSuppliesConsumables::getStoreId, id)); |
| | | // 夿æ¯å¦è¿æèæ æ²¡æå°±å°ä¸»è¡¨Storeå é¤ |
| | | if(CollectionUtils.isEmpty(consumables)) { |
| | | baseMapper.deleteById(id); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> selectStoreList(Page page, StoreDto storeDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("head", PrintChina.printChina(StoreDto.class)); |
| | | IPage<StoreDto> iPage = baseMapper.selectStoreList(page, QueryWrappers.queryWrappers(storeDto)); |
| | | map.put("body", iPage); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * @param contentsId |
| | | * @param response |
| | | */ |
| | | @Override |
| | | public void exportExcel(Integer contentsId, HttpServletResponse response) throws IOException { |
| | | List<StoreExcel> storeExcels = baseMapper.exportExcel(contentsId); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | // è¿éURLEncoder.encodeå¯ä»¥é²æ¢ä¸æä¹±ç å½ç¶åeasyexcel没æå
³ç³» |
| | | String fileName = null; |
| | | try { |
| | | fileName = URLEncoder.encode("èæå
¥åº", "UTF-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet(0, "èæå
¥åº").head(StoreExcel.class).build(); |
| | | excelWriter.write(storeExcels, writeSheet); |
| | | excelWriter.finish(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.dto.SupplierManagementDto; |
| | | import com.yuanchu.mom.mapper.SupplierManagementMapper; |
| | | import com.yuanchu.mom.pojo.SupplierManagement; |
| | | import com.yuanchu.mom.service.SupplierManagementService; |
| | | import com.yuanchu.mom.utils.QueryWrappers; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-11-15 02:46:45 |
| | | */ |
| | | @Service |
| | | public class SupplierManagementServiceImpl extends ServiceImpl<SupplierManagementMapper, SupplierManagement> implements SupplierManagementService { |
| | | |
| | | @Autowired |
| | | private SupplierManagementMapper supplierManagementMapper; |
| | | |
| | | public SupplierManagementServiceImpl(SupplierManagementMapper supplierManagementMapper) { |
| | | this.supplierManagementMapper = supplierManagementMapper; |
| | | } |
| | | |
| | | @Override |
| | | public List<SupplierManagement> selectSupplierManagement( SupplierManagement supplierManagement) { |
| | | return this.list(); |
| | | } |
| | | |
| | | @Override |
| | | public void exportSupplierManagement(Integer parentId, HttpServletResponse response) { |
| | | List<SupplierManagement> data = supplierManagementMapper.selectSupplierManagementAll(parentId); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | // è¿éURLEncoder.encodeå¯ä»¥é²æ¢ä¸æä¹±ç å½ç¶åeasyexcel没æå
³ç³» |
| | | try { |
| | | String fileName = URLEncoder.encode("ä¾åºå管ç", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | // æ°å»ºExcelWriter |
| | | ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet(0, "ä¾åºå管ç").head(SupplierManagementDto.class).build(); |
| | | excelWriter.write(data, writeSheet); |
| | | // å
³éæµ |
| | | excelWriter.finish(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("导åºå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SupplierManagement> selectQualifiedSupplierManagement(Page page, SupplierManagement supplierManagement) { |
| | | return baseMapper.selectQualifiedSupplierManagement(page, QueryWrappers.queryWrappers(supplierManagement)); |
| | | } |
| | | |
| | | @Override |
| | | public List<SupplierManagement> selectQualifiedSupplierManagementById(Integer supplierManagementId) { |
| | | return this.list(new QueryWrapper<SupplierManagement>().lambda().eq(SupplierManagement::getSupplierManagementId , supplierManagementId)); |
| | | } |
| | | |
| | | @Override |
| | | public List<SupplierManagement> selectSupplierManagementByParentId(Integer parentId) { |
| | | return supplierManagementMapper.selectSupplierManagement(parentId); |
| | | } |
| | | |
| | | @Override |
| | | public List<SupplierManagement> selectSupplierManagementAll() { |
| | | return supplierManagementMapper.selectList(null); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.yuanchu.mom.mapper.SuppliersDirectoryContentsMapper; |
| | | import com.yuanchu.mom.pojo.SuppliersDirectoryContents; |
| | | import com.yuanchu.mom.service.SuppliersDirectoryContentsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡åä¾åºåéè´ç®å½ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2024-12-17 06:14:51 |
| | | */ |
| | | @Service |
| | | public class SuppliersDirectoryContentsServiceImpl extends ServiceImpl<SuppliersDirectoryContentsMapper, SuppliersDirectoryContents> implements SuppliersDirectoryContentsService { |
| | | |
| | | @Override |
| | | public ArrayList<SuppliersDirectoryContents> directoryListing() { |
| | | ArrayList<SuppliersDirectoryContents> list = new ArrayList<>(); |
| | | // æ¥åºä¸çº§ç®å½ |
| | | List<SuppliersDirectoryContents> firstLevel = baseMapper.selectList(new LambdaQueryWrapper<SuppliersDirectoryContents>() |
| | | .isNull(SuppliersDirectoryContents::getParentId)); |
| | | |
| | | // æ¥åºå«æç¶èç¹ç å¹¶éè¿ç¶èç¹åç» |
| | | List<SuppliersDirectoryContents> seconds = baseMapper.selectList(new LambdaQueryWrapper<SuppliersDirectoryContents>() |
| | | .isNotNull(SuppliersDirectoryContents::getParentId)); |
| | | if(firstLevel.size() > 0){ |
| | | Map<Integer, List<SuppliersDirectoryContents>> collect = seconds.stream() |
| | | .collect(Collectors.groupingBy(SuppliersDirectoryContents::getParentId)); |
| | | // æ ¹æ®åç»çkey èµå¼å¯¹åºçchildren |
| | | for (int i = 0; i < firstLevel.size(); i++) { |
| | | recursion(firstLevel.get(i),collect); |
| | | list.add(firstLevel.get(i)); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getSuppliersDirectoryContentsNodeNames() { |
| | | List<SuppliersDirectoryContents> procurementSuppliesContents = baseMapper.selectList(null); |
| | | List<Map<String, Object>> collect = new ArrayList<>(); |
| | | if(procurementSuppliesContents.size() > 0) { |
| | | collect = procurementSuppliesContents.stream().map(item -> { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("id", item.getId()); |
| | | map.put("nodeName", item.getNodeName()); |
| | | return map; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | return collect; |
| | | } |
| | | |
| | | |
| | | public SuppliersDirectoryContents recursion(SuppliersDirectoryContents firstLevel, Map<Integer, List<SuppliersDirectoryContents>> collect) { |
| | | // å°ç¶èç¹çchildrenèµå¼ |
| | | if(collect.containsKey(firstLevel.getId())) { |
| | | List<SuppliersDirectoryContents> procurementSupplies = collect.get(firstLevel.getId()); |
| | | firstLevel.setChildren(procurementSupplies); |
| | | for (int i = 0; i < procurementSupplies.size(); i++) { |
| | | recursion(procurementSupplies.get(i),collect); |
| | | } |
| | | } |
| | | return firstLevel; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.ProcurementSuppliesExpendsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ProcurementSuppliesExpends"> |
| | | <id column="expend_id" property="expendId" /> |
| | | <result column="list_id" property="listId" /> |
| | | <result column="amount" property="amount" /> |
| | | <result column="enter_user_id" property="enterUserId" /> |
| | | <result column="update_user_id" property="updateUserId" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.ProcurementSuppliesListMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.ProcurementSuppliesList"> |
| | | <id column="id" property="id" /> |
| | | <result column="contents_id" property="contentsId" /> |
| | | <result column="consumables_type" property="consumablesType" /> |
| | | <result column="item_number" property="itemNumber" /> |
| | | <result column="consumables_name" property="consumablesName" /> |
| | | <result column="specifications" property="specifications" /> |
| | | <result column="unit" property="unit" /> |
| | | <result column="reference_price" property="referencePrice" /> |
| | | <result column="content_id" property="contentId" /> |
| | | <result column="person_in_charge" property="personInCharge" /> |
| | | <result column="upper_limit" property="upperLimit" /> |
| | | <result column="lower_limit" property="lowerLimit" /> |
| | | <result column="supplier" property="supplier" /> |
| | | <result column="consumables_icon" property="consumablesIcon" /> |
| | | <result column="attachment" property="attachment" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="current_amount" property="currentAmount" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectProcurementSuppliesList" resultMap="BaseResultMap"> |
| | | select * from procurement_supplies_list |
| | | <where> |
| | | <if test="ew.contentsId != null and ew.contentsId != ''"> |
| | | and contents_id = ${ew.contentsId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectProcurementSuppliesListForUpdate" resultMap="BaseResultMap"> |
| | | select * from procurement_supplies_list where id = ${id} for update |
| | | </select> |
| | | |
| | | <select id="selectProcurementSuppliesListAll" resultMap="BaseResultMap"> |
| | | select |
| | | contents_id,item_number, consumables_type, consumables_name, specifications, supplier, upper_limit, |
| | | lower_limit, unit, remark, person_in_charge, update_user, update_time |
| | | from procurement_supplies_list |
| | | <where> |
| | | <if test="ew.contentsId != null and ew.contentsId != ''"> |
| | | and contents_id = ${ew.contentsId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="selectProcurementSuppliesListByContentsId" |
| | | resultType="com.yuanchu.mom.pojo.ProcurementSuppliesList"> |
| | | select id, |
| | | item_number, |
| | | consumables_type, |
| | | consumables_name, |
| | | specifications, |
| | | lower_limit, |
| | | unit, |
| | | remark |
| | | from procurement_supplies_list |
| | | where contents_id = ${id} |
| | | or contents_id in |
| | | (SELECT id |
| | | FROM `procurement_supplies_contents` |
| | | WHERE id = ${id} |
| | | OR parent_id = ${id}) |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.yuanchu.mom.mapper.ProcurementSuppliesStoreMapper"> |
| | | <resultMap id="map" type="com.yuanchu.mom.dto.StoreDto"> |
| | | <id column="id" property="id"/> |
| | | <result column="consumables_id" property="consumablesId"/> |
| | | <result column="odd_numbers" property="oddNumbers"/> |
| | | <result column="consumables_name" property="consumablesName"/> |
| | | <result column="store_number" property="storeNumber"/> |
| | | <result column="total_price" property="totalPrice"/> |
| | | <result column="storage_user" property="storageUser"/> |
| | | <result column="storage_time" property="storageTime"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="registrant" property="registrant"/> |
| | | <result column="registrant_time" property="registrantTime"/> |
| | | <result column="storageUserName" property="storageUserName"/> |
| | | <result column="registrantName" property="registrantName"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="storeExcelMap" type="com.yuanchu.mom.excel.StoreExcel"> |
| | | <result column="odd_numbers" property="oddNumbers"/> |
| | | <result column="consumables_name" property="consumablesName"/> |
| | | <result column="store_number" property="storeNumber"/> |
| | | <result column="total_price" property="totalPrice"/> |
| | | <result column="storage_time" property="storageTime"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="registrant_time" property="registrantTime"/> |
| | | <result column="storageUserName" property="storageUserName"/> |
| | | <result column="registrantName" property="registrantName"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectStoreList" resultMap="map"> |
| | | select * from ( |
| | | SELECT |
| | | s.id, |
| | | c.id AS consumables_id, |
| | | s.contents_id, |
| | | s.odd_numbers, |
| | | c.consumables_name, |
| | | c.store_number, |
| | | c.total_price, |
| | | s.storage_user, |
| | | s.storage_time, |
| | | s.remark, |
| | | s.registrant, |
| | | s.registrant_time, |
| | | u.name AS storageUserName, |
| | | u1.name AS registrantName |
| | | FROM |
| | | `procurement_supplies_store` s |
| | | LEFT JOIN procurement_supplies_consumables c ON s.id = c.store_id |
| | | LEFT JOIN user u ON u.id = s.storage_user |
| | | LEFT JOIN user u1 ON u1.id = s.registrant |
| | | )a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="exportExcel" resultMap="storeExcelMap"> |
| | | SELECT * FROM ( |
| | | SELECT |
| | | s.odd_numbers, |
| | | c.consumables_name, |
| | | c.store_number, |
| | | c.total_price, |
| | | s.storage_time, |
| | | s.remark, |
| | | s.registrant_time, |
| | | u.name AS storageUserName, |
| | | u1.name AS registrantName |
| | | FROM |
| | | `procurement_supplies_store` s |
| | | LEFT JOIN procurement_supplies_consumables c ON s.id = c.store_id |
| | | LEFT JOIN user u ON u.id = s.storage_user |
| | | LEFT JOIN user u1 ON u1.id = s.registrant |
| | | |
| | | ) a |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.SupplierManagementMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.SupplierManagement"> |
| | | <id column="supplier_management_id" property="supplierManagementId" /> |
| | | <result column="supplier_name" property="supplierName" /> |
| | | <result column="supplier_ref" property="supplierRef" /> |
| | | <result column="supplier_item_service_name" property="supplierItemServiceName" /> |
| | | <result column="postal_code" property="postalCode" /> |
| | | <result column="adress" property="adress" /> |
| | | <result column="logo" property="logo" /> |
| | | <result column="contacts" property="contacts" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="household_name" property="householdName" /> |
| | | <result column="fax" property="fax" /> |
| | | <result column="opening_name" property="openingName" /> |
| | | <result column="website" property="website" /> |
| | | <result column="account_name" property="accountName" /> |
| | | <result column="email" property="email" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="enclosure" property="enclosure" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="status" property="status" /> |
| | | <result column="parent_id" property="parentId" /> |
| | | </resultMap> |
| | | <select id="pageSupplierManagement" resultType="com.yuanchu.mom.pojo.SupplierManagement"> |
| | | select * |
| | | from (select * |
| | | from cnas_supplier_management |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectQualifiedSupplierManagement" resultType="com.yuanchu.mom.pojo.SupplierManagement"> |
| | | select * |
| | | from (select * |
| | | from cnas_supplier_management |
| | | where status = 0 |
| | | order by create_time desc |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectSupplierManagementAll" resultType="com.yuanchu.mom.pojo.SupplierManagement"> |
| | | SELECT csm.supplier_name, |
| | | csm.supplier_ref, |
| | | csm.supplier_item_service_name, |
| | | csm.postal_code, |
| | | csm.adress, |
| | | csm.contacts, |
| | | csm.phone, |
| | | csm.household_name, |
| | | csm.fax, |
| | | csm.opening_name, |
| | | csm.website, |
| | | csm.account_name, |
| | | csm.email |
| | | FROM cnas_supplier_management csm |
| | | <where> |
| | | <if test="parentId != null and parentId != 0"> |
| | | csm.parent_id in (select id |
| | | from suppliers_directory_contents |
| | | where id = #{parentId} |
| | | or parent_id = #{parentId}) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="selectSupplierManagement" resultType="com.yuanchu.mom.pojo.SupplierManagement"> |
| | | select |
| | | * |
| | | from cnas_supplier_management csm |
| | | where |
| | | csm.parent_id = #{parentId} or |
| | | csm.parent_id in |
| | | (select id from suppliers_directory_contents where id = #{parentId} or parent_id = #{parentId}) |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.SuppliersDirectoryContentsMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.SuppliersDirectoryContents"> |
| | | <id column="id" property="id" /> |
| | | <result column="node_name" property="nodeName" /> |
| | | <result column="code" property="code" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="parent_id" property="parentId" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | initCharts() |
| | | function initCharts(){ |
| | | var progress = document.getElementById("progress").value |
| | | var chartDom = document.getElementById('chartContainer'); |
| | | var myChart = echarts.init(chartDom); |
| | | var option; |
| | | |
| | | option = { |
| | | series: [ |
| | | { |
| | | type: 'gauge', |
| | | axisLine: { |
| | | lineStyle: { |
| | | width: 15, |
| | | color: [ |
| | | [0.3, '#21a700'], |
| | | [0.7, '#0066ff'], |
| | | [1, '#d80000'] |
| | | ] |
| | | } |
| | | }, |
| | | radius: '100%', |
| | | startAngle: 180, |
| | | endAngle: 0, |
| | | center: ['50%','70%'], |
| | | pointer: { |
| | | itemStyle: { |
| | | color: 'auto' |
| | | } |
| | | }, |
| | | axisTick: { |
| | | distance: -15, |
| | | length: 7, |
| | | lineStyle: { |
| | | color: '#fff', |
| | | width: 1 |
| | | } |
| | | }, |
| | | splitLine: { |
| | | distance: -45, |
| | | length: 45, |
| | | lineStyle: { |
| | | color: '#fff', |
| | | width: 2 |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | color: 'inherit', |
| | | distance: 20, |
| | | fontSize: 10 |
| | | }, |
| | | detail: { |
| | | valueAnimation: true, |
| | | formatter: '{value} %', |
| | | color: 'inherit' |
| | | }, |
| | | data: [ |
| | | { |
| | | value: progress |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | }; |
| | | option && myChart.setOption(option); |
| | | window.onresize = function() { |
| | | myChart.resize(); |
| | | }; |
| | | } |
| | | |
| | | function hasDownload(){ |
| | | var isDownload = true |
| | | var downloadUrl = document.getElementById("downloadUrl").value |
| | | var xhr = new XMLHttpRequest(); |
| | | xhr.open("GET", downloadUrl, false); |
| | | xhr.onreadystatechange = function () { |
| | | if (xhr.readyState === 4 && xhr.status !== 200) { |
| | | // 请æ±å¤±è´¥ |
| | | isDownload = false |
| | | alert("æªä¸ä¼ è¯ä¹¦") |
| | | } |
| | | }; |
| | | xhr.send(); |
| | | return isDownload |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>设å¤è¿è¡æ»è§</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
| | | <style> |
| | | *{ |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | body { |
| | | -webkit-text-size-adjust: 100%!important; |
| | | text-size-adjust: 100%!important; |
| | | -moz-text-size-adjust: 100%!important; |
| | | } |
| | | .main{ |
| | | width: 100%; |
| | | background-color: #f5f7fa; |
| | | padding:10px 0; |
| | | } |
| | | .chartContainer{ |
| | | width:92%; |
| | | margin-left:4%; |
| | | height:200px; |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | } |
| | | .info{ |
| | | width:92%; |
| | | margin-left:4%; |
| | | height:calc(100% - 230px); |
| | | background-color: #fff; |
| | | margin-top: 10px; |
| | | padding-bottom: 10px; |
| | | border-radius: 5px; |
| | | } |
| | | .info div{ |
| | | display: flex; |
| | | width: 92%; |
| | | margin-left: 4%; |
| | | border-bottom: 1px solid #dddddd; |
| | | height: 40px; |
| | | } |
| | | .info div span{ |
| | | width:100px; |
| | | color: #797979; |
| | | font-size: clamp(0.563rem, -2.813rem + 15vw, 0.75rem) !important; |
| | | line-height: 40px; |
| | | } |
| | | .info div p{ |
| | | width:calc(100% - 100px); |
| | | height:40px; |
| | | font-size: clamp(0.563rem, -2.813rem + 15vw, 0.75rem) !important; |
| | | font-weight: bold; |
| | | line-height: 40px; |
| | | text-align: right; |
| | | } |
| | | .success{ |
| | | color:#21a700 |
| | | } |
| | | .failed{ |
| | | color:#d80000 |
| | | } |
| | | .other{ |
| | | color: #e8a849; |
| | | } |
| | | .stop{ |
| | | color: lightgray; |
| | | } |
| | | .download-link{ |
| | | text-decoration:none; |
| | | width:80px; |
| | | height:25px; |
| | | margin:7.5px 10px; |
| | | background-color: #0066ff; |
| | | color:#fff; |
| | | font-size:clamp(0.563rem, -2.813rem + 15vw, 0.75rem) !important; |
| | | border:none; |
| | | border-radius: 3px; |
| | | line-height: 25px; |
| | | text-align: center; |
| | | } |
| | | .insProduct{ |
| | | overflow-x: scroll; |
| | | overflow-y: hidden; |
| | | display: inline-block |
| | | } |
| | | .info div:last-child{ |
| | | white-space: nowrap; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <input type="hidden" id="progress" th:value="${progress}"> |
| | | <div class="main"> |
| | | <div class="chartContainer" id="chartContainer" ></div> |
| | | <div class="info"> |
| | | <div> |
| | | <span>设å¤åç§°</span> |
| | | <p th:text="${deviceName}"></p> |
| | | </div> |
| | | <div> |
| | | <span>设å¤ç¼å·</span> |
| | | <p th:text="${deviceCode}"></p> |
| | | </div> |
| | | <div> |
| | | <span>å¯ç¨æ¶é¿(å¹´)</span> |
| | | <p th:text="${usedYears}"></p> |
| | | </div> |
| | | <div> |
| | | <span>设å¤è¿è¡ç¶æ</span> |
| | | <p th:if="${runStatus==0}" class="success">æ£å¸¸</p> |
| | | <p th:if="${runStatus==1}" class="other">ç»´ä¿®</p> |
| | | <p th:if="${runStatus==2}" class="stop">åç¨</p> |
| | | <p th:if="${runStatus==3}" class="failed">æ¥åº</p> |
| | | </div> |
| | | <div> |
| | | <span> |
| | | æè¿æ ¡åæ¥æ |
| | | </span> |
| | | <input type="hidden" id="downloadUrl" th:value="${downloadUrl}"> |
| | | <a th:href="${downloadUrl}" onclick="return hasDownload()" download="attachment.jpg" rel="noopener noreferrer" class="download-link">è¯ä¹¦ä¸è½½</a> |
| | | <p th:text="${lastCalibrationDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>䏿¬¡æ ¡åæ¥æ</span> |
| | | <p th:text="${nextCalibrationDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>æ ¡åæ»ç»è®º</span> |
| | | <p th:if="${calibrateStatus=='åæ ¼'}" class="success" th:text="${calibrateStatus}"></p> |
| | | <p th:if="${calibrateStatus=='ä¸åæ ¼'}" class="failed" th:text="${calibrateStatus}"></p> |
| | | <p th:if="${calibrateStatus=='å
¶ä»'}" class="other" th:text="${calibrateStatus}"></p> |
| | | </div> |
| | | <div> |
| | | <span>æè¿æ ¸æ¥æ¥æ</span> |
| | | <p th:text="${lastExamineDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>䏿¬¡æ ¸æ¥æ¥æ</span> |
| | | <p th:text="${nextExamineDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>æ ¸æ¥æ»ç»è®º</span> |
| | | <p th:if="${examineStatus=='åæ ¼'}" class="success" th:text="${examineStatus}"></p> |
| | | <p th:if="${examineStatus=='ä¸åæ ¼'}" class="failed" th:text="${examineStatus}"></p> |
| | | <p th:if="${examineStatus=='å
¶ä»'}" class="other" th:text="${examineStatus}"></p> |
| | | </div> |
| | | <div> |
| | | <span>æè¿ç»´æ¤æ¥æ</span> |
| | | <p th:text="${maintenanceDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>䏿¬¡ç»´æ¤æ¥æ</span> |
| | | <p th:text="${nextMaintenanceDate}"></p> |
| | | </div> |
| | | <div> |
| | | <span>ç»´æ¤ç±»å</span> |
| | | <p th:text="${maintenanceType}"></p> |
| | | </div> |
| | | <div> |
| | | <span>æµé项ç®</span> |
| | | <p th:text="${insProduct}" class="insProduct"></p> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </body> |
| | | <script th:src="@{/static/js/echarts.js}"></script> |
| | | <script th:src="@{/static/js/device_qr_show.js}"></script> |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
| | | <title>æ ·åä¿¡æ¯</title> |
| | | <style> |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <p> |
| | | <span style="font-weight: bold">æ ·åç¼å·ï¼</span> |
| | | <span th:text="${sampleCode}"></span> |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold">å§æåå·ï¼</span> |
| | | <span th:text="${entrustCode}"></span> |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold">è§æ ¼åå·ï¼</span> |
| | | <span th:text="${model}"></span> |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold">æ ·ååç§°ï¼</span> |
| | | <span th:text="${sample}"></span> |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold">æ£æµé¡¹ç®ï¼</span> |
| | | <span th:text="${inspectionItem}"></span> |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold">æ ·åç¶æï¼</span> |
| | | <input type="checkbox" disabled name="insState" value="0" th:checked="${insState == 0}"> |
| | | <label>å¾
æ£</label> |
| | | <input type="checkbox" disabled name="insState" value="1" th:checked="${insState == 1}"> |
| | | <label>卿£</label> |
| | | <input type="checkbox" disabled name="insState" value="2" th:checked="${insState == 2}"> |
| | | <label>å·²æ£</label> |
| | | <input type="checkbox" disabled name="isLeave" value="1" th:checked="${isLeave == 1}"> |
| | | <label>çæ ·</label> |
| | | |
| | | </p> |
| | | </body> |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en" xmlns:th="http://www.thymeleaf.org"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>æ£æµæ¥å</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <style> |
| | | .descriptions { |
| | | width: 65%; |
| | | text-align: left; |
| | | } |
| | | .descriptions-title { |
| | | width: 35%; |
| | | text-align: center; |
| | | } |
| | | .table { |
| | | font-size: 1em; |
| | | color: #1c2023; |
| | | border-collapse: collapse; |
| | | width: 100%; |
| | | } |
| | | .table tr { |
| | | height: 3em; |
| | | } |
| | | table tr:nth-child(odd) .descriptions-title{ |
| | | background-color: #dddddd; |
| | | } |
| | | table tr:nth-child(odd) .descriptions{ |
| | | background-color: #f0f0f0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <h4 th:text="'æ¥åç¼å·ï¼' + ${entrustCode}"></h4> |
| | | <table class="table"> |
| | | <tr> |
| | | <td class="descriptions-title">è¯ æ · å ç§°<br/>Name of Product</td> |
| | | <td class="descriptions"> |
| | | <p> |
| | | <span th:text="${productName}"></span> |
| | | <br/> |
| | | <span th:text="${productNameEn}"></span> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="descriptions-title">å å·<br/>Type and Size</td> |
| | | <td class="descriptions" th:text="${insOrderModel}"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="descriptions-title">å§ æ å ä½<br/>Client</td> |
| | | <td class="descriptions"> |
| | | <p> |
| | | <span th:text="${company}"></span> |
| | | <br/> |
| | | <span th:text="${companyEn}"></span> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="descriptions-title">æ£ éª ç±» å«<br/>Kind of Test</td> |
| | | <td class="descriptions"> |
| | | <p> |
| | | <span th:text="${orderType}"></span> |
| | | <br/> |
| | | <span th:text="${orderTypeEn}"></span> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="descriptions-title">æ¶ æ · æ¥ æ<br/>Received date</td> |
| | | <td class="descriptions"> |
| | | <p> |
| | | <span th:text="${getTime}"></span> |
| | | <br/> |
| | | <span th:text="${getTimeEn}"></span> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="descriptions-title">ç¾ å æ¥ æ<br/>Date of issue</td> |
| | | <td class="descriptions"> |
| | | <p> |
| | | <span th:text="${issuingDate}"></span> |
| | | <br/> |
| | | <span th:text="${issuingDateEn}"></span> |
| | | </p> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </body> |
| | | </html> |
| | |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | # url: jdbc:mysql://localhost:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | # url: jdbc:mysql://10.1.13.77:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://192.168.22.29:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | # username: remote_user |
| | | username: root |
| | | url: jdbc:mysql://10.1.13.77:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | # url: jdbc:mysql://192.168.22.29:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: remote_user |
| | | # username: root |
| | | # password: 123456 |
| | | # password: zttZTT123! |
| | | password: Dq<)dAiAczXs |
| | | password: zttZTT123! |
| | | # password: Dq<)dAiAczXs |
| | | druid: |
| | | # Druidæ°æ®æºé
ç½® |
| | | initialSize: 5 # åå§è¿æ¥æ° |