|
|
@ -16,6 +16,7 @@ import com.ruoyi.tc.entity.po.AssetMiniProgramsJyPo;
|
|
|
|
import com.ruoyi.tc.entity.po.AssetOfficialAccountJyPo;
|
|
|
|
import com.ruoyi.tc.entity.po.AssetOfficialAccountJyPo;
|
|
|
|
import com.ruoyi.tc.entity.request.AssetAuditPageRequest;
|
|
|
|
import com.ruoyi.tc.entity.request.AssetAuditPageRequest;
|
|
|
|
import com.ruoyi.tc.entity.request.AssetAuditRequest;
|
|
|
|
import com.ruoyi.tc.entity.request.AssetAuditRequest;
|
|
|
|
|
|
|
|
import com.ruoyi.tc.entity.request.AssetOfficialAccountMenu;
|
|
|
|
import com.ruoyi.tc.entity.request.AssetOfficialAccountPageRequest;
|
|
|
|
import com.ruoyi.tc.entity.request.AssetOfficialAccountPageRequest;
|
|
|
|
import com.ruoyi.tc.service.AssetOfficialAccountJyService;
|
|
|
|
import com.ruoyi.tc.service.AssetOfficialAccountJyService;
|
|
|
|
import com.ruoyi.tc.service.AssetOfficialAccountService;
|
|
|
|
import com.ruoyi.tc.service.AssetOfficialAccountService;
|
|
|
@ -30,6 +31,7 @@ import javax.annotation.Resource;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import java.security.Security;
|
|
|
|
import java.security.Security;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
|
|
|
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
|
|
@ -83,7 +85,20 @@ public class AssetOfficialAccountController {
|
|
|
|
@ApiOperation(value = "通过主键查询单条公众号数据")
|
|
|
|
@ApiOperation(value = "通过主键查询单条公众号数据")
|
|
|
|
@GetMapping("/{id}")
|
|
|
|
@GetMapping("/{id}")
|
|
|
|
public AjaxResult queryById(@PathVariable("id") Long id) {
|
|
|
|
public AjaxResult queryById(@PathVariable("id") Long id) {
|
|
|
|
return success(assetOfficialAccountService.getById(id));
|
|
|
|
AssetOfficialAccount byId = assetOfficialAccountService.getById(id);
|
|
|
|
|
|
|
|
List<AssetOfficialAccountMenu> a1 = new ArrayList<>();
|
|
|
|
|
|
|
|
String[] s1 = byId.getCdmc().split("\\|");
|
|
|
|
|
|
|
|
String[] s2 = byId.getCdlj().split("\\|");
|
|
|
|
|
|
|
|
String[] s3 = byId.getCdlx().split("\\|");
|
|
|
|
|
|
|
|
for (int i = 0; i < s1.length; i++) {
|
|
|
|
|
|
|
|
AssetOfficialAccountMenu as = new AssetOfficialAccountMenu();
|
|
|
|
|
|
|
|
as.setCdmc(s1[i]);
|
|
|
|
|
|
|
|
as.setCdlj(s2[i]);
|
|
|
|
|
|
|
|
as.setCdlx(s3[i]);
|
|
|
|
|
|
|
|
a1.add(as);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
byId.setCdList(a1);
|
|
|
|
|
|
|
|
return success(byId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//=================================================
|
|
|
|
//=================================================
|
|
|
@ -94,6 +109,22 @@ public class AssetOfficialAccountController {
|
|
|
|
@PreAuthorize("@ss.hasAnyRoles('unit')")
|
|
|
|
@PreAuthorize("@ss.hasAnyRoles('unit')")
|
|
|
|
@PostMapping("/unitEdit")
|
|
|
|
@PostMapping("/unitEdit")
|
|
|
|
public AjaxResult unitEdit(@RequestBody @Valid AssetOfficialAccountJyPo ao) {
|
|
|
|
public AjaxResult unitEdit(@RequestBody @Valid AssetOfficialAccountJyPo ao) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ao.getCdList() != null && !ao.getCdList().isEmpty()) {
|
|
|
|
|
|
|
|
StringBuilder a = new StringBuilder();
|
|
|
|
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
|
|
|
|
StringBuilder c = new StringBuilder();
|
|
|
|
|
|
|
|
ao.getCdList().forEach(x -> {
|
|
|
|
|
|
|
|
a.append(x.getCdmc()).append("|");
|
|
|
|
|
|
|
|
b.append(x.getCdlj()).append("|");
|
|
|
|
|
|
|
|
c.append(x.getCdlx()).append("|");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
ao.setCdmc(a.toString());
|
|
|
|
|
|
|
|
ao.setCdlj(b.toString());
|
|
|
|
|
|
|
|
ao.setCdlx(c.toString());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AssetOfficialAccountJyPo one = assetOfficialAccountJyService.lambdaQuery().eq(AssetOfficialAccountJyPo::getSsdw,ao.getSsdw())
|
|
|
|
AssetOfficialAccountJyPo one = assetOfficialAccountJyService.lambdaQuery().eq(AssetOfficialAccountJyPo::getSsdw,ao.getSsdw())
|
|
|
|
.eq(AssetOfficialAccountJyPo::getGzhmc,ao.getGzhmc()).isNull(AssetOfficialAccountJyPo::getTaskId).one();
|
|
|
|
.eq(AssetOfficialAccountJyPo::getGzhmc,ao.getGzhmc()).isNull(AssetOfficialAccountJyPo::getTaskId).one();
|
|
|
|
ao.setAuditState("1");
|
|
|
|
ao.setAuditState("1");
|
|
|
@ -138,7 +169,20 @@ public class AssetOfficialAccountController {
|
|
|
|
@ApiOperation(value = "单位端查看中间数据详情", response = AssetOfficialAccountJyPo.class)
|
|
|
|
@ApiOperation(value = "单位端查看中间数据详情", response = AssetOfficialAccountJyPo.class)
|
|
|
|
@GetMapping("/lookInfo/{id}")
|
|
|
|
@GetMapping("/lookInfo/{id}")
|
|
|
|
public AjaxResult lookInfo(@PathVariable Long id) {
|
|
|
|
public AjaxResult lookInfo(@PathVariable Long id) {
|
|
|
|
return success(assetOfficialAccountJyService.getById(id));
|
|
|
|
AssetOfficialAccountJyPo byId = assetOfficialAccountJyService.getById(id);
|
|
|
|
|
|
|
|
List<AssetOfficialAccountMenu> a1 = new ArrayList<>();
|
|
|
|
|
|
|
|
String[] s1 = byId.getCdmc().split("\\|");
|
|
|
|
|
|
|
|
String[] s2 = byId.getCdlj().split("\\|");
|
|
|
|
|
|
|
|
String[] s3 = byId.getCdlx().split("\\|");
|
|
|
|
|
|
|
|
for (int i = 0; i < s1.length; i++) {
|
|
|
|
|
|
|
|
AssetOfficialAccountMenu as = new AssetOfficialAccountMenu();
|
|
|
|
|
|
|
|
as.setCdmc(s1[i]);
|
|
|
|
|
|
|
|
as.setCdlj(s2[i]);
|
|
|
|
|
|
|
|
as.setCdlx(s3[i]);
|
|
|
|
|
|
|
|
a1.add(as);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
byId.setCdList(a1);
|
|
|
|
|
|
|
|
return success(byId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|