Merge branch 'dev-cq-bug' of http://192.168.0.56:3000/bonus/devicesmgt into dev-cq-bug
This commit is contained in:
commit
571771bcac
|
|
@ -42,4 +42,11 @@ public interface MaMachineMapper {
|
||||||
SltAgreementApply getLeaseProject(MaMachine ma);
|
SltAgreementApply getLeaseProject(MaMachine ma);
|
||||||
|
|
||||||
SltAgreementApply getBackProject(MaMachine ma);
|
SltAgreementApply getBackProject(MaMachine ma);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据typeId修改库存
|
||||||
|
* @param typeId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateNum(long typeId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,17 @@ public class MaMachineServiceImpl implements MaMachineService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int remove(Long[] maIds) {
|
public int remove(Long[] maIds) {
|
||||||
return maMachineMapper.remove(maIds);
|
int res = 0;
|
||||||
|
if (maIds != null || maIds.length > 0) {
|
||||||
|
for (Long maId : maIds) {
|
||||||
|
MaMachine maMachine = maMachineMapper.selectMaMachineByMaId(maId);
|
||||||
|
if (maMachine.getTypeId() != 0 && ("15").equals(maMachine.getMaStatus())) {
|
||||||
|
res = maMachineMapper.updateNum(maMachine.getTypeId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
res += maMachineMapper.remove(maIds);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -262,6 +262,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</set>
|
</set>
|
||||||
where ma_id = #{maId}
|
where ma_id = #{maId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateNum">
|
||||||
|
update ma_type set num = num - 1 where type_id = #{typeId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="remove" parameterType="Long">
|
<delete id="remove" parameterType="Long">
|
||||||
delete from ma_machine where ma_id in
|
delete from ma_machine where ma_id in
|
||||||
|
|
|
||||||
|
|
@ -325,8 +325,8 @@ export default {
|
||||||
proList: [], //工程集合
|
proList: [], //工程集合
|
||||||
statusList: [
|
statusList: [
|
||||||
{ id: '33', name: '待出库' },
|
{ id: '33', name: '待出库' },
|
||||||
{ id: '34', name: '出库中' },
|
{ id: '34', name: '出库进行中' },
|
||||||
{ id: '35', name: '已出库' },
|
{ id: '35', name: '完成' },
|
||||||
], //工程集合
|
], //工程集合
|
||||||
//搜索下拉数据
|
//搜索下拉数据
|
||||||
typeList: [],
|
typeList: [],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue