计划管理查询问题

main
laozt 1 year ago
parent 1557ef5208
commit 4e33cd4bbd

@ -55,10 +55,12 @@ public class BEnterpriseNewServiceImpl extends ServiceImpl<BEnterpriseNewMapper,
@Override
public int insertBEnterpriseNew(BEnterpriseNew bEnterpriseNew) {
BEnterpriseNewRequest bEnterpriseNewRequest = new BEnterpriseNewRequest();
BEnterpriseNewRequest second = new BEnterpriseNewRequest();
bEnterpriseNewRequest.setEnterpriseName(bEnterpriseNew.getEnterpriseName());
bEnterpriseNewRequest.setEnterpriseId(bEnterpriseNew.getEnterpriseId());
List<BEnterpriseNewReponse> list = bEnterpriseNewMapper.selectBEnterpriseNewList(bEnterpriseNewRequest);
if (!list.isEmpty()) {
second.setEnterpriseId(bEnterpriseNew.getEnterpriseId());
List<BEnterpriseNewReponse> list1 = bEnterpriseNewMapper.selectBEnterpriseNewList(bEnterpriseNewRequest);
List<BEnterpriseNewReponse> list2 = bEnterpriseNewMapper.selectBEnterpriseNewList(second);
if (!list1.isEmpty() || !list2.isEmpty()) {
throw new ServiceException("该企业已存在");
} else {
return bEnterpriseNewMapper.insertBEnterpriseNew(bEnterpriseNew);

@ -35,10 +35,9 @@
from b_plan_enterprise
</sql>
<select id="selectBPlanEnterpriseList" parameterType="BPlanEnterprise" resultType="BPlanEnterpriseResponse">
SELECT
DISTINCT
a.id,
a.enterprise_id,
a.create_id,

Loading…
Cancel
Save