|
@@ -21,7 +21,6 @@ import com.tianhu.common.log.annotation.Log;
|
|
|
import com.tianhu.common.log.enums.BusinessType;
|
|
|
import com.tianhu.common.security.annotation.PreAuthorize;
|
|
|
import com.tianhu.common.security.service.TokenService;
|
|
|
-import com.tianhu.system.api.domain.SysUser;
|
|
|
import com.tianhu.system.api.model.LoginUser;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -70,12 +69,12 @@ public class FinanceProductControllers extends BaseController {
|
|
|
@GetMapping("/list")
|
|
|
public AjaxResult list(String zfpName, String scyName, String begin,String end, QueryRequest request) {
|
|
|
//查询当前操作员
|
|
|
- LoginUser userInfo = tokenService.getLoginUser();
|
|
|
- SysUser use = userInfo.getSysUser();
|
|
|
+// LoginUser userInfo = tokenService.getLoginUser();
|
|
|
+// SysUser use = userInfo.getSysUser();
|
|
|
//获取企业
|
|
|
// String companyId = use.getCompanyId();
|
|
|
Map map = new HashMap(16);
|
|
|
-// if(CommonUtil.isNotEmpty(companyId)){
|
|
|
+// if(!SalaryConstants.OPEX.equals(companyId)){
|
|
|
// map.put("companyId",companyId);
|
|
|
// }
|
|
|
//产品名称
|
|
@@ -159,6 +158,13 @@ public class FinanceProductControllers extends BaseController {
|
|
|
if(CommonUtil.isEmpty(zfpName)){
|
|
|
return AjaxResult.error("产品名称不能为空");
|
|
|
}
|
|
|
+ //校验产品名称是否重复
|
|
|
+ LambdaQueryWrapper<ZcFinanceProduct> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper.eq(ZcFinanceProduct::getZfpName,zfpName);
|
|
|
+ List<ZcFinanceProduct> list = zcFinanceProductService.findZcFinanceProducts(lambdaQueryWrapper);
|
|
|
+ if(list.size()>0){
|
|
|
+ return AjaxResult.error("融资产品已存在");
|
|
|
+ }
|
|
|
//产品类型
|
|
|
String zfpType = CommonUtil.objToString(map.get("zfpType"));
|
|
|
//经办人意愿方式
|
|
@@ -312,6 +318,8 @@ public class FinanceProductControllers extends BaseController {
|
|
|
//获取当前用户
|
|
|
LoginUser userInf = tokenService.getLoginUser();
|
|
|
String user = CommonUtil.objToString(userInf.getSysUser().getUserId());
|
|
|
+ //主键
|
|
|
+ String zfpId = CommonUtil.objToString(map.get("zfpId"));
|
|
|
//产品编号
|
|
|
String zfpNumber = CommonUtil.objToString(map.get("zfpNumber"));
|
|
|
if(CommonUtil.isEmpty(zfpNumber)){
|
|
@@ -324,6 +332,14 @@ public class FinanceProductControllers extends BaseController {
|
|
|
if(CommonUtil.isEmpty(zfpName)){
|
|
|
return AjaxResult.error("产品名称不能为空");
|
|
|
}
|
|
|
+ //判断产品名称是否重复
|
|
|
+ LambdaQueryWrapper<ZcFinanceProduct> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper.eq(ZcFinanceProduct::getZfpName,zfpName);
|
|
|
+ lambdaQueryWrapper.ne(ZcFinanceProduct::getZfpId,zfpId);
|
|
|
+ List<ZcFinanceProduct> list = zcFinanceProductService.findZcFinanceProducts(lambdaQueryWrapper);
|
|
|
+ if(list.size()>0){
|
|
|
+ return AjaxResult.error("融资产品已存在");
|
|
|
+ }
|
|
|
//资方
|
|
|
String zfpManagementId = CommonUtil.objToString(map.get("zfpManagementId"));
|
|
|
if(CommonUtil.isEmpty(zfpManagementId)){
|
|
@@ -404,8 +420,7 @@ public class FinanceProductControllers extends BaseController {
|
|
|
String zfpProfitRate = CommonUtil.objToString(map.get("zfpProfitRate"));
|
|
|
//是否需平台审批
|
|
|
String zfpPlatform = CommonUtil.objToString(map.get("zfpPlatform"));
|
|
|
- //主键
|
|
|
- String zfpId = CommonUtil.objToString(map.get("zfpId"));
|
|
|
+
|
|
|
//产品编号
|
|
|
String heard = "";
|
|
|
if("0".equals(zfpType)){
|