|
|
|
@ -42,10 +42,7 @@ import com.glxp.api.service.inv.InvPreProductDetailService;
|
|
|
|
|
import com.glxp.api.service.inv.InvPreinProductDetailService;
|
|
|
|
|
import com.glxp.api.service.inv.impl.InvProductDetailService;
|
|
|
|
|
import com.glxp.api.service.system.SystemParamConfigService;
|
|
|
|
|
import com.glxp.api.util.CustomUtil;
|
|
|
|
|
import com.glxp.api.util.GennerOrderUtils;
|
|
|
|
|
import com.glxp.api.util.IntUtil;
|
|
|
|
|
import com.glxp.api.util.OrderNoTypeBean;
|
|
|
|
|
import com.glxp.api.util.*;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
@ -762,6 +759,42 @@ public class IoOrderController extends BaseController {
|
|
|
|
|
return ResultVOUtils.success("删除成功!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
public RedisUtil redisUtil;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 为平潭写的删除科室出库的单据,验收完后需要删掉
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@PostMapping("udiwms/inout/order/finish/pt/delete")
|
|
|
|
|
@Log(title = "单据管理", businessType = BusinessType.DELETE)
|
|
|
|
|
public BaseResponse deleteAll(@RequestBody DeleteRequest deleteRequest) {
|
|
|
|
|
|
|
|
|
|
List<IoOrderEntity> orderEntities = orderService.findAllByAction("SC71021292871198");
|
|
|
|
|
Boolean b = redisUtil.getBool("deleteAllOrder");
|
|
|
|
|
if (b)
|
|
|
|
|
return ResultVOUtils.error("当前删除任务正在执行,请勿重复点击!");
|
|
|
|
|
redisUtil.set("deleteAllOrder", true);
|
|
|
|
|
orderEntities.parallelStream().forEach(item ->
|
|
|
|
|
{
|
|
|
|
|
List<String> delBillNos = new ArrayList<>();
|
|
|
|
|
delBillNos.add(item.getBillNo());
|
|
|
|
|
orderService.deleteInvByBillNo(delBillNos);
|
|
|
|
|
for (String billNo : delBillNos) {
|
|
|
|
|
orderService.deleteByBillNo(billNo);
|
|
|
|
|
orderDetailBizService.deleteByOrderId(billNo);
|
|
|
|
|
orderDetailCodeService.deleteByOrderId(billNo);
|
|
|
|
|
codeTempService.deleteByBillNo(billNo);
|
|
|
|
|
codeService.deleteCodeByOrderId(billNo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
redisUtil.set("deleteAllOrder", false);
|
|
|
|
|
return ResultVOUtils.success("删除成功!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//单据编辑,条码减一
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|