bug
This commit is contained in:
parent
44f2479074
commit
cf1caaa4c5
@ -132,13 +132,15 @@ public class TagCodeRecordController extends BaseController {
|
|||||||
* @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);
|
||||||
if ()
|
if (ObjectUtils.isNotEmpty(tagCodeRecord.getStaffId())){
|
||||||
//码牌id
|
return getSuccessResult("该码牌已绑定员工,请先解绑员工!");
|
||||||
Integer oilTagId = tagCodeRecord.getOilTagId();
|
}else {
|
||||||
return getSuccessResult(this.tagCodeRecordService.removeById(id));
|
this.tagCodeRecordService.removeById(id);
|
||||||
}*/
|
return getSuccessResult("解绑成功!");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ public class TagCode extends Model<TagCode> {
|
|||||||
//主键id
|
//主键id
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
private Integer deptId;
|
||||||
//二维码SN号
|
//二维码SN号
|
||||||
private String tagCodeSn;
|
private String tagCodeSn;
|
||||||
//图片地址
|
//图片地址
|
||||||
|
@ -7,7 +7,9 @@ import com.fuint.business.tag.dto.TagCodeDTO;
|
|||||||
import com.fuint.business.tag.mapper.TagCodeMapper;
|
import com.fuint.business.tag.mapper.TagCodeMapper;
|
||||||
import com.fuint.business.tag.entity.TagCode;
|
import com.fuint.business.tag.entity.TagCode;
|
||||||
import com.fuint.business.tag.service.TagCodeService;
|
import com.fuint.business.tag.service.TagCodeService;
|
||||||
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.DateUtil;
|
import com.fuint.common.util.DateUtil;
|
||||||
|
import com.fuint.common.util.TokenUtil;
|
||||||
import com.fuint.module.backendApi.controller.BackendFileController;
|
import com.fuint.module.backendApi.controller.BackendFileController;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.core.io.InputStreamResource;
|
import org.springframework.core.io.InputStreamResource;
|
||||||
@ -60,6 +62,7 @@ public class TagCodeServiceImpl extends ServiceImpl<TagCodeMapper, TagCode> impl
|
|||||||
@Transactional
|
@Transactional
|
||||||
public ResponseEntity<InputStreamResource> add(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
public ResponseEntity<InputStreamResource> add(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
|
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if (ObjectUtils.isNotEmpty(tagCodeDTO) && ObjectUtils.isNotEmpty(tagCodeDTO.getTotal())){
|
if (ObjectUtils.isNotEmpty(tagCodeDTO) && ObjectUtils.isNotEmpty(tagCodeDTO.getTotal())){
|
||||||
int total = tagCodeDTO.getTotal();
|
int total = tagCodeDTO.getTotal();
|
||||||
@ -79,6 +82,7 @@ public class TagCodeServiceImpl extends ServiceImpl<TagCodeMapper, TagCode> impl
|
|||||||
|
|
||||||
tagCode.setCollection(url);
|
tagCode.setCollection(url);
|
||||||
tagCode.setTagCodeSn("byx"+i1);
|
tagCode.setTagCodeSn("byx"+i1);
|
||||||
|
tagCode.setDeptId(Integer.parseInt(nowAccountInfo.getDeptId().toString()));
|
||||||
|
|
||||||
//在图片上生成二维码
|
//在图片上生成二维码
|
||||||
String backgroundImage = "static/qrCodeImg/huanyingguanglin2.jpg";
|
String backgroundImage = "static/qrCodeImg/huanyingguanglin2.jpg";
|
||||||
|
Loading…
Reference in New Issue
Block a user