|
|
@@ -10,8 +10,10 @@ import com.goafanti.common.dao.OrganizationYearProjectMapper;
|
|
|
import com.goafanti.common.dao.UserMapper;
|
|
|
import com.goafanti.common.model.OrganizationAnnualReport;
|
|
|
import com.goafanti.common.model.OrganizationYearProject;
|
|
|
+import com.goafanti.common.model.User;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
+import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.customer.bo.CustomerOrganizationDetailBo;
|
|
|
import com.goafanti.customer.service.AdminOrgAnnualReportService;
|
|
|
import com.goafanti.customer.service.CustomerService;
|
|
|
@@ -31,12 +33,23 @@ public class AdminOrgAnnualReportServiceImpl extends BaseMybatisDao<Organizatio
|
|
|
o.setId(UUID.randomUUID().toString());
|
|
|
// o.setAid(TokenManager.getAdminId());
|
|
|
o.setAid("1");
|
|
|
+ countIntegrity(o.getUid());
|
|
|
return organizationAnnualReportMapper.insert(o);
|
|
|
}
|
|
|
|
|
|
+ private void countIntegrity(String uid) {
|
|
|
+ User u= new User();
|
|
|
+ CustomerOrganizationDetailBo bo=userMapper.findOrganizationCustomerDetail(uid);
|
|
|
+ u.setAccomplishSituation(uid);
|
|
|
+ u.setIntegrity(customerService.countIntegrity(bo));
|
|
|
+ userMapper.updateByPrimaryKeySelective(u);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
- public int delectOrgAnnual(String id) {
|
|
|
- return organizationAnnualReportMapper.deleteByPrimaryKey(id);
|
|
|
+ public int delectOrgAnnual(OrganizationAnnualReport o) {
|
|
|
+ int i=organizationAnnualReportMapper.deleteByPrimaryKey(o.getId());
|
|
|
+ countIntegrity(o.getUid());
|
|
|
+ return i;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -46,8 +59,6 @@ public class AdminOrgAnnualReportServiceImpl extends BaseMybatisDao<Organizatio
|
|
|
|
|
|
@Override
|
|
|
public int updateOrgAnnual(OrganizationAnnualReport o) {
|
|
|
- CustomerOrganizationDetailBo bo=userMapper.findOrganizationCustomerDetail(o.getUid());
|
|
|
- customerService.countIntegrity(bo);
|
|
|
return organizationAnnualReportMapper.updateByPrimaryKeySelective(o);
|
|
|
|
|
|
}
|
|
|
@@ -80,14 +91,18 @@ public class AdminOrgAnnualReportServiceImpl extends BaseMybatisDao<Organizatio
|
|
|
@Override
|
|
|
public int addOrgYearProject(OrganizationYearProject o) {
|
|
|
o.setId(UUID.randomUUID().toString());
|
|
|
-// o.setAid(TokenManager.getAdminId());
|
|
|
- o.setAid("1");
|
|
|
- return organizationYearProjectMapper.insert(o);
|
|
|
+ o.setAid(TokenManager.getAdminId());
|
|
|
+// o.setAid("1");
|
|
|
+ int i=organizationYearProjectMapper.insert(o);
|
|
|
+ countIntegrity(o.getUid());
|
|
|
+ return i;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public int delectOrgYearProject(String id) {
|
|
|
- return organizationYearProjectMapper.deleteByPrimaryKey(id);
|
|
|
+ public int delectOrgYearProject(OrganizationYearProject o) {
|
|
|
+ int i=organizationYearProjectMapper.deleteByPrimaryKey(o.getId());
|
|
|
+ countIntegrity(o.getUid());
|
|
|
+ return i;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -97,8 +112,6 @@ public class AdminOrgAnnualReportServiceImpl extends BaseMybatisDao<Organizatio
|
|
|
|
|
|
@Override
|
|
|
public int updateOrgYearProject(OrganizationYearProject o) {
|
|
|
- CustomerOrganizationDetailBo bo=userMapper.findOrganizationCustomerDetail(o.getUid());
|
|
|
- customerService.countIntegrity(bo);
|
|
|
return organizationYearProjectMapper.updateByPrimaryKeySelective(o);
|
|
|
}
|
|
|
|