Compare commits
No commits in common. "3eb09a0ffc05872af8b2ca49a5fda08e3a3fe320" and "865a9cf4c0f9a16a1ef232b6b194d9b9ff0da50f" have entirely different histories.
3eb09a0ffc
...
865a9cf4c0
|
|
@ -3,7 +3,6 @@ package com.syjiaer.clinic.server.controller.organization;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||||
import com.syjiaer.clinic.server.common.util.StringUtil;
|
|
||||||
import com.syjiaer.clinic.server.common.vo.Page;
|
import com.syjiaer.clinic.server.common.vo.Page;
|
||||||
import com.syjiaer.clinic.server.common.vo.Result;
|
import com.syjiaer.clinic.server.common.vo.Result;
|
||||||
import com.syjiaer.clinic.server.controller.BaseController;
|
import com.syjiaer.clinic.server.controller.BaseController;
|
||||||
|
|
@ -34,9 +33,6 @@ public class OrganizationSectionController extends BaseController {
|
||||||
@RequestMapping("/add")
|
@RequestMapping("/add")
|
||||||
public Result<?> add() {
|
public Result<?> add() {
|
||||||
OrganizationSection organizationSection = parmsUtil.getObjectWithCheck("data", OrganizationSection.class);
|
OrganizationSection organizationSection = parmsUtil.getObjectWithCheck("data", OrganizationSection.class);
|
||||||
|
|
||||||
organizationSection.setCode(StringUtil.getCode("os"));
|
|
||||||
|
|
||||||
organizationSectionService.add(organizationSection);
|
organizationSectionService.add(organizationSection);
|
||||||
return success("添加成功");
|
return success("添加成功");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,31 @@ public class OrganizationSectionService extends BaseService {
|
||||||
String processing = getString(caty);
|
String processing = getString(caty);
|
||||||
organizationSection.setCaty(processing);
|
organizationSection.setCaty(processing);
|
||||||
organizationSectionMapper.insert(organizationSection);
|
organizationSectionMapper.insert(organizationSection);
|
||||||
|
try {
|
||||||
|
socialRequest.call3401(new com.syjiaer.clinic.server.common.api.input.IM3401()
|
||||||
|
.setHospDeptCodg(organizationSection.getCode())
|
||||||
|
.setHospDeptName(organizationSection.getName())
|
||||||
|
.setCaty(organizationSection.getCaty())
|
||||||
|
.setBegntime(organizationSection.getBeginDate())
|
||||||
|
.setEndtime(organizationSection.getEndDate())
|
||||||
|
.setItro(organizationSection.getInfo())
|
||||||
|
.setDeptResperName(organizationSection.getResperName())
|
||||||
|
.setDeptResperTel(organizationSection.getResperTel())
|
||||||
|
.setDeptMedServScp(organizationSection.getMedServScp())
|
||||||
|
.setDeptEstbdat(organizationSection.getCreationDate())
|
||||||
|
.setAprvBedCnt(organizationSection.getBedCnt())
|
||||||
|
.setHiCrtfBedCnt(organizationSection.getSocialBedCnt())
|
||||||
|
.setPoolareaNo(socialInsuplcAdmdvs)
|
||||||
|
.setDrPsncnt(organizationSection.getDrPsncnt())
|
||||||
|
.setPharPsncnt(organizationSection.getPharPsncnt())
|
||||||
|
.setNursPsncnt(organizationSection.getNursPsncnt())
|
||||||
|
.setTecnPsncnt(organizationSection.getTecnPsncnt())
|
||||||
|
.setMemo(organizationSection.getMemo()));
|
||||||
|
} catch (MessageException messageException) {
|
||||||
|
log.error("科室添加失败", messageException);
|
||||||
|
throw new MessageException("科室添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void edit(OrganizationSection organizationSection) {
|
public void edit(OrganizationSection organizationSection) {
|
||||||
|
|
@ -89,9 +114,34 @@ public class OrganizationSectionService extends BaseService {
|
||||||
String processing = getString(caty);
|
String processing = getString(caty);
|
||||||
organizationSection.setCaty(processing);
|
organizationSection.setCaty(processing);
|
||||||
organizationSectionMapper.updateById(organizationSection);
|
organizationSectionMapper.updateById(organizationSection);
|
||||||
|
// try {
|
||||||
|
// socialRequest.call3402(new com.syjiaer.clinic.server.modules.social.api.input.IM3402()
|
||||||
|
// .setHospDeptCodg(organizationSection.getCode())
|
||||||
|
// .setHospDeptName(organizationSection.getName())
|
||||||
|
// .setBegntime(organizationSection.getBeginDate())
|
||||||
|
// .setEndtime(organizationSection.getEndDate())
|
||||||
|
// .setItro(organizationSection.getInfo())
|
||||||
|
// .setDeptResperName(organizationSection.getResperName())
|
||||||
|
// .setDeptResperTel(organizationSection.getResperTel())
|
||||||
|
// .setDeptMedServScp(organizationSection.getMedServScp())
|
||||||
|
// .setCaty(organizationSection.getCaty())
|
||||||
|
// .setDeptEstbdat(organizationSection.getCreationDate())
|
||||||
|
// .setAprvBedCnt(organizationSection.getBedCnt())
|
||||||
|
// .setHiCrtfBedCnt(organizationSection.getSocialBedCnt())
|
||||||
|
// .setDrPsncnt(organizationSection.getDrPsncnt())
|
||||||
|
// .setPharPsncnt(organizationSection.getPharPsncnt())
|
||||||
|
// .setNursPsncnt(organizationSection.getNursPsncnt())
|
||||||
|
// .setTecnPsncnt(organizationSection.getTecnPsncnt())
|
||||||
|
// .setMemo(organizationSection.getMemo())
|
||||||
|
// );
|
||||||
|
// } catch (MessageException messageException) {
|
||||||
|
// log.error("科室修改失败", messageException);
|
||||||
|
// throw new MessageException("科室修改失败");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void delete(Integer id) {
|
public void delete(Integer id) {
|
||||||
OrganizationSection organizationSection = organizationSectionMapper.selectById(id);
|
OrganizationSection organizationSection = organizationSectionMapper.selectById(id);
|
||||||
|
|
@ -100,6 +150,16 @@ public class OrganizationSectionService extends BaseService {
|
||||||
}
|
}
|
||||||
organizationSection.setDelFlag(1);
|
organizationSection.setDelFlag(1);
|
||||||
organizationSectionMapper.updateById(organizationSection);
|
organizationSectionMapper.updateById(organizationSection);
|
||||||
|
// try {
|
||||||
|
// socialRequest.call3403(new com.syjiaer.clinic.server.modules.social.api.input.IM3403()
|
||||||
|
// .setHospDeptCodg(organizationSection.getCode())
|
||||||
|
// .setHospDeptName(organizationSection.getName())
|
||||||
|
// .setBegntime(organizationSection.getBeginDate())
|
||||||
|
// );
|
||||||
|
// } catch (MessageException messageException) {
|
||||||
|
// log.error("科室删除失败", messageException);
|
||||||
|
// throw new MessageException("科室删除失败");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
public OrganizationSection get(int id) {
|
public OrganizationSection get(int id) {
|
||||||
QueryWrapper<OrganizationSection> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<OrganizationSection> queryWrapper = new QueryWrapper<>();
|
||||||
|
|
|
||||||
|
|
@ -243,10 +243,9 @@ public class StatisticsService extends BaseService {
|
||||||
",sum(purchase_unit_price*inventory_whole_number) as total_cost");
|
",sum(purchase_unit_price*inventory_whole_number) as total_cost");
|
||||||
goodsWrapper.eq("status", true);
|
goodsWrapper.eq("status", true);
|
||||||
Map<String, Object> costAndPriceMap = goodsMapper.selectMaps(goodsWrapper).get(0);
|
Map<String, Object> costAndPriceMap = goodsMapper.selectMaps(goodsWrapper).get(0);
|
||||||
if(costAndPriceMap!=null){
|
|
||||||
goodsStatistics.setTotalCost(new BigDecimal(costAndPriceMap.get("total_cost").toString()));
|
goodsStatistics.setTotalCost(new BigDecimal(costAndPriceMap.get("total_cost").toString()));
|
||||||
goodsStatistics.setTotalPrice(new BigDecimal(costAndPriceMap.get("total_price").toString()));
|
goodsStatistics.setTotalPrice(new BigDecimal(costAndPriceMap.get("total_price").toString()));
|
||||||
}
|
|
||||||
|
|
||||||
QueryWrapper<Goods> socialWrapper = new QueryWrapper<>();
|
QueryWrapper<Goods> socialWrapper = new QueryWrapper<>();
|
||||||
socialWrapper.eq("status", true);
|
socialWrapper.eq("status", true);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
</sql>
|
</sql>
|
||||||
<select id="listPurchaseCodesByGoodsName" resultType="java.lang.String">
|
<select id="listPurchaseCodesByGoodsName" resultType="java.lang.String">
|
||||||
SELECT code
|
SELECT code
|
||||||
FROM inventory as i
|
FROM "public"."inventory" as i
|
||||||
Left JOIN inventory_purchase as ip ON i.inventory_purchase_code = ip.code
|
Left JOIN inventory_purchase as ip ON i.inventory_purchase_code = ip.code
|
||||||
<include refid="purchaseQueryCondition"/>
|
<include refid="purchaseQueryCondition"/>
|
||||||
GROUP BY ip.code
|
GROUP BY ip.code
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
SELECT COUNT(*) AS total_count
|
SELECT COUNT(*) AS total_count
|
||||||
FROM (
|
FROM (
|
||||||
SELECT code
|
SELECT code
|
||||||
FROM inventory AS i
|
FROM "public"."inventory" AS i
|
||||||
LEFT JOIN inventory_purchase AS ip ON i.inventory_purchase_code = ip.code
|
LEFT JOIN inventory_purchase AS ip ON i.inventory_purchase_code = ip.code
|
||||||
<include refid="purchaseQueryCondition"/>
|
<include refid="purchaseQueryCondition"/>
|
||||||
GROUP BY ip.code
|
GROUP BY ip.code
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue