From 191eb1ae75824ebfd80881a541e7f00489d8e27a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Thu, 28 Mar 2024 09:45:59 +0800 Subject: [PATCH 1/3] bug --- .../controller/TagCodeRecordController.java | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java index fa5db9905..fefaa2967 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java @@ -12,9 +12,11 @@ import com.fuint.business.member.entity.LJStaff; import com.fuint.business.member.service.ILJStaffService; import com.fuint.business.tag.dto.TagCodeRecordDTO; import com.fuint.business.tag.entity.OilTag; +import com.fuint.business.tag.entity.TagCode; import com.fuint.business.tag.entity.TagCodeRecord; import com.fuint.business.tag.service.OilTagService; import com.fuint.business.tag.service.TagCodeRecordService; +import com.fuint.business.tag.service.TagCodeService; import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.TokenUtil; import com.fuint.framework.exception.BusinessCheckException; @@ -126,15 +128,34 @@ public class TagCodeRecordController extends BaseController { return getSuccessResult("该员工暂未绑定码牌!"); } + @Resource + private TagCodeService tagCodeService; /** * 码牌与油站解绑 * * @param id 主键结合 * @return 删除结果 */ - @DeleteMapping("id") + @DeleteMapping("{id}") public ResponseObject delete(@PathVariable Long id) { + TagCodeRecord tagCodeRecord = this.tagCodeRecordService.getById(id); + + OilTag oilTag = oilTagService.getById(tagCodeRecord.getOilTagId()); + + TagCode tagCode = tagCodeService.getById(oilTag.getTagCodeId()); + + String collection = ""; + if (tagCode.getCollection().contains("storeId")){ + String[] storeIds = tagCode.getCollection().split("storeId"); + String storeId = storeIds[0]; + String[] sns = storeIds[1].split("sn"); + String sn = sns[1]; + collection = storeId + "sn" + sn; + tagCode.setCollection(collection); + tagCodeService.updateById(tagCode); + } + if (ObjectUtils.isNotEmpty(tagCodeRecord.getStaffId())){ return getSuccessResult("该码牌已绑定员工,请先解绑员工!"); }else { From 24d5f2912681fd78f67c7fb52c94d4313aa90bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Thu, 28 Mar 2024 10:14:50 +0800 Subject: [PATCH 2/3] bug --- .../backendApi/controller/BackendSourceController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java index 734ee4276..831331d6c 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java @@ -17,6 +17,7 @@ import com.fuint.repository.model.TSource; import com.fuint.utils.StringUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -254,6 +255,11 @@ public class BackendSourceController extends BaseController { @ApiOperation(value = "获取菜单下拉树列表") @RequestMapping(value = "/treeselect", method = RequestMethod.GET) public ResponseObject treeselect(HttpServletRequest request, TAccount account) { + if (ObjectUtils.isNotEmpty(account.getDeptType()) && account.getDeptType().equals("3")){ + account.setMerchantId(2); + }else { + account.setMerchantId(3); + } String token = request.getHeader("Access-Token"); AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token); if (accountInfo == null) { From 3a5c70f9cf3e4e2f24f2af3ed519b7539af39a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Thu, 28 Mar 2024 10:17:11 +0800 Subject: [PATCH 3/3] bug --- .../module/backendApi/controller/BackendSourceController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java index 831331d6c..7007f349a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java @@ -258,7 +258,7 @@ public class BackendSourceController extends BaseController { if (ObjectUtils.isNotEmpty(account.getDeptType()) && account.getDeptType().equals("3")){ account.setMerchantId(2); }else { - account.setMerchantId(3); + account.setMerchantId(1); } String token = request.getHeader("Access-Token"); AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);