Commit 9e230d42 authored by limei's avatar limei

材料管理添加接口修改、企业注册校验接口修改

parent 126aa0f8
......@@ -294,7 +294,7 @@ public class CompanyController extends BaseController {
public ResponseModel<Boolean> hasExistUser( @PathVariable(value = "adminLoginName") String adminLoginName) {
Boolean flag = false;
Company company = companyServiceImpl.getOne(new LambdaQueryWrapper<Company>().eq(Company::getAdminLoginName,adminLoginName));
if(!ValidationUtil.isEmpty(company)) {
if(ValidationUtil.isEmpty(company)) {
flag = true;
}
return ResponseHelper.buildResponse(flag);
......@@ -419,7 +419,7 @@ public class CompanyController extends BaseController {
public ResponseModel<Boolean> hasExistPhone( @PathVariable(value = "adminTel") String adminTel) {
Boolean flag = false;
Company company = companyServiceImpl.getOne(new LambdaQueryWrapper<Company>().eq(Company::getAdminTel,adminTel));
if(!ValidationUtil.isEmpty(company)) {
if(ValidationUtil.isEmpty(company)) {
flag = true;
}
return ResponseHelper.buildResponse(flag);
......@@ -436,7 +436,7 @@ public class CompanyController extends BaseController {
public ResponseModel<Boolean> hasExistUnit( @PathVariable(value = "creditCode") String creditCode) {
Boolean flag = false;
Company company = companyServiceImpl.getOne(new LambdaQueryWrapper<Company>().eq(Company::getCreditCode,creditCode));
if(!ValidationUtil.isEmpty(company)) {
if(ValidationUtil.isEmpty(company)) {
flag = true;
}
return ResponseHelper.buildResponse(flag);
......
......@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Attachment;
import com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IAttachmentService;
import com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -42,20 +43,22 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment,
*/
public void saveAttachment(JSONArray subForm, Long sequenceNbr){
Attachment attachment = new Attachment();
attachment.setSourceId(sequenceNbr);
attachment.setInfo(JSON.toJSONString(subForm));
for(Object o:subForm){
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(o));
jsonObject.getString("Symbol_key");
JSONArray jsonArray = jsonObject.getJSONArray("info");
for(Object j:jsonArray){
JSONObject info = JSON.parseObject(JSON.toJSONString(j));
String name = info.getString("name");
attachment.setSourceId(sequenceNbr);
attachment.setName(info.getString("name"));
attachment.setInfo(JSON.toJSONString(subForm));
attachment.setType(name.substring(name.lastIndexOf(".")+1));
this.save(attachment);
break;
if(!ValidationUtil.isEmpty(jsonArray)) {
for (Object j : jsonArray) {
JSONObject info = JSON.parseObject(JSON.toJSONString(j));
String name = info.getString("name");
attachment.setName(info.getString("name"));
attachment.setType(name.substring(name.lastIndexOf(".") + 1));
break;
}
}
}
this.save(attachment);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment