bug
This commit is contained in:
parent
bb824c6daa
commit
44f2479074
@ -128,4 +128,7 @@ public class LJStaff extends BaseEntity implements Serializable {
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String dutyName;
|
||||
//码牌绑定状态 0:未绑定 1:已绑定
|
||||
@TableField(exist = false)
|
||||
private String tagStatus;
|
||||
}
|
||||
|
@ -1,8 +1,11 @@
|
||||
package com.fuint.business.member.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
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.core.toolkit.ObjectUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
@ -11,6 +14,8 @@ import com.fuint.business.member.service.ILJStaffService;
|
||||
import com.fuint.business.member.utils.QrCodeUtils;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.tag.entity.TagCodeRecord;
|
||||
import com.fuint.business.tag.service.TagCodeRecordService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.service.AccountService;
|
||||
import com.fuint.common.service.SettingService;
|
||||
@ -25,6 +30,7 @@ import com.fuint.utils.Digests;
|
||||
import com.fuint.utils.Encodes;
|
||||
import jdk.nashorn.internal.parser.Token;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -51,6 +57,10 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
@Resource
|
||||
private DutyService tDutyService;
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
private TagCodeRecordService tagCodeRecordService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询员工信息
|
||||
* @param page
|
||||
@ -65,7 +75,21 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
storeId = staff.getStoreId();
|
||||
}
|
||||
staff.setStoreId(storeId);
|
||||
return baseMapper.selectLJStaffList(page,staff);
|
||||
IPage<LJStaff> ljStaffIPage = baseMapper.selectLJStaffList(page, staff);
|
||||
List<LJStaff> records = ljStaffIPage.getRecords();
|
||||
if (CollectionUtils.isNotEmpty(records)){
|
||||
for (LJStaff record : records) {
|
||||
LambdaQueryWrapper<TagCodeRecord> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(TagCodeRecord::getStaffId,record.getId());
|
||||
List<TagCodeRecord> list = tagCodeRecordService.list(queryWrapper);
|
||||
if (ObjectUtils.isNotEmpty(list)){
|
||||
record.setTagStatus("1");
|
||||
}else {
|
||||
record.setTagStatus("0");
|
||||
}
|
||||
}
|
||||
}
|
||||
return ljStaffIPage;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,9 @@ package com.fuint.business.tag.controller;
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.tag.entity.OilTag;
|
||||
import com.fuint.business.tag.service.OilTagService;
|
||||
@ -42,7 +44,15 @@ public class OilTagController extends BaseController {
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("cardFuelDiesel") OilTag oilTag) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
return getSuccessResult(this.oilTagService.page(page, new QueryWrapper<>(oilTag)));
|
||||
LambdaQueryWrapper<OilTag> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (ObjectUtils.isNotEmpty(oilTag.getTagCodeSn())){
|
||||
queryWrapper.eq(OilTag::getTagCodeSn,oilTag.getTagCodeSn());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(oilTag.getSnCode())){
|
||||
queryWrapper.eq(OilTag::getSnCode,oilTag.getSnCode());
|
||||
}
|
||||
queryWrapper.orderByDesc(OilTag::getCreateTime);
|
||||
return getSuccessResult(this.oilTagService.page(page, queryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,9 @@ package com.fuint.business.tag.controller;
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.tag.dto.TagCodeDTO;
|
||||
import com.fuint.business.tag.entity.TagCode;
|
||||
@ -57,7 +59,12 @@ public class TagCodeController extends BaseController {
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("cardFuelDiesel") TagCode tagCode) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
return getSuccessResult(this.tagCodeService.page(page, new QueryWrapper<>(tagCode)));
|
||||
LambdaQueryWrapper<TagCode> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (ObjectUtils.isNotEmpty(tagCode.getTagCodeSn())){
|
||||
queryWrapper.eq(TagCode::getTagCodeSn,tagCode.getTagCodeSn());
|
||||
}
|
||||
queryWrapper.orderByDesc(TagCode::getCreateTime);
|
||||
return getSuccessResult(this.tagCodeService.page(page, queryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -127,14 +127,18 @@ public class TagCodeRecordController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* 码牌与油站解绑
|
||||
*
|
||||
* @param id 主键结合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("id")
|
||||
/* @DeleteMapping("id")
|
||||
public ResponseObject delete(@PathVariable Long id) {
|
||||
TagCodeRecord tagCodeRecord = this.tagCodeRecordService.getById(id);
|
||||
if ()
|
||||
//码牌id
|
||||
Integer oilTagId = tagCodeRecord.getOilTagId();
|
||||
return getSuccessResult(this.tagCodeRecordService.removeById(id));
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
<select id="selectTagList" resultType="com.fuint.business.tag.vo.TagCodeRecordVO">
|
||||
<include refid="selectTagListsq"></include>
|
||||
<where>
|
||||
ot.mt_status = 0
|
||||
<if test="tagCodeRecord.storeId != null and tagCodeRecord.storeId != ''">
|
||||
and tcr.store_id = #{tagCodeRecord.storeId}
|
||||
</if>
|
||||
|
@ -55,6 +55,7 @@ public class TagCodeRecordServiceImpl extends ServiceImpl<TagCodeRecordMapper, T
|
||||
@Transactional
|
||||
public boolean add(TagCodeRecordDTO tagCodeRecordDTO) {
|
||||
boolean flag = false;
|
||||
//绑定之前 先去查询
|
||||
TagCodeRecord tagCodeRecord = new TagCodeRecord();
|
||||
if (ObjectUtils.isNotEmpty(tagCodeRecordDTO) && CollectionUtils.isNotEmpty(tagCodeRecordDTO.getOilTagList())){
|
||||
for (Integer integer : tagCodeRecordDTO.getOilTagList()) {
|
||||
|
Loading…
Reference in New Issue
Block a user