|
|
@ -1208,9 +1208,9 @@ public class PurchaseorderController {
|
|
|
|
* @param id
|
|
|
|
* @param id
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@DeleteMapping("/purchaseorderitemcancel/{id}")
|
|
|
|
@DeleteMapping("/purchaseorderitemcancel/{id}+{num}")
|
|
|
|
@Transactional
|
|
|
|
@Transactional
|
|
|
|
public ActionResult purchaseorderitemcancel(@PathVariable("id") String id) {
|
|
|
|
public ActionResult purchaseorderitemcancel(@PathVariable("id") String id,@PathVariable("num") Integer num) {
|
|
|
|
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
|
|
|
|
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
|
|
|
|
if (entity != null) {
|
|
|
|
if (entity != null) {
|
|
|
|
String mark="";
|
|
|
|
String mark="";
|
|
|
@ -1286,17 +1286,37 @@ public class PurchaseorderController {
|
|
|
|
|
|
|
|
|
|
|
|
List<String> poundlistIdList = purchaseorder_item0Service.listObjs(purchaseorder_item0QueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
|
|
|
|
List<String> poundlistIdList = purchaseorder_item0Service.listObjs(purchaseorder_item0QueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
|
|
|
|
List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList);
|
|
|
|
List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList);
|
|
|
|
|
|
|
|
//1为删除
|
|
|
|
|
|
|
|
if (num==1){
|
|
|
|
for (PoundlistEntity poundlistEntity: poundlistList) {
|
|
|
|
for (PoundlistEntity poundlistEntity: poundlistList) {
|
|
|
|
// poundlistEntity.setIsPaymentdoc("0");
|
|
|
|
|
|
|
|
// poundlistEntity.setIsPay("0");
|
|
|
|
|
|
|
|
// poundlistEntity.setPayDate(null);
|
|
|
|
|
|
|
|
poundlistService.delete(poundlistEntity);
|
|
|
|
poundlistService.delete(poundlistEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//2为修改
|
|
|
|
|
|
|
|
}else if (num==2){
|
|
|
|
|
|
|
|
for (PoundlistEntity poundlistEntity: poundlistList) {
|
|
|
|
|
|
|
|
//四大日期为null
|
|
|
|
|
|
|
|
poundlistEntity.setInputDate(null);
|
|
|
|
|
|
|
|
poundlistEntity.setOutputDate(null);
|
|
|
|
|
|
|
|
poundlistEntity.setPayDate(null);
|
|
|
|
|
|
|
|
poundlistEntity.setPaymentDate(null);
|
|
|
|
|
|
|
|
//四大日期状态值为0
|
|
|
|
|
|
|
|
poundlistEntity.setIsInvoicing("0");
|
|
|
|
|
|
|
|
poundlistEntity.setIsExpense("0");
|
|
|
|
|
|
|
|
poundlistEntity.setIsPay("0");
|
|
|
|
|
|
|
|
poundlistEntity.setIsCollection("0");
|
|
|
|
|
|
|
|
//三个状态
|
|
|
|
|
|
|
|
poundlistEntity.setPurchaseStatus("99");
|
|
|
|
|
|
|
|
poundlistEntity.setSalesStatus("99");
|
|
|
|
|
|
|
|
poundlistEntity.setIsExamine("0");
|
|
|
|
|
|
|
|
//采购销售
|
|
|
|
|
|
|
|
poundlistEntity.setSalesorderId(null);
|
|
|
|
|
|
|
|
poundlistEntity.setPurchaseorderId(null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
poundlistService.updateBatchById(poundlistList);
|
|
|
|
|
|
|
|
}
|
|
|
|
purchaseorder_item0Service.remove(purchaseorder_item0QueryWrapper);
|
|
|
|
purchaseorder_item0Service.remove(purchaseorder_item0QueryWrapper);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
purchaseorderitemService.delete(entity);
|
|
|
|
purchaseorderitemService.delete(entity);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ActionResult.success("作废成功");
|
|
|
|
return ActionResult.success("作废成功");
|
|
|
|
}
|
|
|
|
}
|
|
|
|