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