master
ky 5 years ago
parent 8ce954ae74
commit 31c747f311

@ -50,9 +50,9 @@ public class PcCustomController {
@PostMapping("/pcEnableCustomList")
@ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header")
@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();
}

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

@ -92,4 +92,8 @@ public class Invoice implements Serializable {
@ApiModelProperty(hidden = true)
@TableField(exist = false)
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
MiniUserServiceImpl miniUserService;
@Autowired
ParkMapper parkMapper;
public void customRegister(Custom custom,List<CustomSupport> customSupports){
String id = String.format("%06d",new Random().nextInt(999999)+1);
Custom isHave = customMapper.selectById(id);
@ -133,6 +136,9 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
Custom custom = customMapper.selectById(customId);
List<CustomSupport> customSupports = customSupportMapper.selectList(new EntityWrapper<CustomSupport>().eq("custom_id", customId));
jsonObject.put("custom",custom);
String parkId = custom.getPark();
Park park = parkMapper.selectById(parkId);
custom.setParkName(park.getName());
jsonObject.put("customSupports",customSupports);
//年度
@ -214,16 +220,20 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
* @param pageSize
* @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;
List<Custom> customs;
if(null==copycatId){
count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "enable"));
customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "enable").orderBy("create_date", false));
count = customMapper.selectCount(customWrapper);
customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), customWrapper.orderBy("create_date", false));
}else {
count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "enable").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));
count = customMapper.selectCount(customWrapper.eq("copycat_id",copycatId));
customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), customWrapper.eq("copycat_id",copycatId).orderBy("create_date", false));
}for(Custom custom:customs){
String copycat = custom.getCopycatId();
PcUser pcUser = pcUserService.pcUserDetail(copycat);

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

Loading…
Cancel
Save