Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6c569fa63c
@ -12,9 +12,11 @@ import com.fuint.business.member.entity.LJStaff;
|
|||||||
import com.fuint.business.member.service.ILJStaffService;
|
import com.fuint.business.member.service.ILJStaffService;
|
||||||
import com.fuint.business.tag.dto.TagCodeRecordDTO;
|
import com.fuint.business.tag.dto.TagCodeRecordDTO;
|
||||||
import com.fuint.business.tag.entity.OilTag;
|
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.entity.TagCodeRecord;
|
||||||
import com.fuint.business.tag.service.OilTagService;
|
import com.fuint.business.tag.service.OilTagService;
|
||||||
import com.fuint.business.tag.service.TagCodeRecordService;
|
import com.fuint.business.tag.service.TagCodeRecordService;
|
||||||
|
import com.fuint.business.tag.service.TagCodeService;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import com.fuint.framework.exception.BusinessCheckException;
|
import com.fuint.framework.exception.BusinessCheckException;
|
||||||
@ -126,15 +128,34 @@ public class TagCodeRecordController extends BaseController {
|
|||||||
return getSuccessResult("该员工暂未绑定码牌!");
|
return getSuccessResult("该员工暂未绑定码牌!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TagCodeService tagCodeService;
|
||||||
/**
|
/**
|
||||||
* 码牌与油站解绑
|
* 码牌与油站解绑
|
||||||
*
|
*
|
||||||
* @param id 主键结合
|
* @param id 主键结合
|
||||||
* @return 删除结果
|
* @return 删除结果
|
||||||
*/
|
*/
|
||||||
@DeleteMapping("id")
|
@DeleteMapping("{id}")
|
||||||
public ResponseObject delete(@PathVariable Long id) {
|
public ResponseObject delete(@PathVariable Long id) {
|
||||||
|
|
||||||
TagCodeRecord tagCodeRecord = this.tagCodeRecordService.getById(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())){
|
if (ObjectUtils.isNotEmpty(tagCodeRecord.getStaffId())){
|
||||||
return getSuccessResult("该码牌已绑定员工,请先解绑员工!");
|
return getSuccessResult("该码牌已绑定员工,请先解绑员工!");
|
||||||
}else {
|
}else {
|
||||||
|
@ -17,6 +17,7 @@ import com.fuint.repository.model.TSource;
|
|||||||
import com.fuint.utils.StringUtil;
|
import com.fuint.utils.StringUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -254,6 +255,11 @@ public class BackendSourceController extends BaseController {
|
|||||||
@ApiOperation(value = "获取菜单下拉树列表")
|
@ApiOperation(value = "获取菜单下拉树列表")
|
||||||
@RequestMapping(value = "/treeselect", method = RequestMethod.GET)
|
@RequestMapping(value = "/treeselect", method = RequestMethod.GET)
|
||||||
public ResponseObject treeselect(HttpServletRequest request, TAccount account) {
|
public ResponseObject treeselect(HttpServletRequest request, TAccount account) {
|
||||||
|
if (ObjectUtils.isNotEmpty(account.getDeptType()) && account.getDeptType().equals("3")){
|
||||||
|
account.setMerchantId(2);
|
||||||
|
}else {
|
||||||
|
account.setMerchantId(1);
|
||||||
|
}
|
||||||
String token = request.getHeader("Access-Token");
|
String token = request.getHeader("Access-Token");
|
||||||
AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
|
AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
|
||||||
if (accountInfo == null) {
|
if (accountInfo == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user