Showing
3 changed files
with
29 additions
and
0 deletions
| @@ -884,6 +884,18 @@ public class ContractDistributorStandardController extends DefaultBaseController | @@ -884,6 +884,18 @@ public class ContractDistributorStandardController extends DefaultBaseController | ||
| 884 | return InvokeResultBuilder.success(); | 884 | return InvokeResultBuilder.success(); |
| 885 | } | 885 | } |
| 886 | 886 | ||
| 887 | + | ||
| 888 | + @ApiOperation("生成订货单") | ||
| 889 | + @PostMapping("/createPurchaseOrderInfo") | ||
| 890 | + public InvokeResult<Void> createPurchaseOrderInfo(@NotBlank(message = "id不能为空!") String id, | ||
| 891 | + @NotBlank(message = "type不能为空!") String type) { | ||
| 892 | + | ||
| 893 | + contractDistributorStandardService.createPurchaseOrderInfoByContractId(id, type); | ||
| 894 | + | ||
| 895 | + | ||
| 896 | + return InvokeResultBuilder.success(); | ||
| 897 | + } | ||
| 898 | + | ||
| 887 | /** | 899 | /** |
| 888 | * 标准合同模版打印 | 900 | * 标准合同模版打印 |
| 889 | */ | 901 | */ |
| @@ -979,6 +979,21 @@ public class ContractDistributorStandardServiceImpl extends | @@ -979,6 +979,21 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 979 | } | 979 | } |
| 980 | 980 | ||
| 981 | /** | 981 | /** |
| 982 | + * 根据合同id创建订货单 | ||
| 983 | + * | ||
| 984 | + * @param contractId | ||
| 985 | + */ | ||
| 986 | + @Transactional(rollbackFor = Exception.class) | ||
| 987 | + @Override | ||
| 988 | + public void createPurchaseOrderInfoByContractId(String contractId, String type) { | ||
| 989 | + if (StringUtils.isBlank(contractId) || StringUtils.isEmpty(type)) { | ||
| 990 | + throw new DefaultClientException("参数错误!"); | ||
| 991 | + } | ||
| 992 | + ContractDistributorStandard contractDistributorStandard = findById(contractId); | ||
| 993 | + createPurchaseOrderInfo(contractDistributorStandard, type); | ||
| 994 | + } | ||
| 995 | + | ||
| 996 | + /** | ||
| 982 | * 创建订货单 | 997 | * 创建订货单 |
| 983 | * | 998 | * |
| 984 | * @param contractDistributorStandard | 999 | * @param contractDistributorStandard |
| @@ -130,6 +130,8 @@ public interface ContractDistributorStandardService extends BaseMpService<Contra | @@ -130,6 +130,8 @@ public interface ContractDistributorStandardService extends BaseMpService<Contra | ||
| 130 | */ | 130 | */ |
| 131 | void orderUpdateContract(String orderId); | 131 | void orderUpdateContract(String orderId); |
| 132 | 132 | ||
| 133 | + void createPurchaseOrderInfoByContractId(String contractId, String type); | ||
| 134 | + | ||
| 133 | /** | 135 | /** |
| 134 | * 创建订货单 | 136 | * 创建订货单 |
| 135 | */ | 137 | */ |