From de2ec37e66b2f3a56c2aa5134f47cd3b3c08371e Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期二, 09 一月 2024 18:02:24 +0800 Subject: [PATCH] zjh 2024/01/09--1 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjPureToneTestController.java | 56 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 42 insertions(+), 14 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjPureToneTestController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjPureToneTestController.java index 81a47fd..0f778a5 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjPureToneTestController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjPureToneTestController.java @@ -11,11 +11,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.ltkj.common.core.redis.RedisCache; import com.ltkj.framework.config.MatchUtils; -import com.ltkj.hosp.domain.TjCustomer; -import com.ltkj.hosp.domain.TjXdPicture; -import com.ltkj.hosp.service.ITjCustomerService; -import com.ltkj.hosp.service.ITjProjectService; -import com.ltkj.hosp.service.TjAsyncService; +import com.ltkj.hosp.domain.*; +import com.ltkj.hosp.service.*; import com.ltkj.system.service.ISysConfigService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -27,8 +24,6 @@ import com.ltkj.common.core.controller.BaseController; import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.common.enums.BusinessType; -import com.ltkj.hosp.domain.TjPureToneTest; -import com.ltkj.hosp.service.ITjPureToneTestService; import com.ltkj.common.utils.poi.ExcelUtil; import com.ltkj.common.core.page.TableDataInfo; @@ -40,7 +35,7 @@ */ @RestController @RequestMapping("/pureToneTest/pureToneTest") -@Api(tags = "绾煶鍚槇娴嬭瘯") +@Api(tags = "C==============绾煶鍚槇娴嬭瘯") public class TjPureToneTestController extends BaseController { @Resource private ITjPureToneTestService tjPureToneTestService; @@ -48,12 +43,39 @@ private ITjCustomerService customerService; @Autowired private ISysConfigService configService; + @Resource + private ITjOrderService orderService; + @Resource + private TjPureToneTestDetilService toneTestDetilService; + + + @PostMapping("/saveTjPureToneTestDetil") + @ApiOperation(value = "淇濆瓨绾煶鍚槇缁撴灉娴嬪畾鍊兼帴鍙�") + public AjaxResult saveTjPureToneTestDetil(@RequestBody List<TjPureToneTestDetil> pureToneTestDetils) { + if(null !=pureToneTestDetils && pureToneTestDetils.size()>0){ + String pureTestId = pureToneTestDetils.get(0).getPureTestId(); + if(null==pureTestId){ + return AjaxResult.error("鍙傛暟鏍煎紡鏈夎璇锋鏌ユ牳瀵�!"); + } + toneTestDetilService.deletedTjPureToneTestDetilByPureTestId(pureTestId); + toneTestDetilService.saveBatch(pureToneTestDetils); + return AjaxResult.success(); + } + return AjaxResult.error("璇疯緭鍏ユ暟鎹�!"); + } + + @GetMapping("/getTjPureToneTestDetilList") + @ApiOperation(value = "鑾峰彇绾煶鍚槇缁撴灉娴嬪畾鍊兼帴鍙�") + public AjaxResult getTjPureToneTestDetilList(@RequestParam String pureTestId) { + return AjaxResult.success(toneTestDetilService.list(new LambdaQueryWrapper<TjPureToneTestDetil>().eq(TjPureToneTestDetil::getPureTestId,pureTestId))); + } + /** * 鏌ヨ绾煶鍚槇娴嬭瘯鍒楄〃 */ - @PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:list')") + //@PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:list')") @GetMapping("/list") @ApiOperation(value = "绾煶鍚槇鏌ヨ(榛樿鑷甫)") public TableDataInfo list(TjPureToneTest tjPureToneTest) { @@ -81,10 +103,16 @@ for (Map.Entry<String, List<TjPureToneTest>> entry : stringListMap.entrySet()) { Map<String,Object>map=new HashMap<>(); TjCustomer customer = customerService.getById(entry.getKey()); + if(customer==null) continue; customer.setCusName(MatchUtils.hideCusName(customer.getCusName())); customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone())); customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard())); customer.setTjNumber(entry.getValue().get(0).getTjNum()); + TjOrder order = orderService.getOrderByTjNum(entry.getValue().get(0).getTjNum()); + if(null !=order){ + customer.setTjTime(order.getCreateTime()); + customer.setTjType(order.getTjCategory()); + } map.put("list",entry.getValue()); map.put("customer",customer); map.put("picturePath",configService.selectConfigByKey("TjPureToneTest")); @@ -105,7 +133,7 @@ /** * 瀵煎嚭绾煶鍚槇娴嬭瘯鍒楄〃 */ - @PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:export')") + //@PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:export')") @Log(title = "绾煶鍚槇娴嬭瘯", businessType = BusinessType.EXPORT) @PostMapping("/export") @ApiOperation(value = "瀵煎嚭绾煶鍚槇娴嬭瘯鍒楄〃") @@ -118,7 +146,7 @@ /** * 鑾峰彇绾煶鍚槇娴嬭瘯璇︾粏淇℃伅 */ - @PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:query')") + //@PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:query')") @GetMapping(value = "/{id}") @ApiOperation(value = "鑾峰彇绾煶鍚槇娴嬭瘯璇︾粏淇℃伅") public AjaxResult getInfo(@PathVariable("id") String id) { @@ -128,7 +156,7 @@ /** * 鏂板绾煶鍚槇娴嬭瘯 */ - @PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:add')") + //@PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:add')") @Log(title = "绾煶鍚槇娴嬭瘯", businessType = BusinessType.INSERT) @PostMapping @ApiOperation(value = "鏂板绾煶鍚槇娴嬭瘯") @@ -139,7 +167,7 @@ /** * 淇敼绾煶鍚槇娴嬭瘯 */ - @PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:edit')") + //@PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:edit')") @Log(title = "绾煶鍚槇娴嬭瘯", businessType = BusinessType.UPDATE) @PutMapping @ApiOperation(value = "淇敼绾煶鍚槇娴嬭瘯") @@ -150,7 +178,7 @@ /** * 鍒犻櫎绾煶鍚槇娴嬭瘯 */ - @PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:remove')") + //@PreAuthorize("@ss.hasPermi('pureToneTest:pureToneTest:remove')") @Log(title = "绾煶鍚槇娴嬭瘯", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") @ApiOperation(value = "鍒犻櫎绾煶鍚槇娴嬭瘯") -- Gitblit v1.8.0