Merge remote-tracking branch 'origin/dev' into test
This commit is contained in:
@@ -26,9 +26,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.zt.plat.framework.common.pojo.CommonResult.error;
|
|
||||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||||
import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.CONTRACT_SUBMIT_ERP_FAIL;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "管理后台 - 合同管理")
|
@Tag(name = "管理后台 - 合同管理")
|
||||||
@@ -155,8 +153,10 @@ public class ContractController implements BusinessControllerMarker {
|
|||||||
@Operation(summary = "提交ERP")
|
@Operation(summary = "提交ERP")
|
||||||
@PreAuthorize("@ss.hasPermission('base:contract:erp')")
|
@PreAuthorize("@ss.hasPermission('base:contract:erp')")
|
||||||
public CommonResult<JSONObject> submitErp(@RequestParam("id") Long id) {
|
public CommonResult<JSONObject> submitErp(@RequestParam("id") Long id) {
|
||||||
JSONObject res = contractService.submitErp(id);
|
// JSONObject res = contractService.submitErp(id);
|
||||||
return res.getBool("success") ? success(res) : error(CONTRACT_SUBMIT_ERP_FAIL.getCode(), res.getStr("data"));
|
// return res.getBool("success") ? success(res) : error(CONTRACT_SUBMIT_ERP_FAIL.getCode(), res.getStr("data"));
|
||||||
|
// TODO ERP默认返回成功处理 SZHGYL-251
|
||||||
|
return success(new JSONObject().putOnce("success", true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/list/up-not-relation")
|
@GetMapping("/list/up-not-relation")
|
||||||
|
|||||||
@@ -1243,8 +1243,26 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
queryReqVO.getElementName()
|
queryReqVO.getElementName()
|
||||||
);
|
);
|
||||||
|
|
||||||
// 分页返回
|
// 分页返回结果
|
||||||
return new PageResult<FormulaRespVO>().setTotal(ipage.getTotal()).setList(ipage.getRecords());
|
PageResult<FormulaRespVO> results = new PageResult<FormulaRespVO>().setTotal(ipage.getTotal()).setList(ipage.getRecords());
|
||||||
|
if (results.getTotal() > 0) {
|
||||||
|
results.getList().forEach(respVO -> {
|
||||||
|
// 基础系数配置
|
||||||
|
List<ContractCoefficientDO> coefficientDOS = contractCoefficientMapper.selectList("FMU_ID", respVO.getId());
|
||||||
|
respVO.setCoefficients(BeanUtils.toBean(coefficientDOS, CoefficientRespVO.class));
|
||||||
|
// 品位等级价配置
|
||||||
|
List<ContractGradeDO> gradeDOS = contractGradeMapper.selectList("FMU_ID", respVO.getId());
|
||||||
|
respVO.setGrades(BeanUtils.toBean(gradeDOS, GradeRespVO.class));
|
||||||
|
// 调整价配置
|
||||||
|
List<ContractDeductDO> deductDOS = contractDeductMapper.selectList("FMU_ID", respVO.getId());
|
||||||
|
respVO.setDeducts(BeanUtils.toBean(deductDOS, DeductRespVO.class));
|
||||||
|
// 市场价配置
|
||||||
|
List<ContractPriceDO> priceDOS = contractPriceMapper.selectList("FMU_ID", respVO.getId());
|
||||||
|
respVO.setPrices(BeanUtils.toBean(priceDOS, PriceRespVO.class));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user