|
@ -3,9 +3,11 @@ import java.time.LocalDateTime; |
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
|
|
import com.qs.serve.common.util.Assert; |
|
|
import com.qs.serve.common.util.HttpUtil; |
|
|
import com.qs.serve.common.util.HttpUtil; |
|
|
import com.qs.serve.common.util.IdUtil; |
|
|
import com.qs.serve.common.util.IdUtil; |
|
|
import com.qs.serve.common.util.JsonUtil; |
|
|
import com.qs.serve.common.util.JsonUtil; |
|
|
|
|
|
import com.qs.serve.modules.bir.consts.BirActivityCenterGoodsUtil; |
|
|
import com.qs.serve.modules.bms.entity.BmsSupplier; |
|
|
import com.qs.serve.modules.bms.entity.BmsSupplier; |
|
|
import com.qs.serve.modules.bms.mapper.BmsSupplierMapper; |
|
|
import com.qs.serve.modules.bms.mapper.BmsSupplierMapper; |
|
|
import com.qs.serve.modules.sys.entity.dto.CostDeletion; |
|
|
import com.qs.serve.modules.sys.entity.dto.CostDeletion; |
|
@ -47,8 +49,10 @@ public class SysDeleteLogServiceImpl extends ServiceImpl<SysDeleteLogMapper,SysD |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public void deleteCostApply(Long costApplyId,String remark) { |
|
|
public void deleteCostApply(Long costApplyId,String remark) { |
|
|
|
|
|
|
|
|
TbsCostApply costApply = tbsCostApplyMapper.selectById(costApplyId); |
|
|
TbsCostApply costApply = tbsCostApplyMapper.selectById(costApplyId); |
|
|
BmsSupplier supplier = supplierMapper.selectById(costApply.getSupplierId()); |
|
|
BmsSupplier supplier = supplierMapper.selectById(costApply.getSupplierId()); |
|
|
|
|
|
|
|
|
String batchCode = System.currentTimeMillis()+""; |
|
|
String batchCode = System.currentTimeMillis()+""; |
|
|
List<SysDeleteLog> deleteLogList = new ArrayList<>(); |
|
|
List<SysDeleteLog> deleteLogList = new ArrayList<>(); |
|
|
if(costApply!=null){ |
|
|
if(costApply!=null){ |
|
@ -61,6 +65,19 @@ public class SysDeleteLogServiceImpl extends ServiceImpl<SysDeleteLogMapper,SysD |
|
|
deleteLogList.add(deleteLog); |
|
|
deleteLogList.add(deleteLog); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//远程删除ERP
|
|
|
|
|
|
String url = "http://59.37.164.96:2505/api/cms/cost/deletion"; |
|
|
|
|
|
CostDeletion costDeletion = new CostDeletion(); |
|
|
|
|
|
costDeletion.setEmpNo(costApply.getUserCode()); |
|
|
|
|
|
String bookCode = ThirtyVerification.getInitBookCode(supplier.getBookCode(),supplier.getCode()); |
|
|
|
|
|
costDeletion.setCacc(bookCode); |
|
|
|
|
|
costDeletion.setVerificationCode(costApply.getCode()); |
|
|
|
|
|
String rs = HttpUtil.doPost(url, JsonUtil.objectToJson(costDeletion),null); |
|
|
|
|
|
|
|
|
|
|
|
if(!rs.contains("200")){ |
|
|
|
|
|
Assert.throwEx("远程删除失败"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
tbsCostApplyRemoveMapper.tbs_cost_apply(costApplyId); |
|
|
tbsCostApplyRemoveMapper.tbs_cost_apply(costApplyId); |
|
|
|
|
|
|
|
|
tbsCostApplyRemoveMapper.tbs_activity(costApplyId); |
|
|
tbsCostApplyRemoveMapper.tbs_activity(costApplyId); |
|
@ -120,15 +137,7 @@ public class SysDeleteLogServiceImpl extends ServiceImpl<SysDeleteLogMapper,SysD |
|
|
tbsCostApplyRemoveMapper.tbs_cost_todo(costApplyId); |
|
|
tbsCostApplyRemoveMapper.tbs_cost_todo(costApplyId); |
|
|
this.saveBatch(deleteLogList); |
|
|
this.saveBatch(deleteLogList); |
|
|
|
|
|
|
|
|
//远程删除ERP
|
|
|
BirActivityCenterGoodsUtil.buildBir(costApplyId); |
|
|
String url = "http://59.37.164.96:2505/api/cms/cost/deletion"; |
|
|
|
|
|
CostDeletion costDeletion = new CostDeletion(); |
|
|
|
|
|
costDeletion.setEmpNo(costApply.getUserCode()); |
|
|
|
|
|
String bookCode = ThirtyVerification.getInitBookCode(supplier.getBookCode(),supplier.getCode()); |
|
|
|
|
|
costDeletion.setCacc(bookCode); |
|
|
|
|
|
costDeletion.setVerificationCode(costApply.getCode()); |
|
|
|
|
|
HttpUtil.doPost(url, JsonUtil.objectToJson(costDeletion),null); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|