master
ky 5 years ago
parent 8ce954ae74
commit 31c747f311

@ -50,9 +50,9 @@ public class PcCustomController {
@PostMapping("/pcEnableCustomList") @PostMapping("/pcEnableCustomList")
@ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header") @ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header")
@ApiOperation(value = "已认证列表", notes = "已认证列表") @ApiOperation(value = "已认证列表", notes = "已认证列表")
public Result pcEnableCustomList(Integer pageNum,Integer pageSize,String copycatId) { public Result pcEnableCustomList(Integer pageNum,Integer pageSize,String copycatId,String param) {
JSONObject customs = customService.pcEnableCustomList(pageNum,pageSize,copycatId); JSONObject customs = customService.pcEnableCustomList(pageNum,pageSize,copycatId,param);
return ResultBuilder.withPayload(customs).build(); return ResultBuilder.withPayload(customs).build();
} }

@ -142,4 +142,8 @@ red yellow blue purple
@ApiModelProperty(value = "成立日期") @ApiModelProperty(value = "成立日期")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date buildDate; private Date buildDate;
@ApiModelProperty(hidden = true)
@TableField(exist = false)
private String parkName;
} }

@ -92,4 +92,8 @@ public class Invoice implements Serializable {
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
@TableField(exist = false) @TableField(exist = false)
private String copycatName; private String copycatName;
@ApiModelProperty(hidden = true)
@TableField(exist = false)
private String customSocialCreditCode;
} }

@ -56,6 +56,9 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
@Autowired @Autowired
MiniUserServiceImpl miniUserService; MiniUserServiceImpl miniUserService;
@Autowired
ParkMapper parkMapper;
public void customRegister(Custom custom,List<CustomSupport> customSupports){ public void customRegister(Custom custom,List<CustomSupport> customSupports){
String id = String.format("%06d",new Random().nextInt(999999)+1); String id = String.format("%06d",new Random().nextInt(999999)+1);
Custom isHave = customMapper.selectById(id); Custom isHave = customMapper.selectById(id);
@ -133,6 +136,9 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
Custom custom = customMapper.selectById(customId); Custom custom = customMapper.selectById(customId);
List<CustomSupport> customSupports = customSupportMapper.selectList(new EntityWrapper<CustomSupport>().eq("custom_id", customId)); List<CustomSupport> customSupports = customSupportMapper.selectList(new EntityWrapper<CustomSupport>().eq("custom_id", customId));
jsonObject.put("custom",custom); jsonObject.put("custom",custom);
String parkId = custom.getPark();
Park park = parkMapper.selectById(parkId);
custom.setParkName(park.getName());
jsonObject.put("customSupports",customSupports); jsonObject.put("customSupports",customSupports);
//年度 //年度
@ -214,16 +220,20 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
* @param pageSize * @param pageSize
* @return * @return
*/ */
public JSONObject pcEnableCustomList(Integer pageNum,Integer pageSize,String copycatId){ public JSONObject pcEnableCustomList(Integer pageNum,Integer pageSize,String copycatId,String param){
Wrapper<Custom> customWrapper = new EntityWrapper<Custom>().eq("status_code", "enable");
if(!param.equals("")){
customWrapper.like("company_name",param).like("link_man",param).like("link_telephone",param);
}
Integer count = null; Integer count = null;
List<Custom> customs; List<Custom> customs;
if(null==copycatId){ if(null==copycatId){
count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "enable")); count = customMapper.selectCount(customWrapper);
customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "enable").orderBy("create_date", false)); customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), customWrapper.orderBy("create_date", false));
}else { }else {
count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "enable").eq("copycat_id",copycatId)); count = customMapper.selectCount(customWrapper.eq("copycat_id",copycatId));
customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "enable").eq("copycat_id",copycatId).orderBy("create_date", false)); customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), customWrapper.eq("copycat_id",copycatId).orderBy("create_date", false));
}for(Custom custom:customs){ }for(Custom custom:customs){
String copycat = custom.getCopycatId(); String copycat = custom.getCopycatId();
PcUser pcUser = pcUserService.pcUserDetail(copycat); PcUser pcUser = pcUserService.pcUserDetail(copycat);

@ -121,6 +121,7 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
String customId = invoice.getCustomId(); String customId = invoice.getCustomId();
Custom custom = customMapper.selectById(customId); Custom custom = customMapper.selectById(customId);
invoice.setCustomName(custom.getCompanyName()); invoice.setCustomName(custom.getCompanyName());
invoice.setCustomSocialCreditCode(custom.getSocialCreditCode());
InvoiceHeader invoiceHeader = invoiceHeaderMapper.selectById(invoice.getInvoiceHeaderId()); InvoiceHeader invoiceHeader = invoiceHeaderMapper.selectById(invoice.getInvoiceHeaderId());
jsonObject.put("invoice", invoice); jsonObject.put("invoice", invoice);
jsonObject.put("invoiceHeader", invoiceHeader); jsonObject.put("invoiceHeader", invoiceHeader);

Loading…
Cancel
Save