添加分享接口
This commit is contained in:
parent
99f236015b
commit
3b42d2595d
|
|
@ -384,4 +384,16 @@ public class InvoicingApi {
|
|||
String result = invoicingApi.editShareInfo(cgdMainEntityDto);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "查询采购单信息(主要用于分享接口)", notes = "查询采购单信息(主要用于分享接口)")
|
||||
@GetMapping(value = "/getShareInfoByCgdId")
|
||||
public Result<Map<String, Object>> getShareInfoByCgdId(CgdMainEntity cgdMainEntityDto) {
|
||||
if(StringUtils.isEmpty(cgdMainEntityDto.getId())){
|
||||
return Result.error("采购单错误");
|
||||
}
|
||||
Map<String, Object> pageList = invoicingApi.getShareInfoByCgdId(cgdMainEntityDto);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ public class ShiroConfig {
|
|||
}
|
||||
|
||||
filterChainDefinitionMap.put("/api/tplink/videoStorage/**", "anon"); //视频缓存存储接口
|
||||
filterChainDefinitionMap.put("/api/pad/invoicing/getShareInfoByCgdId", "anon"); //查询采购单信息(分享接口使用)
|
||||
// filterChainDefinitionMap.put("/api/pad/invoicing/**", "anon"); //测试进销存对应的接口
|
||||
// filterChainDefinitionMap.put("/api/pad/qingling/**", "anon"); //测试请领对应的接口
|
||||
filterChainDefinitionMap.put("/iot/tq/api/electricityMeter/**", "anon"); //电表回调
|
||||
|
|
|
|||
|
|
@ -81,4 +81,6 @@ public interface IInvoicingApi {
|
|||
String editIzNew(CgdMainEntity cgdMainEntityDto);
|
||||
|
||||
String editShareInfo(CgdMainEntity cgdMainEntityDto);
|
||||
|
||||
Map<String, Object> getShareInfoByCgdId(CgdMainEntity cgdMainEntityDto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@
|
|||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-system-biz</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import org.jeecg.common.system.query.QueryRuleEnum;
|
|||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -91,6 +92,9 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
@Autowired
|
||||
private NuInvoicingCgdSxdMapper sxdMapper;
|
||||
|
||||
@Autowired
|
||||
private SysBaseApiImpl sysBaseApi;
|
||||
|
||||
@Autowired
|
||||
private ISysConfigApi sysConfigApi;
|
||||
|
||||
|
|
@ -1097,4 +1101,50 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
return "1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getShareInfoByCgdId(CgdMainEntity cgdMainEntityDto) {
|
||||
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
String cgdNo = "";//采购单单号
|
||||
String qgrq = "";//采购日期
|
||||
String jgmc = "";//机构名称(采购方信息)
|
||||
String jgdz = "";//机构地址(采购方信息)
|
||||
String lxr = "";//联系人(采购方信息)
|
||||
String lxrdh = "";//联系电话(采购方信息)
|
||||
String gysmc = "";//供应商名称
|
||||
List<Map<String, Object>> maps = new ArrayList<>();
|
||||
NuInvoicingCgdMain cgdMain = cgdMainMapper.selectById(cgdMainEntityDto.getId());
|
||||
cgdNo = cgdMain.getCgdNo();
|
||||
qgrq = DateUtils.formatDate(cgdMain.getQgDate(),"yyyy-MM-dd");
|
||||
lxr = cgdMain.getShareBy();
|
||||
lxrdh = cgdMain.getShareTel();
|
||||
gysmc = cgdMain.getGysName();
|
||||
|
||||
List<JSONObject> departList = sysBaseApi.queryDepartsByOrgcodes("101");
|
||||
if(departList.size()>0){
|
||||
jgmc = departList.get(0).getString("departName");
|
||||
jgdz = departList.get(0).getString("address");
|
||||
}
|
||||
// queryDepartsByOrgcodes
|
||||
|
||||
List<NuInvoicingCgdInfo> list = cgdInfoMapper.selectList(new QueryWrapper<NuInvoicingCgdInfo>().eq("cgd_id",cgdMain.getId()));
|
||||
for (NuInvoicingCgdInfo info : list) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("wlName",info.getWlName());
|
||||
map.put("wlSpecificationModel",info.getWlSpecificationModel());
|
||||
map.put("wlUnits",info.getWlUnits());
|
||||
map.put("purchaseQuantity",info.getPurchaseQuantity());
|
||||
maps.add( map);
|
||||
}
|
||||
resultMap.put("cgdNo",cgdNo);
|
||||
resultMap.put("qgrq",qgrq);
|
||||
resultMap.put("jgmc",jgmc);
|
||||
resultMap.put("jgdz",jgdz);
|
||||
resultMap.put("lxr",lxr);
|
||||
resultMap.put("lxrdh",lxrdh);
|
||||
resultMap.put("gysmc",gysmc);
|
||||
resultMap.put("wlList",maps);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue