Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
srm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
aship
srm
Commits
8dbbe4a5
Commit
8dbbe4a5
authored
Jul 25, 2019
by
顾俭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update from fcn
parent
342bea23
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
87 additions
and
40 deletions
+87
-40
AclRoleController.java
src/main/java/com/i1/srm/am/web/AclRoleController.java
+31
-1
ISupplierInvestMainDao.java
.../java/com/i1/srm/supplier/dao/ISupplierInvestMainDao.java
+2
-0
SupplierInvestMainService.java
.../srm/supplier/service/impl/SupplierInvestMainService.java
+11
-2
SupplierImpSformResController.java
...i1/srm/supplierImp/web/SupplierImpSformResController.java
+9
-5
logback-spring.xml
src/main/resources/logback-spring.xml
+3
-3
query.html
src/main/resources/static/app/srm/role/query/query.html
+2
-1
audit.html
...ain/resources/static/app/srm/supplierImp/audit/audit.html
+6
-5
audit.js
src/main/resources/static/app/srm/supplierImp/audit/audit.js
+2
-2
sformres.html
...sources/static/app/srm/supplierImp/sformres/sformres.html
+0
-1
sformres.js
...resources/static/app/srm/supplierImp/sformres/sformres.js
+2
-2
unitaudit.html
...urces/static/app/srm/supplierImp/unitaudit/unitaudit.html
+8
-8
view.html
src/main/resources/static/app/srm/supplierImp/view/view.html
+10
-10
V2017.179__ALTER_TABLE_SUPPLIER_IMP_SFORM_RES.sql
...l/mysql/V2017.179__ALTER_TABLE_SUPPLIER_IMP_SFORM_RES.sql
+1
-0
No files found.
src/main/java/com/i1/srm/am/web/AclRoleController.java
View file @
8dbbe4a5
package
com
.
i1
.
srm
.
am
.
web
;
import
com.google.common.collect.Lists
;
import
com.i1.base.annotation.StringMatchQuery
;
import
com.i1.base.exception.IOneServiceException
;
import
com.i1.base.exception.IOneWebRestfulException
;
import
com.i1.base.web.AbstractController
;
import
com.i1.srm.am.entity.AclRole
;
import
com.i1.srm.am.entity.Function
;
import
com.i1.srm.am.entity.Resource
;
import
com.i1.srm.am.service.IAclRoleService
;
import
com.i1.srm.am.service.
SecuredPage
;
import
com.i1.srm.am.service.
ResourcePermission
;
import
com.i1.srm.am.web.dto.AclRoleDto
;
import
com.i1.srm.am.web.dto.FunctionDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.io.IOException
;
import
java.util.List
;
@RestController
...
...
@@ -38,4 +46,26 @@ public class AclRoleController extends AbstractController<AclRole, AclRoleDto> {
return
functionDtos
;
}
@Override
@ResourcePermission
(
values
=
{
Resource
.
QUERY
})
@RequestMapping
(
value
=
"/getAllByPageAndExample"
,
method
=
RequestMethod
.
GET
)
public
Page
<
AclRoleDto
>
getAllByPageAndExample
(
@RequestParam
String
exampleJson
,
@RequestParam
(
defaultValue
=
"1"
)
int
page
,
@RequestParam
(
defaultValue
=
"100"
)
int
size
)
throws
IOneWebRestfulException
{
try
{
if
(
exampleJson
!=
null
)
{
List
<
String
>
containFields
=
getFieldsWithAnnotations
(
StringMatchQuery
.
class
);
// order by id asc
Pageable
pageable
=
new
PageRequest
(
page
-
1
,
size
,
new
Sort
(
Sort
.
Direction
.
ASC
,
"id"
));
AclRoleDto
dtoExample
=
getDtoFromExampleJson
(
exampleJson
);
Page
<
AclRole
>
entities
=
getService
().
getAllByPageAndExample
(
dtoTransformer
.
dtoToEntity
(
dtoExample
,
getEntityClass
()),
containFields
,
pageable
);
return
new
PageImpl
<>(
convertEntitiesToDtos
(
entities
.
getContent
()),
pageable
,
entities
.
getTotalElements
());
}
else
{
throw
new
IOneWebRestfulException
(
"Example is null."
);
}
}
catch
(
IOneServiceException
|
IOException
e
)
{
throw
new
IOneWebRestfulException
(
e
);
}
}
}
src/main/java/com/i1/srm/supplier/dao/ISupplierInvestMainDao.java
View file @
8dbbe4a5
...
...
@@ -26,4 +26,6 @@ public interface ISupplierInvestMainDao extends BaseJpaRepository<SupplierInvest
" SELECT id FROM srm_supplier_invest_baseinfo WHERE NAME=:name OR ABBR_NAME=:abbrName) T"
,
nativeQuery
=
true
)
int
checkSupplierExist
(
@Param
(
value
=
"name"
)
String
name
,
@Param
(
value
=
"abbrName"
)
String
abbrName
);
@Query
(
value
=
"SELECT DISTINCT SUPPLIER_UID FROM srm_supplier_invest_main WHERE SUPPLIER_UID LIKE 'LSS%'"
,
nativeQuery
=
true
)
List
<
String
>
findLssSupplierUids
();
}
src/main/java/com/i1/srm/supplier/service/impl/SupplierInvestMainService.java
View file @
8dbbe4a5
...
...
@@ -5,6 +5,7 @@ import com.i1.base.exception.IOneServiceException;
import
com.i1.base.service.AbstractService
;
import
com.i1.srm.am.entity.SrmUser
;
import
com.i1.srm.am.service.IAccountService
;
import
com.i1.srm.am.service.IAccountSupplierService
;
import
com.i1.srm.base.dao.entity.BaseSupplierFile
;
import
com.i1.srm.supplier.dao.ISupplierInvestMainDao
;
import
com.i1.srm.supplier.dao.ISupplierInvestMainDaoCustom
;
...
...
@@ -44,6 +45,9 @@ public class SupplierInvestMainService extends AbstractService<SupplierInvestMai
@Autowired
private
IAccountService
accountService
;
@Autowired
private
IAccountSupplierService
accountSupplierService
;
@Override
protected
ISupplierInvestMainDao
getDao
()
{
return
dao
;
...
...
@@ -133,7 +137,7 @@ public class SupplierInvestMainService extends AbstractService<SupplierInvestMai
}
}
//
采购账号的已关联供应商数据
//
采购账号的已关联供应商数据 + LSS开头的供应商
@Override
public
List
<
String
>
findSupplierUidListByCurrentUser
()
throws
IOneServiceException
{
try
{
...
...
@@ -141,9 +145,14 @@ public class SupplierInvestMainService extends AbstractService<SupplierInvestMai
SrmUser
user
=
accountService
.
getCurrentSrmUser
();
if
(
StringUtils
.
equalsIgnoreCase
(
user
.
getSystemType
(),
SYSTEM_TYPE_PURCHASER
))
{
for
(
BaseSupplierFile
supplier
:
user
.
getSuppliers
())
{
List
<
BaseSupplierFile
>
supplierListByAccountUserName
=
accountSupplierService
.
findSupplierListByAccountUserName
(
user
.
getUsername
());
for
(
BaseSupplierFile
supplier
:
supplierListByAccountUserName
)
{
supplierUidList
.
add
(
supplier
.
getSupplierUid
());
}
List
<
String
>
lssSupplierUids
=
dao
.
findLssSupplierUids
();
if
(
lssSupplierUids
!=
null
&&
lssSupplierUids
.
size
()
!=
0
)
{
supplierUidList
.
addAll
(
lssSupplierUids
);
}
}
return
supplierUidList
;
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/i1/srm/supplierImp/web/SupplierImpSformResController.java
View file @
8dbbe4a5
...
...
@@ -135,23 +135,27 @@ public class SupplierImpSformResController extends AbstractController<SupplierIm
public
void
updateRes
(
@RequestBody
List
<
SupplierImpSformResReviewDto
>
item
)
throws
IOneWebRestfulException
{
try
{
for
(
SupplierImpSformResReviewDto
supplierImpSformResReviewDto
:
item
)
{
if
(
supplierImpSformResReviewDto
.
getReviewPass
()
!=
null
&&
supplierImpSformResReviewDto
.
getReviewRating
()
!=
null
)
{
if
(
supplierImpSformResReviewDto
.
getReviewPass
()
!=
null
)
{
SupplierImpSformRes
supplierImpSformRes
=
service
.
get
(
supplierImpSformResReviewDto
.
getId
());
Integer
reviewRating
=
null
;
if
(
supplierImpSformRes
.
getReviewRating
()
!=
null
)
{
reviewRating
=
supplierImpSformRes
.
getReviewRating
().
intValue
();
}
if
(
reviewRating
!=
supplierImpSformResReviewDto
.
getReviewRating
()
||
!
supplierImpSformRes
.
getReviewPass
().
equals
(
supplierImpSformResReviewDto
.
getReviewPass
()))
{
if
(!
supplierImpSformResReviewDto
.
getReviewPass
().
equals
(
supplierImpSformRes
.
getReviewPass
())
||
(
reviewRating
==
null
&&
supplierImpSformResReviewDto
.
getReviewRating
()
!=
null
)
||
(
reviewRating
!=
null
&&
supplierImpSformResReviewDto
.
getReviewRating
()
==
null
)
||
(
reviewRating
!=
null
&&
supplierImpSformResReviewDto
.
getReviewRating
()
!=
null
&&
!
reviewRating
.
equals
(
supplierImpSformResReviewDto
.
getReviewRating
()))
)
{
supplierImpSformRes
.
setReviewPerson
(
accountService
.
getCurrentUser
());
supplierImpSformRes
.
setReviewDate
(
new
Date
());
}
if
(!
supplierImpSformResReviewDto
.
getReviewPass
().
equals
(
"Y"
)
&&
!
supplierImpSformResReviewDto
.
getReviewPass
().
equals
(
"N"
))
{
if
(!
"Y"
.
equals
(
supplierImpSformResReviewDto
.
getReviewPass
())
&&
!
"N"
.
equals
(
supplierImpSformResReviewDto
.
getReviewPass
()
))
{
supplierImpSformRes
.
setReviewPass
(
null
);
}
else
{
supplierImpSformRes
.
setReviewPass
(
supplierImpSformResReviewDto
.
getReviewPass
());
}
if
(
supplierImpSformResReviewDto
.
getReviewRating
()
!=
0
)
{
supplierImpSformRes
.
setReviewRating
(
BigDecimal
.
valueOf
(
(
int
)
supplierImpSformResReviewDto
.
getReviewRating
()));
if
(
supplierImpSformResReviewDto
.
getReviewRating
()
!=
null
&&
supplierImpSformResReviewDto
.
getReviewRating
()
!=
0
)
{
supplierImpSformRes
.
setReviewRating
(
BigDecimal
.
valueOf
(
supplierImpSformResReviewDto
.
getReviewRating
()));
}
else
{
supplierImpSformRes
.
setReviewRating
(
null
);
}
...
...
src/main/resources/logback-spring.xml
View file @
8dbbe4a5
...
...
@@ -3,7 +3,7 @@
<!-- 控制台打印日志的相关配置 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
[ %-5level] [%date{yyyy-MM-dd HH:mm:ss
}] %logger{96} [
%line] - %msg%n
</pattern>
<pattern>
[ %-5level] [%date{yyyy-MM-dd HH:mm:ss
.SSS}] [%thread] %logger{96} [%file:
%line] - %msg%n
</pattern>
</encoder>
</appender>
...
...
@@ -11,11 +11,11 @@
<appender
name=
"ERROR-OUT"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
log/srm.log
</file>
<encoder>
<pattern>
[ %-5level] [%date{yyyy-MM-dd HH:mm:ss
}] %logger{96} [
%line] - %msg%n
</pattern>
<pattern>
[ %-5level] [%date{yyyy-MM-dd HH:mm:ss
.SSS}] [%thread] %logger{96} [%file:
%line] - %msg%n
</pattern>
</encoder>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
log/srm-%d{yyyy-MM-dd}.%i.log
.zip
</fileNamePattern>
<fileNamePattern>
log/srm-%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<!-- 最大保存时间:30 days-->
<maxHistory>
30
</maxHistory>
<totalSizeCap>
10GB
</totalSizeCap>
...
...
src/main/resources/static/app/srm/role/query/query.html
View file @
8dbbe4a5
...
...
@@ -34,7 +34,8 @@
<button
class=
"btn btn-default mrs"
ng-click=
"currentItem.status = 1; update()"
ng-disabled=
"!currentItem || currentItem.status == 1"
acl-check
func=
" 'ROLE_FUNCTION' "
resource=
" 'ENABLE' "
>
恢复
</button>
<button
class=
"btn btn-default mrs"
ng-click=
"delete()"
ng-disabled=
"!currentItem"
acl-check
func=
" 'ROLE_FUNCTION' "
resource=
" 'DELETE' "
>
删除
</button>
<button
class=
"btn btn-default mrs"
ng-click=
"delete()"
ng-disabled=
"!currentItem || currentItem.id =='1' || currentItem.id =='2' || currentItem.id =='3'"
acl-check
func=
" 'ROLE_FUNCTION' "
resource=
" 'DELETE' "
>
删除
</button>
</div>
<div
ui-grid=
"gridOptions"
ui-grid-selection
ui-grid-resize-columns
class=
"grid"
></div>
...
...
src/main/resources/static/app/srm/supplierImp/audit/audit.html
View file @
8dbbe4a5
...
...
@@ -95,11 +95,12 @@
<td>
{{impSform.createdDate | date:'yyyy/MM/dd HH:mm'}}
</td>
<td><a>
下载
</a></td>
<td>
{{impSform.selfRating}}/{{impSform.selfPass}}
</td>
<td
style=
"border: 1px solid black"
><input
style=
"width: 100% ;height:33px "
type=
"number"
placeholder=
"请输入整数,且1到100之间"
value=
"{{impSform.reviewRating}}"
></td>
<td
style=
"border: 1px solid black"
>
<select
class=
"form-control"
style=
"width: 100%;"
ng-model=
"impSform.reviewPass"
>
<input
style=
"width: 100% ;height:33px "
type=
"number"
ng-pattern=
"/^(0|100|\d{1,2})$/"
name=
"reviewRating"
placeholder=
"请输入整数,且1到100之间"
ng-model=
"impSform.reviewRating"
/>
</td>
<td
style=
"border: 1px solid black"
>
<select
class=
"form-control"
style=
"width: 100%;"
ng-model=
"impSform.reviewPass"
required
>
<option
ng-repeat=
"(key, value) in Constants.IMP_PASS"
value=
"{{key}}"
>
{{value}}
</option>
</select>
...
...
@@ -213,7 +214,7 @@
</div>
<div
class=
"button-bar mtt pull-right"
>
<button
class=
"btn btn-primary mrs "
ng-click=
"via(1)"
>
通过
</button>
<button
class=
"btn btn-primary mrs "
ng-click=
"via(1)"
ng-disabled=
"!certForm.$valid"
>
通过
</button>
<button
class=
"btn btn-primary mrs "
ng-click=
"via(2)"
>
驳回
</button>
<button
class=
"btn btn-primary mrs "
ng-click=
"close()"
>
返回
</button>
</div>
...
...
src/main/resources/static/app/srm/supplierImp/audit/audit.js
View file @
8dbbe4a5
...
...
@@ -68,13 +68,13 @@
if
(
JudgeTrueAndFalse
)
{
var
reviewRating
=
$
(
this
).
children
(
":eq(5)"
).
children
(
":eq(0)"
).
val
();
var
reviewPass
=
$
(
this
).
children
(
":eq(6)"
).
children
(
":eq(0)"
).
val
();
if
(
(
reviewRating
==
""
||
reviewRating
==
null
)
||
(
reviewPass
!=
'Y'
&&
reviewPass
!=
'N'
)
)
{
if
(
reviewPass
!=
'Y'
&&
reviewPass
!=
'N'
)
{
JudgeTrueAndFalse
=
false
;
}
}
});
if
(
JudgeTrueAndFalse
==
false
)
{
UtilService
.
showError
(
"请输入复评
分和复评
结果!"
);
UtilService
.
showError
(
"请输入复评结果!"
);
return
;
}
if
(
response
==
2
&&
$scope
.
addDscrpys
.
length
==
0
)
{
...
...
src/main/resources/static/app/srm/supplierImp/sformres/sformres.html
View file @
8dbbe4a5
...
...
@@ -108,7 +108,6 @@
<div
class=
"form-group"
>
<label>
自评分
</label>
<input
ng-pattern=
"/^(0|100|\d{1,2})$/"
name=
"selfRating"
type=
"number"
class=
"form-control"
required
ng-model=
"currentSuppImpSurvey.selfRating"
/>
<span
style=
"color: red"
ng-show=
"certForm.selfRating.$error.pattern"
>
自评分为0-100之间的整数
</span>
</div>
...
...
src/main/resources/static/app/srm/supplierImp/sformres/sformres.js
View file @
8dbbe4a5
...
...
@@ -46,8 +46,8 @@
UtilService
.
showError
(
"请上传附件。"
);
return
;
}
if
(
$scope
.
currentSuppImpSurvey
.
self
Rating
==
null
||
$scope
.
currentSuppImpSurvey
.
self
Pass
==
null
)
{
UtilService
.
showError
(
"请填写自评
分和自评
结果"
);
if
(
$scope
.
currentSuppImpSurvey
.
selfPass
==
null
)
{
UtilService
.
showError
(
"请填写自评结果"
);
return
;
}
$scope
.
isClickSave
=
false
;
...
...
src/main/resources/static/app/srm/supplierImp/unitaudit/unitaudit.html
View file @
8dbbe4a5
...
...
@@ -200,14 +200,14 @@
</div>
</div>
<
div
class=
"col-md-12 mls mrs"
>
<
h3
class=
"mls"
>
报价单
</h3
>
<
hr
class=
"underline"
>
<
/div
>
<
div
class=
"col-md-10 mls"
>
<
div
ui-grid=
"quoteOptions"
style=
"height: 200px"
ui-grid-selection
ui-grid-resize-columns
class=
"grid"
></div
>
<
/div
>
<
!--<div class="col-md-12 mls mrs">--
>
<
!--<h3 class="mls">报价单</h3>--
>
<
!--<hr class="underline">--
>
<
!--</div>--
>
<
!--<div class="col-md-10 mls">--
>
<
!--<div ui-grid="quoteOptions" style="height: 200px" ui-grid-selection ui-grid-resize-columns-->
<!--class="grid"></div>--
>
<
!--</div>--
>
<div
class=
"col-md-12 mrs"
>
<h3
class=
"mls"
>
职能单位审核
</h3>
...
...
src/main/resources/static/app/srm/supplierImp/view/view.html
View file @
8dbbe4a5
...
...
@@ -254,16 +254,16 @@
</div>
</div>
<
div
class=
"col-md-12"
>
<
h3
class=
"mls"
>
报价单
</h3
>
<
hr
class=
"underline"
>
<
/div
>
<
div
class=
"col-md-10"
>
<
div
ui-grid=
"quoteOptions"
style=
"height: 200px"
ui-grid-selection
ui-grid-resize-columns
class=
"grid"
></div
>
<
/div
>
<
!--<div class="col-md-12">--
>
<
!--<h3 class="mls">报价单</h3>--
>
<
!--<hr class="underline">--
>
<
!--</div>--
>
<
!--<div class="col-md-10">--
>
<
!--<div ui-grid="quoteOptions" style="height: 200px" ui-grid-selection-->
<!--ui-grid-resize-columns-->
<!--class="grid"></div>--
>
<
!--</div>--
>
<div
class=
"col-md-12"
>
<h3
class=
"mls"
>
职能单位审核
</h3>
...
...
upgrade/sql/mysql/V2017.179__ALTER_TABLE_SUPPLIER_IMP_SFORM_RES.sql
0 → 100644
View file @
8dbbe4a5
ALTER
TABLE
srm_supplier_imp_sform_res
MODIFY
SELF_RATING
decimal
(
5
,
2
)
COMMENT
'自评分'
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment