|
|
|
@ -13,6 +13,7 @@ import com.ruoyi.jjh.declaration.entity.request.EnterpriseInfoRequest;
|
|
|
|
|
import com.ruoyi.jjh.declaration.entity.request.EnterpriseInfoWorkRequest;
|
|
|
|
|
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseBasicInfoService;
|
|
|
|
|
import com.ruoyi.jjh.ent.entity.JHeadQuartersRevenue;
|
|
|
|
|
import com.ruoyi.jjh.ent.entity.JServicesList;
|
|
|
|
|
import com.ruoyi.jjh.ent.service.JHeadQuartersRevenueService;
|
|
|
|
|
import com.ruoyi.jjh.ent.service.JServicesListService;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
@ -145,53 +146,25 @@ public class BmsEnterpriseBasicInfoController extends BaseController {
|
|
|
|
|
/**
|
|
|
|
|
* 将企业库企业更改分类
|
|
|
|
|
*/
|
|
|
|
|
// @ApiOperation(value = "将企业库企业更改分类", response = BmsEnterpriseBasicInfo.class)
|
|
|
|
|
// @GetMapping(value = "/changeType")
|
|
|
|
|
// public AjaxResult changeType() {
|
|
|
|
|
// List<BmsEnterpriseBasicInfo> list = bmsEnterpriseBasicInfoService.list();
|
|
|
|
|
//生产性服务业
|
|
|
|
|
// List<JServicesList> list1 = jServicesListService.lambdaQuery().eq(JServicesList::getServicesType, 1).list();
|
|
|
|
|
//限上批零住餐
|
|
|
|
|
// List<JServicesList> list2 = jServicesListService.lambdaQuery().eq(JServicesList::getServicesType, 4).list();
|
|
|
|
|
// //总部企业
|
|
|
|
|
// List<JHeadQuartersRevenue> list3 = jHeadQuartersRevenueService.list();
|
|
|
|
|
// for (BmsEnterpriseBasicInfo x : list) {
|
|
|
|
|
// for (JServicesList y : list1) {
|
|
|
|
|
// if(x.getTyshxydm().equals(y.getTyshxydm())){
|
|
|
|
|
// if(x.getType()==null){
|
|
|
|
|
// x.setType("5");
|
|
|
|
|
// }else {
|
|
|
|
|
// x.setType(x.getType()+","+"5");
|
|
|
|
|
// }
|
|
|
|
|
// bmsEnterpriseBasicInfoService.updateById(x);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// for (BmsEnterpriseBasicInfo x : list) {
|
|
|
|
|
// for (JServicesList y : list2) {
|
|
|
|
|
// if(x.getTyshxydm().equals(y.getTyshxydm())){
|
|
|
|
|
// if(x.getType()==null){
|
|
|
|
|
// x.setType("6");
|
|
|
|
|
// }else {
|
|
|
|
|
// x.setType(x.getType()+","+"6");
|
|
|
|
|
// }
|
|
|
|
|
// bmsEnterpriseBasicInfoService.updateById(x);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// for (BmsEnterpriseBasicInfo x : list) {
|
|
|
|
|
// for (JHeadQuartersRevenue y : list3) {
|
|
|
|
|
// if (x.getTyshxydm().equals(y.getTyshxydm())) {
|
|
|
|
|
// if (x.getType() == null) {
|
|
|
|
|
// x.setType("4");
|
|
|
|
|
// } else {
|
|
|
|
|
// x.setType(x.getType() + "," + "4");
|
|
|
|
|
// }
|
|
|
|
|
// bmsEnterpriseBasicInfoService.updateById(x);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// return success();
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "将企业库企业更改分类", response = BmsEnterpriseBasicInfo.class)
|
|
|
|
|
@PreAuthorize("@ss.hasAnyRoles('admin')")
|
|
|
|
|
@GetMapping(value = "/changeType")
|
|
|
|
|
public AjaxResult changeType() {
|
|
|
|
|
List<BmsEnterpriseBasicInfo> list = bmsEnterpriseBasicInfoService.list();
|
|
|
|
|
//生活性服务业
|
|
|
|
|
List<JServicesList> list1 = jServicesListService.lambdaQuery().eq(JServicesList::getServicesType, 2).list();
|
|
|
|
|
for (BmsEnterpriseBasicInfo x : list) {
|
|
|
|
|
for (JServicesList y : list1) {
|
|
|
|
|
if (x.getTyshxydm().equals(y.getTyshxydm())) {
|
|
|
|
|
if ("2".equals(x.getType())) {
|
|
|
|
|
x.setType("7");
|
|
|
|
|
} else {
|
|
|
|
|
x.setType(x.getType() + "," + "7");
|
|
|
|
|
}
|
|
|
|
|
bmsEnterpriseBasicInfoService.updateById(x);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return success();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|