新购器具绑定rfidCode
This commit is contained in:
parent
b0835e5473
commit
ac5f82ea3f
|
|
@ -17,8 +17,7 @@ import java.util.List;
|
|||
* @date 2023-12-13
|
||||
*/
|
||||
@Service
|
||||
public class MaLabelBindServiceImpl implements IMaLabelBindService
|
||||
{
|
||||
public class MaLabelBindServiceImpl implements IMaLabelBindService {
|
||||
@Resource
|
||||
private MaLabelBindMapper maLabelBindMapper;
|
||||
|
||||
|
|
@ -29,8 +28,7 @@ public class MaLabelBindServiceImpl implements IMaLabelBindService
|
|||
* @return 机具设备标签ma_label_bind
|
||||
*/
|
||||
@Override
|
||||
public MaLabelBindVO selectMaLabelBindByMaId(Long maId)
|
||||
{
|
||||
public MaLabelBindVO selectMaLabelBindByMaId(Long maId) {
|
||||
return maLabelBindMapper.selectMaLabelBindByMaId(maId);
|
||||
}
|
||||
|
||||
|
|
@ -41,8 +39,7 @@ public class MaLabelBindServiceImpl implements IMaLabelBindService
|
|||
* @return 机具设备标签ma_label_bind
|
||||
*/
|
||||
@Override
|
||||
public List<MaLabelBindVO> selectMaLabelBindList(MaLabelBindVO maLabelBindVO)
|
||||
{
|
||||
public List<MaLabelBindVO> selectMaLabelBindList(MaLabelBindVO maLabelBindVO) {
|
||||
return maLabelBindMapper.selectMaLabelBindList(maLabelBindVO);
|
||||
}
|
||||
|
||||
|
|
@ -53,10 +50,10 @@ public class MaLabelBindServiceImpl implements IMaLabelBindService
|
|||
* @return 机具设备标签ma_label_bind
|
||||
*/
|
||||
@Override
|
||||
public List<MaLabelBindVO> selecthistoryList(MaLabelBindVO maLabelBindVO)
|
||||
{
|
||||
public List<MaLabelBindVO> selecthistoryList(MaLabelBindVO maLabelBindVO) {
|
||||
return maLabelBindMapper.selecthistoryList(maLabelBindVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定机具设备标签ma_label_bind
|
||||
*
|
||||
|
|
@ -64,15 +61,14 @@ public class MaLabelBindServiceImpl implements IMaLabelBindService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult insertMaLabelBind(MaLabelBindVO maLabelBind)
|
||||
{
|
||||
public AjaxResult insertMaLabelBind(MaLabelBindVO maLabelBind) {
|
||||
int i = 0;
|
||||
int b =0;
|
||||
int b = 0;
|
||||
MaLabelBindVO bean = maLabelBindMapper.selectMaMachineMaId(maLabelBind.getMaCode());
|
||||
if(null != bean){
|
||||
if (null != bean) {
|
||||
return AjaxResult.error("设备编码已绑定!!!");
|
||||
}else {
|
||||
MaMachine maMachine =new MaMachine();
|
||||
} else {
|
||||
MaMachine maMachine = new MaMachine();
|
||||
maMachine.setMaCode(maLabelBind.getMaCode());
|
||||
maMachine.setTypeId(maLabelBind.getTypeId());
|
||||
maMachine.setQrCode(maLabelBind.getLabelCode());
|
||||
|
|
@ -80,7 +76,7 @@ public class MaLabelBindServiceImpl implements IMaLabelBindService
|
|||
maLabelBind.setMaId(String.valueOf(maMachine.getMaId()));
|
||||
maLabelBind.setStatus("1");
|
||||
maLabelBind.setIsBind("1");
|
||||
b=maLabelBindMapper.updateMaLabelBindMaIds(maLabelBind);
|
||||
b = maLabelBindMapper.updateMaLabelBindMaIds(maLabelBind);
|
||||
i = maLabelBindMapper.insertMaLabelBindS(maLabelBind);
|
||||
}
|
||||
return AjaxResult.success("绑定成功");
|
||||
|
|
@ -93,8 +89,7 @@ public class MaLabelBindServiceImpl implements IMaLabelBindService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMaLabelBind(MaLabelBindVO maLabelBind)
|
||||
{
|
||||
public int updateMaLabelBind(MaLabelBindVO maLabelBind) {
|
||||
return maLabelBindMapper.updateMaLabelBind(maLabelBind);
|
||||
}
|
||||
|
||||
|
|
@ -105,8 +100,7 @@ public class MaLabelBindServiceImpl implements IMaLabelBindService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMaLabelBindByMaIds(Long id)
|
||||
{
|
||||
public int updateMaLabelBindByMaIds(Long id) {
|
||||
//Long ma=Long.parseLong(String.valueOf(maId));
|
||||
return maLabelBindMapper.updateMaLabelBindByMaIds(id);
|
||||
}
|
||||
|
|
@ -118,8 +112,7 @@ public class MaLabelBindServiceImpl implements IMaLabelBindService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMaLabelBindByMaId(Long maId)
|
||||
{
|
||||
public int deleteMaLabelBindByMaId(Long maId) {
|
||||
return maLabelBindMapper.deleteMaLabelBindByMaId(maId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ public class PurchaseMacodeInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "二维码")
|
||||
private String qrCode;
|
||||
|
||||
/** rfid编号 */
|
||||
@ApiModelProperty(value = "rfid编号")
|
||||
private String rfidCode;
|
||||
|
||||
/** 是否是固定资产编号 */
|
||||
@ApiModelProperty(value = "是否是固定资产编号 0,是 1,否")
|
||||
private String fixCode;
|
||||
|
|
@ -301,6 +305,14 @@ public class PurchaseMacodeInfo extends BaseEntity
|
|||
this.statusFlag = statusFlag;
|
||||
}
|
||||
|
||||
public String getRfidCode() {
|
||||
return rfidCode;
|
||||
}
|
||||
|
||||
public void setRfidCode(String rfidCode) {
|
||||
this.rfidCode = rfidCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
|||
TmTask task = taskMapper.selectTmTaskByTaskId(taskId);
|
||||
Long typeId = purchaseMacodeInfo.getTypeId();
|
||||
String maCode = purchaseMacodeInfo.getMaCode();
|
||||
String rfidCode = purchaseMacodeInfo.getRfidCode();
|
||||
purchaseCheckDetails.setTypeId(typeId);
|
||||
purchaseCheckDetails.setTaskId(purchaseMacodeInfo.getTaskId());
|
||||
|
||||
|
|
@ -117,6 +118,7 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
|||
maMachine.setAssetsCode(purchaseMacodeInfo.getAssetsCode());
|
||||
}
|
||||
maMachine.setMaCode(maCode);
|
||||
maMachine.setRfidCode(rfidCode);
|
||||
maMachine.setCreateTime(new Date());
|
||||
maMachine.setCreateBy(SecurityUtils.getUsername());
|
||||
purchaseMacodeInfoMapper.maMachineAdd(maMachine);
|
||||
|
|
|
|||
Loading…
Reference in New Issue