This commit is contained in:
佟明轩 2025-05-19 16:42:30 +08:00
parent 6c84b8012e
commit 8cb2b1c94c
4 changed files with 10 additions and 65 deletions

View File

@ -3,6 +3,7 @@ package com.syjiaer.clinic.server.controller.organization;
import com.alibaba.fastjson.JSONObject;
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
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.Result;
import com.syjiaer.clinic.server.controller.BaseController;
@ -33,6 +34,9 @@ public class OrganizationSectionController extends BaseController {
@RequestMapping("/add")
public Result<?> add() {
OrganizationSection organizationSection = parmsUtil.getObjectWithCheck("data", OrganizationSection.class);
organizationSection.setCode(StringUtil.getCode("os"));
organizationSectionService.add(organizationSection);
return success("添加成功");
}

View File

@ -82,31 +82,6 @@ public class OrganizationSectionService extends BaseService {
String processing = getString(caty);
organizationSection.setCaty(processing);
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)
public void edit(OrganizationSection organizationSection) {
@ -114,34 +89,9 @@ public class OrganizationSectionService extends BaseService {
String processing = getString(caty);
organizationSection.setCaty(processing);
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)
public void delete(Integer id) {
OrganizationSection organizationSection = organizationSectionMapper.selectById(id);
@ -150,16 +100,6 @@ public class OrganizationSectionService extends BaseService {
}
organizationSection.setDelFlag(1);
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) {
QueryWrapper<OrganizationSection> queryWrapper = new QueryWrapper<>();

View File

@ -243,9 +243,10 @@ public class StatisticsService extends BaseService {
",sum(purchase_unit_price*inventory_whole_number) as total_cost");
goodsWrapper.eq("status", true);
Map<String, Object> costAndPriceMap = goodsMapper.selectMaps(goodsWrapper).get(0);
if(costAndPriceMap!=null){
goodsStatistics.setTotalCost(new BigDecimal(costAndPriceMap.get("total_cost").toString()));
goodsStatistics.setTotalPrice(new BigDecimal(costAndPriceMap.get("total_price").toString()));
}
QueryWrapper<Goods> socialWrapper = new QueryWrapper<>();
socialWrapper.eq("status", true);

View File

@ -31,7 +31,7 @@
</sql>
<select id="listPurchaseCodesByGoodsName" resultType="java.lang.String">
SELECT code
FROM "public"."inventory" as i
FROM inventory as i
Left JOIN inventory_purchase as ip ON i.inventory_purchase_code = ip.code
<include refid="purchaseQueryCondition"/>
GROUP BY ip.code
@ -43,7 +43,7 @@
SELECT COUNT(*) AS total_count
FROM (
SELECT code
FROM "public"."inventory" AS i
FROM inventory AS i
LEFT JOIN inventory_purchase AS ip ON i.inventory_purchase_code = ip.code
<include refid="purchaseQueryCondition"/>
GROUP BY ip.code